We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid + Hirachie View update

Thread ID:





8570 Nov 12,2003 01:38 PM UTC Nov 14,2003 09:24 AM UTC WinForms 1
Tags: GridControl
Georg Schmidt
Asked On November 12, 2003 01:38 PM UTC

Hi, I've found a way to update a hirachical table in a grid. But every time I update the record using the bound data table, the viewstate of all rows of the grid are refreshed. I use the CurrencyManager to inform the grid over the changes in the bound data table. Sample: CurrencyManager cm = (CurrencyManager) _datagrid.BindingContext[contiTestdaten1, "Testdaten"]; cm.Refresh(); Is there a way to keep the viewstate? When I did not call the cm.Refresh() method, the grid did not know of any changes in the data table, and the + for the hirachic records are not displayed/browsable. Thanks in advance, Georg

Administrator [Syncfusion]
Replied On November 14, 2003 09:24 AM UTC

These problems all go away using the new GridTable object in upcoming 2.0 release (which we are working hard on to get out...) In the current version, I do not think you need to call cm.Refresh to make the changes appear in the grid. I think you just need to get the grid to redraw the affected row somehow. Attached is a little sample. As nodes are expanded and collapsed, the code subscribes to the currency manager changed event for the particular currency manager of the child list for that node. Then in the handler, it just does a grid Refresh to force the whole grid to redraw. If you do not want the whole grid to redraw, then you would have to go to the trouble of mapping the changed item from the currency manager to a particular row in the grid, and then just refresh that particular row. This is doable, but does take some code as it requires recursion to handle this task. If you need to go to this trouble, we do have a sample showing how this would work. But it is somewhat simpler to refresh the whole grid, and depending upon the visible size of your grid and the frequency of updates, you may not require the more specific update code.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon