This question is locked. New answers and comments are not allowed.
Hi,
I have a gridview in my silverlight application. In which I am adding columns and data to it dynamically, now the problem is that, columns which are not visible in UI ( i.e. columns are added but it is out of UI, so user has to scroll horizontally to view that columns value ).
So the values which are set to that columns are lost. Even I am not getting those columns reference in gridview_rowloaded event
e.g. suppose the gridview has 9 (0-8) columns and only 8 are currently visible in UI and the 9th one is out of UI, so scroll bar appears automatically to view that column, now if we set value to 9th column it gives error : Index
I have a gridview in my silverlight application. In which I am adding columns and data to it dynamically, now the problem is that, columns which are not visible in UI ( i.e. columns are added but it is out of UI, so user has to scroll horizontally to view that columns value ).
So the values which are set to that columns are lost. Even I am not getting those columns reference in gridview_rowloaded event
e.g. suppose the gridview has 9 (0-8) columns and only 8 are currently visible in UI and the 9th one is out of UI, so scroll bar appears automatically to view that column, now if we set value to 9th column it gives error : Index
private void gridview1_RowLoaded(object sender, RowLoadedEventArgs e) { e.Row.Cells[8].Content = "test"; // Error : Not a valid Index // // If we insert a break point here the value of cell count property is 8 (0-7) // }
One solution which I found is that if I resize the gridview so that it displays all the columns then this problem will not happen. But in my situation I am not able to resize it.
So please help me with my problem ASAP.
Thanks,
Yogesh
