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.
Syncfusion Feedback

GridListControl

Thread ID:

Created:

Updated:

Platform:

Replies:

34816 Sep 16,2005 08:10 AM Sep 19,2005 02:06 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 16, 2005 08:10 AM

Hi together, I have got a gridlistcontrol. How can I make the selected item color just the same as the color of other controls like listview or combobox. The selection color of a gridlistcontrol is light blue and the normal selected color of other controls is blue? Kind regards Franz

Administrator [Syncfusion]
Replied On September 16, 2005 10:09 AM

Hi Franz, You could handle the PrepareViewStyleInfo to do this. this.ListBox1.Grid.AlphaBlendSelectionColor = Color.FromArgb(1,0,0,0); this.ListBox1.Grid.PrepareViewStyleInfo +=new GridPrepareViewStyleInfoEventHandler(Grid_PrepareViewStyleInfo); private void Grid_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { if(e.ColIndex > 0 && e.RowIndex > 0) { GridRangeInfoList rangeList; if(this.ListBox1.Grid.Selections.GetSelectedRanges(out rangeList, false) && rangeList.AnyRangeIntersects(GridRangeInfo.Cell(e.RowIndex, e.ColIndex))) { e.Style.BackColor = Color.DarkBlue; e.Style.TextColor = Color.White; } } } Best regards, Jay N

Administrator [Syncfusion]
Replied On September 19, 2005 02:06 AM

Thanks Jay, that works great.

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.

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

;