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.

Selection & Virtual Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

56762 Feb 20,2007 12:17 PM Feb 21,2007 02:34 PM Windows Forms 3
loading
Tags: GridControl
James Mulvey
Asked On February 20, 2007 12:17 PM

How can I handle selection in a virtual way with the virtual grid?

Basically I would expect the selection state to be party of the Style or have some virtual style callback - but it is not and is only held in the GridModelSelections class.

It looks as if the selection state is looked up deep within GridPaint there also seems to be no way to provide the state tracking for GridModelSelections (i.e. intercepting manipulations of the GridModelSelections and storing it in some custom form).

Am I missing something?
How could I achieve this?

Thanks,

James

Administrator [Syncfusion]
Replied On February 20, 2007 05:15 PM

Hi James,

Use the AlphaBlendSelectionColor property to change the selected cell color in a Grid.

this.grid.AlphaBlendSelectionColor = Color.Red;

Best regards,
Haneef

James Mulvey
Replied On February 21, 2007 06:18 AM

The suggestion will only change the selection color across the grid - I'm not looking to do that.
I want to supply the selection in a virtual manner - or tell the grid whether to paint a cell selected or not (i.e. not the selection color but the cell selected state).

Administrator [Syncfusion]
Replied On February 21, 2007 02:34 PM

Hi Jamulvey ,

Use the Model.Selections property to manages selected ranges in the grid. It allows you to add, remove and get selections, determines selection state of a specific cell.

//Select a cell
this.grid1.Model.Selections.Add(GridRangeInfo.Cell(RowIndex,ColIndex));

//Remove the selection
this.grid1.Model.Selections.Remove(GridRangeInfo.Cell(RowIndex,ColIndex));

//get the selection.
this.grid1.Model.Selections.GetSelectedRanges(out rangeList,true);

Best regards,
Haneef

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.

;