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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Row selection row problems

Thread ID:





4029 Apr 24,2003 09:42 AM UTC Apr 24,2003 02:38 PM UTC WinForms 1
Tags: GridControl
Asked On April 24, 2003 09:42 AM UTC

Hi, I'm having GDBG. first user makes a selection. and there is another button, which shuld de-select the current row. but still the arrow icon is in the grid. its not deselecting also. Also, how to get the all the selected rows? (multiple row selection). Many Thx for help Ram

Administrator [Syncfusion]
Replied On April 24, 2003 02:38 PM UTC

The arrow icon in the row marks the Position property of the CurrencyManager for the grid's datasource. If you really want to remove it, one way would be to handle PrepareViewStyleInfo and set the celltype to the standard header type that does not provide this icon. You could have a property in your form that indicates whether to show the icon or not, an dthen set this property in your button handler. In prepareViewStyleInfo, you would check this property as one of your conditions.
private void gridDataBoundGrid1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
	if(e.ColIndex == 0 && this.dontShowIcon)
		e.Style.CellType = "Header";
Are you using ListBoxSelectionMode? This mode in conjuction with the CurrencyManager.Position property could explain why the row will not 'unselect'. Here is a little loop that shows all row selections. If you are using other kinds of selections, there is more work to be done.
foreach(GridRangeInfo r in gridControl1.Selections.Ranges) 
for(int row = r.Top; row <= r.Bottom; row++)
	Console.WriteLine("hit on row " + row);


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