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 Bernard,
Thanks very much! I have seen your attach samples, it's useful for me!
Now the problems that I consulted you have solved now , thank you very much! Now I have another problems, the WEBUI official website may has help documents for every control,but I didn't find it,would give me a link ? Because sometimes when I saw a client side events which wrote by javascript,but I was doubt about the meaning of the parameters,for example:in the samples
Client_GetCellElement.aspx
function GetCellElementByDate() { var s = ISGetObject("WebScheduler1");
var el = s.GetCellElement(new Date(2008, 2, 18, 9, 10, 10), 2, true);//what every parameters in Date? means 2/18/2008 9:10:10?
if (el != null) el.style.backgroundColor = "red"; }
I don't know the code that was bold....
thank you very much! I have solve my doubtful point now! if I want to trigger the event oninitializedatasource="WebGrid1_InitializeDataSource"
I have seen your sample,you wrote the filter code in behind,you didn't trigger the event such as InitializeDatabase PrepareDatabind and InitializeLayout,so they don't excute the filter code?
for my before code it has oninitializedatasource="WebGrid1_InitializeDataSource"
oninitializelayout="WebGrid1_InitializeLayout1" onpreparedatabinding="WebGrid1_PrepareDataBinding1" ,your codes don't has these event, would you please have a try? thank you very much!
thank you for your help,but I still have some doubts,for example:I make a grid ,it has some columns,such as StuNo,StuName,StuSex,StuGrade,StuClass,StuTelNo,StuAdd,now I want to set the property of StuNo to EditType="NoEdit",see the before codes as follows,
<ISWebGrid:WebGrid ID="WebGrid1" runat="server" Height="301px" UseDefaultStyle="True" Width="813px" DataSourceID="ISDataSource1" DataMember="BIAO" DefaultStyleMode="Elegant"> <RootTable DataKeyField="StuNo" Caption="BIAO" DataMember="BIAO" ColumnFooters="Yes"> <Columns> <ISWebGrid:WebGridColumn Caption="StuNo" DataMember="StuNo" Name="StuNo" EditType="NoEdit" Width="100px" AggregateFunction="Count" FooterText="总学生数"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuName" DataMember="StuName" Name="StuName" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuSex" DataMember="StuSex" Name="StuSex" Width="100px" EditType="WebComboNET" WebComboID="WebCombo3"> <ValueList DataMember="TbSex1" DataTextField="StuSex" DataSourceID="ISDataSource1" DataValueField="StuSex"> </ValueList> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuGrade" DataMember="StuGrade" Name="StuGrade" Width="100px" EditType="WebComboNET" WebComboID="WebCombo1"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuClass" DataMember="StuClass" Name="StuClass" Width="100px" EditType="WebComboNET" WebComboID="WebCombo2"> <ValueList DataMember="TbClass" DataSourceID="ISDataSource1" DataTextField="StuClass" DataValueField="StuClass"> </ValueList> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuTelNo" DataMember="StuTelNo" Name="StuTelNo" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="StuAdd" DataMember="StuAdd" Name="StuAdd" Width="100px"> </ISWebGrid:WebGridColumn> <ISWebGrid:WebGridColumn Caption="ExistFlag" DataMember="ExistFlag" Name="ExistFlag" Width="100px"> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <LayoutSettings AllowDelete="Yes" AllowContextMenu="true" AllowEdit="Yes" AllowAddNew="Yes" AllowFilter="Yes" PagingMode="ClassicPaging" AllowExport="Yes"> </LayoutSettings> </ISWebGrid:WebGrid>
I write a filter code in behind:
protected void WebGrid1_InitializeDataSource(object sender, DataSourceEventArgs e) { SqlConnection sqlcon = new SqlConnection("Data Source = (local); Database = su; Uid = sa; Pwd = sss123456;"); string SqlStr = "select * from BIAO"; SqlDataAdapter da = new SqlDataAdapter(SqlStr, sqlcon); DataSet ds = new DataSet(); try { sqlcon.Open(); da.Fill(ds); e.DataSource = ds; } catch (Exception ee) { Response.Write(ee.Message); } finally { sqlcon.Close(); } }
protected void WebGrid1_PrepareDataBinding(object sender, DataSourceEventArgs e) { if (!IsPostBack) { WebGrid1.RetrieveStructure(); } if (WebCombo1.Text != "") { WebGridFilter a = new WebGridFilter(); a.ColumnMember = "StuGrade"; a.FilterType = ISNet.WebUI.WebGrid.ColumnFilterType.EqualTo; a.FilterText = WebCombo1.Text; WebGrid1.RootTable.FilteredColumns.Add(a); if (WebCombo2.Text != "") {
WebGridFilter b = new WebGridFilter(); b.ColumnMember = "StuClass"; b.FilterType = ISNet.WebUI.WebGrid.ColumnFilterType.EqualTo; b.FilterText = WebCombo2.Text; WebGrid1.RootTable.FilteredColumns.Add(b); } }
}
protected void WebGrid1_InitializeLayout(object sender, LayoutEventArgs e) { e.Layout.AllowFilter = ISNet.WebUI.WebGrid.Filter.Yes;
now i just konw that the filter code cause the StuNo's NoEdit didn't work,it still can editable,but i don't konw why,are they have some conflict when they used at the same time,would please give me some ideas? thank yo very much!
I have found the problem that make the setting noedit not work,i wrote a filter code behind in initializedatasource,preparedatabind and initializelayout,such as follows:
when i open these codes,the properties of one column NoEdit that does not work,it still can edit.i don't konw why ,would please give me a hand,thanks very much!
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