Rowupdating e keys does updating apps use data

使用gridview控件,后台绑定的数据,在Grid View1_Row Deleting(object sender, Grid View Delete Event Args e)和Grid View1_Row Updating(object sender, Grid View Update Event Args e)事件中,使用e.keys[0].

To String()无法获得主键,用count得到的数值为0。gridview的Data Key Names="id"已经设置。 e.keys["id"]同样无效,会提示“异常详细信息: System. Null Reference Exception: 未将对象引用设置到对象的实例。 ” 而e.keys[0]则提示 “索引超出范围” 另外试过,如果用数据源控件就没问题。 用. Data Keys代替能解决问题,不过我想搞清楚这个到底是什么问题,网上搜到的都是替代解决方法,我自己也用.

The missing link here seems to be getting the Data Source or the Grid View (or both) to refresh.

Debugging this has been a pain and I can't really tell (or I don't know how to tell) whether the problem is updating the objects of my Data Source/Grid View, or whether it's sending a call back to the user after those objects have been updated.

Is Bound Using Data Source ID; Grid View Update Event Handler handler1 = (Grid View Update Event Handler) base.

Get String("Grid View_Unhandled Even t", new object[] { this.

I've a sample below, the Grid View Template is bound to Category Name.

Last modified 11-Nov-2019 17:57