iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hi Lili Khiung,
I set the PagingDetectPartialGroupRows property to "true" , but the problem persists.
<ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" DefaultStyleMode="Win7" OnInitializeRow="WebGrid1_InitializeRow" UseDefaultStyle="True" DataSourceID="ISDataSource1" DataMember="Messages_Center"> <LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="20" PagingDetectPartialGroupRows="true"> </LayoutSettings>
</ISWebGrid:WebGrid>
The code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <%@ Register Assembly="ISNet.WebUI.WebInput" Namespace="ISNet.WebUI.WebControls" TagPrefix="ISWebInput" %> <%@ Register Assembly="ISNet.WebUI.WebDesktop" Namespace="ISNet.WebUI.WebDesktop" TagPrefix="ISWebDesktop" %> <%@ Register Assembly="ISNet.WebUI.ISDataSource, Version=1.0.1500.1, Culture=neutral, PublicKeyToken=c4184ef0d326354b" Namespace="ISNet.WebUI.DataSource" TagPrefix="ISDataSource" %> <%@ Register Assembly="ISNet.WebUI.WebGrid" Namespace="ISNet.WebUI.WebGrid" TagPrefix="ISWebGrid" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> <td> 时间: </td> <td align="right" nowrap> <table> <tr> <td> <ISWebInput:WebInput ID="DateFrom1" runat="server"> <CultureInfo CultureName="zh-CN"> </CultureInfo> <DisplayFormat Format="yyyy/MM/dd" IsEnabled="true"> </DisplayFormat> <DateTimeEditor DateInputLink="ctl00_content_DateTo1" IsEnabled="true"> </DateTimeEditor> </ISWebInput:WebInput> </td> <td> 至 </td> <td> <ISWebInput:WebInput ID="DateTo1" runat="server"> <CultureInfo CultureName="zh-CN"> </CultureInfo> <DisplayFormat Format="yyyy/MM/dd" IsEnabled="True"> </DisplayFormat> <DateTimeEditor IsEnabled="true"> </DateTimeEditor> </ISWebInput:WebInput> </td> </tr> </table> </td> <td align="right" nowrap> 标题: </td> <td align="left" nowrap> <asp:TextBox ID="txtTitle" Width="80px" runat="server"></asp:TextBox> </td> <td align="right" nowrap id="tdArchiveS1" runat="server"> 文号: </td> <td align="left" nowrap id="tdArchiveS2" runat="server"> <asp:TextBox ID="txtArchiveNo" Width="80px" runat="server"></asp:TextBox> </td> <td> </td> <td align="left" nowrap> <ISWebDesktop:WebButton ID="btnSearch" runat="server" Text="查 询" PostBackMode="FullPostBack" AutoPostback="true" OnClicked="btnSearch_Clicked" /> </td> </tr> </table> <ISWebGrid:WebGrid ID="GridHandle" runat="server" Width="99%" DefaultStyleMode="Win7" OnInitializeRow="WebGrid1_InitializeRow" UseDefaultStyle="True" DataSourceID="ISDataSource1" DataMember="Messages_Center"> <LayoutSettings PagingMode="ClassicPaging" PagingLoadMode="Custom" PagingSize="20"> </LayoutSettings> <RootTable> <Columns> <ISWebGrid:WebGridColumn Name="RowNumber" Caption="序号" Width="30px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn AllowGrouping="No" AllowSizing="No" AllowSorting="No" Bound="False" ColumnType="CheckBox" EditType="NoEdit" IsRowChecker="True" Name="colChk" ShowInSelectColumns="No" Width="25px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="Title" Caption="主题" DataMember="Title"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="BeiZhu" Caption="步骤名称" DataMember="BeiZhu"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="TargetDispName" Caption="办理人" DataMember="TargetDispName"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="FromDispName" Caption="提交人" DataMember="FromDispName"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Name="GenerateDate" Caption="发送时间" DataMember="GenerateDate"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> </ISWebGrid:WebGrid> <ISDataSource:ISDataSource ID="ISDataSource1" runat="server" SchemaType="CustomObject"> <Tables> <ISDataSource:ISDataSourceTable SelectMethod="WaitHandle_PageView_BanLi" EnablePaging="true" SelectCountMethod="WaitHandle_Count_BanLi" TableName="Messages_Center" TypeName="WebApplication1.App_Code.Messages_Center"> <SelectParameters> <asp:ControlParameter ControlID="DateFrom1" Name="DateFromTo" PropertyName="Value" Type="String" /> <asp:ControlParameter ControlID="DateTo1" Name="DateTo" PropertyName="Value" Type="String" /> <asp:ControlParameter ControlID="txtTitle" Name="txtTitle" PropertyName="Text" Type="String" /> <asp:ControlParameter ControlID="txtArchiveNo" Name="ArchiveNo" PropertyName="Text" Type="String" /> </SelectParameters> </ISDataSource:ISDataSourceTable> </Tables> </ISDataSource:ISDataSource> </div> </form> </body> </html>
using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using Microsoft.Practices.EnterpriseLibrary.Data; namespace WebApplication1.App_Code { [System.ComponentModel.DataObject] public class Messages_Center { [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)] public DataView WaitHandle_PageView_BanLi(string DateFromTo, string DateTo, string txtTitle, string ArchiveNo, string sortExpression, int maximumRows, int startRowIndex) { string sql = " where SendMode=4 and IsShow = 1 and IsDel= 0 and IsNoHandle=0 and DoneDate is null "; if (DateFromTo != null && DateFromTo != "") { if (IsOracle()) sql += " and GenerateDate >= TO_DATE('" + DateFromTo + "','YYYY-MM-DD HH24:MI:SS') "; else sql += " and GenerateDate >= '" + DateFromTo + "' "; } if (DateTo != null && DateTo != "") { if (IsOracle()) sql += " and GenerateDate <= TO_DATE('" + DateTo + " 23:59:59','YYYY-MM-DD HH24:MI:SS') "; else sql += " and GenerateDate <= '" + DateTo + " 23:59:59' "; } if (txtTitle != null && txtTitle != "") sql += "and Title like '%" + txtTitle + "%'"; if (ArchiveNo != null && ArchiveNo != "") sql += "and ArchiveNo like '%" + ArchiveNo + "%'"; sql += "and MessageType = '办理' "; string OrderBy = " order by GenerateDate desc "; int TotalNum = 0; DBOperate DBOper = new DBOperate("Northwind_ConnectionString"); DataView dv = DBOper.GetData_Page( " * ", 20, (startRowIndex / 20) + 1, "Messages_Center", "Row_ID", sql, OrderBy, out TotalNum ).DefaultView; return dv; } [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)] public int WaitHandle_Count_BanLi(string DateFromTo, string DateTo, string txtTitle, string ArchiveNo, string sortExpression) { string sql = " where SendMode=4 and IsShow = 1 and IsDel= 0 and IsNoHandle=0 and DoneDate is null "; if (DateFromTo != null && DateFromTo != "") { if (IsOracle()) sql += " and GenerateDate >= TO_DATE('" + DateFromTo + "','YYYY-MM-DD HH24:MI:SS') "; else sql += " and GenerateDate >= '" + DateFromTo + "' "; } if (DateTo != null && DateTo != "") { if (IsOracle()) sql += " and GenerateDate <= TO_DATE('" + DateTo + " 23:59:59','YYYY-MM-DD HH24:MI:SS') "; else sql += " and GenerateDate <= '" + DateTo + " 23:59:59' "; } if (txtTitle != null && txtTitle != "") sql += "and Title like '%" + txtTitle + "%'"; if (ArchiveNo != null && ArchiveNo != "") sql += "and ArchiveNo like '%" + ArchiveNo + "%'"; sql += "and MessageType = '办理' "; sql = "Select Count(1) From Messages_Center " + sql; DBOperate DBOper = new DBOperate("Northwind_ConnectionString"); return DBOper.ExecuteSQL_ToInt(sql); } /// <summary> /// 判断当前是否使用的是ORACLE,如果是返回True,否则返回False。如果是Flase,则说明使SQL /// 默认:使用模块框架名称 /// 作者:徐国春 /// 时间:2010-4-8 /// </summary> /// <returns></returns> private Boolean IsOracle() { Database db = DatabaseFactory.CreateDatabase("Northwind_ConnectionString"); if (db.DbProviderFactory.ToString() == "System.Data.OracleClient.OracleClientFactory") return true; else return false; } } }
Hello Yudi,
Is the sql wrong?
You can see the sample by the url:
http://demo.epoint.com.cn:8080/Website2/Default.aspx
Thanks.
Problems remain. In order to reproduce the problem, I uploaded a sample code. Please read the ReadMe.txt.
The first grid raise error when expand the top level row,but the second grid work well.
Thanks!
Hello Handy,, I added the following JS code at aspx page, but there will be such a issue. When I enter 1, the text box value changes to 100, when I want to change 100 to 200, I can not do it. Because when I enter the Backspace, the value of the text box will change to 100. Can you tell me how to solve it?Thanks!function WebInput1_OnDirty(controlId, dirtySourceType) { var WebInput1 = ISGetObject(controlId); if (WebInput1.GetData() > 1000) { WebInput1.SetValue("1000"); } if (WebInput1.GetData() < 100) { WebInput1.SetValue("100"); } return true; }
Hello Handy,
, I added the following JS code at aspx page, but there will be such a issue. When I enter 1, the text box value changes to 100, when I want to change 100 to 200, I can not do it. Because when I enter the Backspace, the value of the text box will change to 100.
Can you tell me how to solve it?
function WebInput1_OnDirty(controlId, dirtySourceType) { var WebInput1 = ISGetObject(controlId); if (WebInput1.GetData() > 1000) { WebInput1.SetValue("1000"); } if (WebInput1.GetData() < 100) { WebInput1.SetValue("100"); } return true; }
Use OnBlur event and WebInput1.SetValueData method can solve it!
"-" is mean the integer less than 0.
1, I can limit the value type of text box to input . Such as (integer, numeric).2, if integer, you can only input "0-9"and" -. "3, if numeric, you can only input "0-9","-" and".".4, the text box can input empty string.5, when I input the illegal character,the text box value does not change to 0 .
Can you tell me the tow right EditFormat strings(Integer and numeric)?
Thanks,
Gavin.
Can you tell me the right EditFormat string to archive the feature?
Gavin
Hi Handy,
The following code can achieve the feature.But,there still have two issues,
1、When I input “1111”,then input "." (point), the value will be changed to "0".
2、If I entered the value, I can not clear the text box, text box value is always 0.
<ISWebInput:WebInput ID="WebIntInput2" runat="server" NumericInput="true"> <EditFormat Format="0" IsEnabled="true" Type="DynamicNumber"> </EditFormat> </ISWebInput:WebInput>
Can you tell me how to solve these issues?
Thanks a lot!
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname