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

How do I remove the grid lines in the GridDataBoundGrid Control?

Thread ID:





33515 Aug 22,2005 02:21 PM UTC Aug 22,2005 03:15 PM UTC WinForms 3
Tags: GridControl
Atith Pagdi
Asked On August 22, 2005 02:21 PM UTC

I''m using the GDBD to show some data and have multi row records in there. I''ve incorporated the following in my code to enable selection of the complete row whenever the user clicks on a cell that has some data: private void dgEx_CurrentCellActivating(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellActivatingEventArgs e) { e.ColIndex = 0; } But when the user clicks on an empty cell (some have been specified in the layout), only the single row gets selected. Is there anyway I can enable the selection of the complete row no matter which cell in the datarow record the user clicks? Thanks

Administrator [Syncfusion]
Replied On August 22, 2005 02:33 PM UTC

Try setting grid.ListBoxSelectionMode = SelectionMode.One.

Atith Pagdi
Replied On August 22, 2005 02:37 PM UTC

I already have done that... that''s why the whole row''s getting selected when I click on a cell that has SOME data in it. But when I click on an empty cell that has no data in it, the single row containing that cell is selected in some other colour, but not the whole datarow, the way it is in the previously stated case. Thanks >Try setting grid.ListBoxSelectionMode = SelectionMode.One.

Administrator [Syncfusion]
Replied On August 22, 2005 03:15 PM UTC

I missed the multi-row part of your question. Try handing the grid.Model.SlectionChanged event, and there select the other row while a single row has been selected.
private void Model_SelectionChanged(object sender, GridSelectionChangedEventArgs e)
	if(e.Range.IsRows && e.Range.Height == 1)
		int row = - 1;
		if(e.Range.Top % 2 == 0)
			row = e.Range.Top + 1;
			row = e.Range.Top - 1;
		this.gridDataBoundGrid1.Selections.SelectRange(GridRangeInfo.Cells(row, 1, row, this.gridDataBoundGrid1.Model.ColCount), true);


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