Get the current Data Item (row) on DataBinding an Ext.NET GridPanel

守給你的承諾、 提交于 2019-12-11 00:31:29

问题


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?           
}

回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/6979263/get-the-current-data-item-row-on-databinding-an-ext-net-gridpanel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!