Refresh of a Rad Grid View

Posted by Ab Himmit on 19-Aug-2016 06:10

What is a proper way to refresh a rad grid view after a record has been updated on the server and the dataset has been returned. The rad grid view is bound to a bindingsource object.

I have used the radgridview.refresh() method, this doesn't work properly. After the refresh my records are all strangely sorted.

Thanks for your input.

All Replies

Posted by Laura Stern on 19-Aug-2016 07:18

Try using the RefreshAll() method on the BindingSource instance.

Posted by Ab Himmit on 19-Aug-2016 07:26

I have tried that, but no proper result. I have noticed that when I update the field on a detail screen, which is bound to BindingSource, then the grid behaves strangely. Somehow the grid/Bindingsource notices the update of the field and auto refreshes the grid. But in a strange way. The records are then all wrong sorted and the grid looks strange, with empty rows.

Did you encounter this before?

Posted by Laura Stern on 19-Aug-2016 07:36

Sounds like you need to reopen the query.  You can't just have a new set of rows.  The query needs to have the correct set of records in the result set.  Did you try that?

Posted by Ab Himmit on 19-Aug-2016 09:21

I did try it before, but it gave me some strange behavior. I have implemented it again with some improvements, and now it seems to work fine.  Thanks.

Posted by Laura Stern on 19-Aug-2016 09:26

Yeah.  Glad to hear that.

This thread is closed