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.

Row selection row problems

Thread ID:

Created:

Updated:

Platform:

Replies:

4029 Apr 24,2003 05:42 AM Apr 24,2003 10:38 AM Windows Forms 1
loading
Tags: GridControl
Ramu
Asked On April 24, 2003 05:42 AM

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 10:38 AM

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);

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.

;