Insert, Delete, Update in Grid View using ASP.NET
2016-08-23
0 0 0
no vote
Other
Earn points
Insert, Delete, Update in Grid View using ASP.NET
1.As we don't want to use datasource controls. Please delete "Object Data Source1" control from the webform.
2. Delete Data Source ID="Object Data ource1" from Grid View1. This should remove the dependency of Grid VIew1 on Object Data Source 1 control.
3. From the code behind file, delete lbInsert_Click() event handler method.
4. In the "Footer Template" of "EmployeeId" Template Field, please delete On Click="lbInsert_Click", as we no longer have this event handler method.
5. Delete "Command Field" column from Grid View1
6. Now, include a template field in the place of Command Field. This template field is used to display Edit, Update, Cancel and Delete link buttons. We don't want delete and cancel buttons to cause validation, so set Causes Validaion property of these buttons to false.
1.As we don't want to use datasource controls. Please delete "Object Data Source1" control from the webform.
2. Delete Data Source ID="Object Data ource1" from Grid View1. This should remove the dependency of Grid VIew1 on Object Data Source 1 control.
3. From the code behind file, delete lbInsert_Click() event handler method.
4. In the "Footer Template" of "EmployeeId" Template Field, please delete On Click="lbInsert_Click", as we no longer have this event handler method.
5. Delete "Command Field" column from Grid View1
6. Now, include a template field in the place of Command Field. This template field is used to display Edit, Update, Cancel and Delete link buttons. We don't want delete and cancel buttons to cause validation, so set Causes Validaion property of these buttons to false.
aspNet
更新
插入
使用
网格
视图
删除
Related Source Codes
Qt based supervision software
0
0
no vote
Cube based modeling and mesh generation
0
0
no vote
Automatically delete files
0
0
no vote
C # form update
0
0
no vote
Noise based using secondary data analysis routines
0
0
no vote
No comment