Saturday, February 6, 2010

(.net datagrid control.) How do i isolate and access a value in a particular cell of the datagrid control?C#?

assume Column D, row 5





i would like some operation such as





String val = datagrid1.valueAt(D,5)//psuedo


Apr 21, 2006 at 4:27 am(.net datagrid control.) How do i isolate and access a value in a particular cell of the datagrid control?C#?
public void OnRowDataBound(Object sender, GridViewRowEventArgs e)


{


if (e.Row.RowState == DataControlRowState.Edit)


{


DataRowView rowView = (DataRowView)e.Row.DataItem;


string stringname = rowView[';namerow';].ToString();


DropDownList DropDownListname = (DropDownList)e.Row.FindControl(';namecnt鈥?br>

}





}











This is just a sample code copied and pasted from





our proj. Hope it will give u an idea

No comments:

Post a Comment