资源描述:
《ext2.0grid使用手册》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、ExtGrid2.0控件使用手册1、如何使用ExtGrid控件?----完整示例讲解1.1、显示数据1.1.1aspx代码,指定控件高度和宽度1.1.2加载数据,并指定列的编辑器(可用编辑器参考表格[可用编辑器类型])'GetthedatasourcewhatyouwanttobindtotheExtGridDimdtAsDataTable=DALExtGrid.GetStuden
2、ts().Tables(0)'GetthedatasourcewhatyouwanttobindtotheComboBoxoftheCountrycolumnDimdtCountryAsDataTable=DALExtGrid.GetCountryCodeAndName().Tables(0)'GetthedatasourcewhatyouwanttobindtotheComboBoxoftheCitycolumnDimdtCityAsDataTable=DALExtGrid.GetCityCodeAndName().
3、Tables(0)'GetthedatasourcewhatyouwanttobindtotheComboBoxoftheSexcolumnDimdtSexAsDataTable=Me.InitColDataTable()'SetTheExtGrid'sdatasourceMe.extStudent.DataSource=dt'AddallofthecolumnsyouwanttoshowtoclientinExtGrid.Me.extStudent.Columns.Add("StudentName","Name",1
4、60,_NewExtGrid.ExtEditor.TextField())Me.extStudent.Columns.Add("Sex","Sex",60,_NewExtGrid.ExtEditor.ComboBox("code",_"name",Me.InitColDataTable()))Me.extStudent.Columns.Add("SeatNo.","SeatNo",60,_NewExtGrid.ExtEditor.NumberField("seatNo",False))Me.extStudent.Col
5、umns.Add("Country","Country",120,_NewExtGrid.ExtEditor.ComboBox("Country","CountryCode",_"CountryName",dtCountry))Me.extStudent.Columns.Add("City","City",120,_NewExtGrid.ExtEditor.ComboBox("City","CityCode","CityName",dtCity))Me.extStudent.Columns.Add("E-mail","
6、Email",180,_NewExtGrid.ExtEditor.TextField())Me.extStudent.Columns.Add("BornDate","BornDate",_120,ExtColumnAlignType.Left,_NewExtGrid.ExtEditor.DateField("bornDate","d-M-Y"),"renderDate")Me.extStudent.Columns.Add("Mark","Mark",60,_NewExtGrid.ExtEditor.NumberFiel
7、d())Me.extStudent.Columns.Add("IsActive","Active",60,ExtColumnAlignType.Center,_NewExtGrid.ExtEditor.CheckBox(),"renderBoolean")1.1.3、页面效果图1.2、添加新记录,并设置默认值1.4.1、点击NewLine按扭时添加新记录onclick="extStudent.addRow();"1.4.2、指定设置默认值的方法8、er"Height="300px"Width="960px"AfterAddRow="afterAddLine"/>functionafterAddLine(record){record.set("Name","小傅");record.set("Active",true);}1.3、删除已有行,删除前检查是否可被删除1.3.1、点