We have a gridview with defined column. Then User can rearrange the columns and we are saving the display index for the columns. After that we are loading the grid and applying the changes which we saved. But wha is happening it creating a blank column which is not really a column. this happen when you move a column from first to the last.
Example
Column1, Column2, Column3
we rearrange the columns
Column2, Column3, Column1
then we saved the display index for each.
then we loop through all the columns of the grid and then find the matched displayindex from another collection where it saved. So What is happening here it find the column1 first and then set it display index to 2 and then all other columns. Here it insert an balnk column before the Column1.
Please review and Suggest.
Thank you
Hrushikesh Patel
Example
Column1, Column2, Column3
we rearrange the columns
Column2, Column3, Column1
then we saved the display index for each.
then we loop through all the columns of the grid and then find the matched displayindex from another collection where it saved. So What is happening here it find the column1 first and then set it display index to 2 and then all other columns. Here it insert an balnk column before the Column1.
Please review and Suggest.
Thank you
Hrushikesh Patel