Hi all..
Please help me out with code-behind coding ..
I have a method -
private void BindGridView()
{
Datatable table ;
Gridview grdv ;
table = new Datatable();
grdv = new GridView();
if(table != null)
{
grdv . datasource = table;
grdv.databind();
Here -
I want the following -
How to do this is code - behind ?? Please guide !!
}
}
My Requirement is - I have to do nothing on aspx page.
I have to do all in code-behind - Default.aspx.cs page.
Please help..its a bit urgent... Thanks in advance !!
Yadlapalli SrikanthPosted Sep 17, 2015, 5:11 AM
grd1.RowDataBound+= new GridViewRowEventHandler(grd1_RowDataBound);
Riddhi ValechaPosted Sep 16, 2015, 8:00 AM
Yadlapalli SrikanthPosted Sep 16, 2015, 7:37 AM
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lbl= (Label)e.Row.FindControl("lbl");
lbl.Text = (e.Row.RowIndex+1).ToString();
}
}