This is a migrated thread and some comments may be shown as answers.
GridView not updating
5 Answers 61 Views
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 2
John asked on 14 May 2009, 01:52 AM
I have the following situation.
        private void radMenuItem1_Click( object sender, EventArgs e )  
        {  
            dlgAssignSplits dlgSplits = new dlgAssignSplits();  
            if ( dlgSplits.ShowDialog() == DialogResult.OK )  
            {  
                //dlgSplits.Task  
                int insertAt = FindRowPosition();  
                ClipGrid gridItem = new ClipGrid();  
                List<ClipGrid> gridItemsList = UpdateClipTaskGrid();  //Gives back 6 rows  
                //gridItem = gridItemsList[insertAt];   // Changes the values in the row.  
                gridItem.Task = dlgSplits.Task;  
                gridItem.AssignedArtist = dlgSplits.Artist;  
                gridItem.AssignStatusDesc = dlgSplits.Status;  
 
                gridItemsList.Insert( insertAt, gridItem );  //gridItemsList has 7 Rows now  
 
                grdClipTask.DataSource = gridItemsList;  
                grdClipTask.Refresh();  //Form displays only 6 Rows.  
                  
                dlgSplits.Dispose();  
            }  
        } 


Please help me figure out why the stinkin grid won't update.

5 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 14 May 2009, 10:06 AM
Hi John,

Thank you for contacting us. I guess that using the Update function with a reset parameter might fix the issue you are experiencing:

RadGridView1.GridElement.Update(GridUINotifyAction.Reset); 

Please note that you have to use this with caution because it can slow down the performance of your grid substantially.

I am not sure what exactly causes the issue. Can you send us a sample application so that we can debug it and perhaps provide a fix for Q2 2009 or better work-around for the time being. Please note that you have to open a new support ticket so that you can attach files.

Greetings,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
John
Top achievements
Rank 2
answered on 14 May 2009, 10:16 AM
This seems like the common answer these days.  Do you think I have time to "create you a small sample app" to debug your code every time I find a bug?  Guess I should have purchased the component Art tools.
0
Accepted
Nick
Telerik team
answered on 14 May 2009, 12:32 PM
Hi John,

Please excuse me for not noticing that you are using a list -- you need a BindingList. The latter implements several interfaces that notify the grid about changes in the collection and hence update the UI. I hope that this helps. Please write me back if you have more questions. 

Regards,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
John
Top achievements
Rank 2
answered on 14 May 2009, 12:47 PM
That worked thank you.
JD
0
Anthony Terra
Top achievements
Rank 1
answered on 12 Mar 2010, 07:56 PM
a
Asked by
John
Top achievements
Rank 2
Answers by
Nick
Telerik team
John
Top achievements
Rank 2
Anthony Terra
Top achievements
Rank 1
Share this question
or