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.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBound: Selection issue.

Thread ID:

Created:

Updated:

Platform:

Replies:

16093 Jul 6,2004 05:06 AM Jul 7,2004 01:53 AM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On July 6, 2004 05:06 AM

Hello. I have DataBoundGrid control on the form. There are some records with related records. I can select some records both from parent and related. But when I go to some parent record and expand it, selection jump to currently expanding record. I want the selection not missing. Is it possible ? Thanks.

Administrator [Syncfusion]
Replied On July 6, 2004 07:59 AM

I do not see this problem in this sample. I can select parent rows and child rows, and then expand another node without the selections changing. What are you doing differently? ExpandSample_6372.zip

Administrator [Syncfusion]
Replied On July 6, 2004 08:42 PM

The difference is in ListBoxSelectionMode property. I need the behavior like MultiSelected mode. in this mode, selections dissapeared when I press collapse button :(

Administrator [Syncfusion]
Replied On July 6, 2004 08:50 PM

By the way, does selection work same way in virtual mode of grid ?

Administrator [Syncfusion]
Replied On July 7, 2004 01:53 AM

If you want your selections of child rows to persist across collapsing and expanding parent rows, then you will have to do this yourself. You can handle the RowsCollapsing event, and there, save the selected child rows in some way (Maybe a hashtable where teh key is the primary id value of the parent row and the value is a array of positions in the child table of the selected rows.) Then can handle the RowsExpanded event and check the hashtable for the parent primary id, and reselect the positions stored in the hashtable. It would take a little code to do, but I think it is doable. The slections behave essentailly the same in a GridControl as in a GridDataBoundGrid. A virtual grid is a GridControl.

CONFIRMATION

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.

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.

;