Thank you but how can I programmatically go to a ''Record'' (without have to click on it) in my GridGroupingControl.
I''d like to know also how to create a Template column in a GridGroupingControl (for example a template column using a Label and a TextBox controls) and databind data with a column from a dataset. After that I will write in my Page_Load() definition :
GridGroupingControl1.DataSource = dataset1;
GridGroupingControl1.DataBind();
To resume I''d like to have in one column of my GridGroupingControl a Label and a TextBox databinded with the same column from a dataset, so in my Label and TextBox I will have the same information.
This is not working :
- in my aspx file
<%#GetUserId(Container)%>
<%#GetUserId(Container)%>
- in my aspx.cs file
protected string GetUserId(GridCell container)
{
string TEST;
Record rowRecord=container.Row.Record;
TEST = rowRecord.GetValue("user_id").ToString();
return TEST;
}
I get this two errors :
"Object reference not set to an instance of an object."
Line 45: TEST = rowRecord.GetValue("user_id").ToString();
''TextBox'' cannot have children of type ''DataBoundLiteralControl''.
Line 30:
>Hi Claudio,
>
>You can use the GridGroupingControl1.FormEditCell.FindControl method. Take a look at GridGroupingControl1_BarButtonItemClicked() event in the Editing\FormEditMode sample (FormEditModeDemo.aspx.cs). Here is a snippet of code used for a TextBox control:
>
>TextBox tb = this.GridGroupingControl1.FormEditCell.FindControl("CustomerIDTB") as TextBox;
>
>Regards
>Arun
>