I have a Radgrid with a RadComboBox in a templateColumn. My other columns are AutoGenerated. By default the template column comes as the first column in the grid. If I leave it like that, it will work just fine. But whenever I change the index of it (and it actually moves), the RadComboBox in the first 9 rows stops working. From row 10 until the last it works again. I also tried with Autogenerate= false. Same issue.The code is use to change the index is in the aspx.cs file, gets called on PreRender Event and looks like this:
GridColumn c = RadGrid1.MasterTableView.GetColumnSafe("Temp");
if (c != null)
{
int total = RadGrid1.MasterTableView.RenderColumns.Count() - 2;
for (int i = total; i >= 2; i--)
{
RadGrid1.MasterTableView.RenderColumns[i + 1].OrderIndex = i - 1;
}
c.OrderIndex = total + 1;
}
RadGrid1.MasterTableView.Rebind();
GridColumn c = RadGrid1.MasterTableView.GetColumnSafe("Temp");
if (c != null)
{
int total = RadGrid1.MasterTableView.RenderColumns.Count() - 2;
for (int i = total; i >= 2; i--)
{
RadGrid1.MasterTableView.RenderColumns[i + 1].OrderIndex = i - 1;
}
c.OrderIndex = total + 1;
}
RadGrid1.MasterTableView.Rebind();