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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Selected rows get shifted up

Thread ID:





33555 Aug 22,2005 11:32 PM UTC Aug 23,2005 12:41 AM UTC WinForms 1
Tags: GridControl
Bidin Dinesababu
Asked On August 22, 2005 11:32 PM UTC

Hi, I am facing a problem with DataBoundGrid. ( Using syncfusion 3.2 ). When I refresh the grid with data changes, I need to retain the row selections. Grid has filter bar wired to it. When grid gets refreshed, the filter bar gets re - wired ( to update the data changes to filter bar ). The behaviour I am getting is when the filter bar gets rewired ( FilterBar.WireGrid( this ) ) the row selection shifts one row up. Eg: if row 3 was selected before, it moves up to row 2. Checked the syncfusion code and this happens when grid filter bar is unwired. This operation shifts the selection one row up, which is correct as the filter row is getting removed. But when the filter gets re-wired this selection is not getting re calculated. Is there any easy way to get around this issue? THanks, Bidin

Administrator [Syncfusion]
Replied On August 23, 2005 12:41 AM UTC

You can manually set the current cell and select the row after you call WireGrid.
private void button1_Click(object sender, EventArgs e)
	//add filter bar
	if(theFilterBar != null && !theFilterBar.Wired)
		int row = this.gridDataBoundGrid1.CurrentCell.RowIndex;
		int col = this.gridDataBoundGrid1.CurrentCell.ColIndex;
		this.gridDataBoundGrid1.CurrentCell.MoveTo(row + 1, col);
		this.gridDataBoundGrid1.Selections.SelectRange(GridRangeInfo.Row(row + 1), true);
		this.label2.Text = "";
private void button2_Click(object sender, EventArgs e)
	//remove filter bar
	int pos = this.gridDataBoundGrid1.Binder.CurrentPosition;
	this.gridDataBoundGrid1.Binder.CurrentPosition = pos;


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