Problem 1:
I have found a link on how to adjust the width of declaritive columns through code behind:
http://www.telerik.com/help/aspnet-ajax/grdusingcolumns.html
protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
foreach(GridColumn column in RadGrid1.Columns)
{
if (column.UniqueName == "BirthDate")
{
(column as GridBoundColumn).ReadOnly = true;
(column as GridBoundColumn).DataFormatString = "{0:D}";
break;
}
}
RadGrid1.Rebind();
}
Although, when I use rebind() as in the example, the detailtable expand button stops working in my grid. When it is clicked the grid rebinds again and the rows never expand.
How do I get the Expand to work after implementing the above code?
Problem 2: How do I set the width of the columns in the code behind for the Detailtable? Can you please provide a simple example. Is it done in the PreRender event? Will I need to rebind the Detailtable as well?
Thanks so much for your time,
Kellie