Get the current Data Item (row) on DataBinding an

2019-07-18 23:18发布

I need to setup each row in an ext.NET GridPanel in the OnDataBinding event. How can I get the current data item at server side?

<uc:GridPanel ID="egrBills" runat="server" Border="false" Layout="Fit">
 <Store>
  <ext:Store runat="server" OnDataBinding="OnDataBinding_EventHandler" ID="MainStore">
   <!-- ............ -->

 

protected void OnDataBinding_EventHandler(object sender, EventArgs e)
{
    //How do I get current data item?           
}

2条回答
戒情不戒烟
2楼-- · 2019-07-18 23:50
DataRowView dr = (DataRowView)e.Item.DataItem;
string CollegeName= Convert.ToString(dr["CollegeName"]);

Here the CollegeName is the name of the column it will give the value at per row on the OnDataBinding event

查看更多
SAY GOODBYE
3楼-- · 2019-07-18 23:58

With Ext.NET, there is no server-side row databinding event. The client-side <Renderer> functionality may be an option.

查看更多
登录 后发表回答