Hi,
My application has capabitily to design the forms at runtime and ll host to some server. that case I have to give the preview functionality for the radgridview to User.
So when user drag and drop the radgridview from the toolbox itself i need to display the popuation of the required columns with some test data.
I am capturing the event of the drag and drop through Idesignerhost and in that , I had put the following code. The code is executing fine but the databinding is not reflected in the gridview. but if we give datasoure in design time we are able to see the columns with all data. I need the same kind of functionality through code and columns will be decided through code.
My application has capabitily to design the forms at runtime and ll host to some server. that case I have to give the preview functionality for the radgridview to User.
So when user drag and drop the radgridview from the toolbox itself i need to display the popuation of the required columns with some test data.
I am capturing the event of the drag and drop through Idesignerhost and in that , I had put the following code. The code is executing fine but the databinding is not reflected in the gridview. but if we give datasoure in design time we are able to see the columns with all data. I need the same kind of functionality through code and columns will be decided through code.
DataTable myDataTable = new DataTable();
myDataTable.Columns.Add(
"ControlID", typeof(String));
myDataTable.Columns.Add(
"UpdateField", typeof(String));
myDataTable.Columns.Add(
"DisplayField", typeof(String));
DataRow row;
row = myDataTable.NewRow();
row[
"ControlID"] = "Data";
row[
"UpdateField"] = "Data";
row[
"DisplayField"] = "Data";
myDataTable.Rows.Add(row);
draggedGrid.DataSource = myDataTable;
draggedGrid.DataBind();
Pleae let me know if my question not make sense..
Many thanks in advance.
Raghu