This is a migrated thread and some comments may be shown as answers.

RadComboBox in Radgrid template column giving issues when changing index

1 Answer 17 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aaron
Top achievements
Rank 1
Aaron asked on 23 Oct 2014, 03:23 PM
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();

1 Answer, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 28 Oct 2014, 09:57 AM
Hi Aaron,

I am afraid I was unable to replicate the issue on my side. I prepared a small sample where I used your code to reorder the columns and on my side the RadComboBox works correctly. Could you please give it a try and let me know whether I need to apply some other settings in order to replicate the issue locally?

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Aaron
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Share this question
or