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

How can I select column in GridControl from code?

Thread ID:





15317 Jun 16,2004 07:33 AM UTC Jun 16,2004 07:42 AM UTC WinForms 1
Tags: GridControl
Andrey Plinda
Asked On June 16, 2004 07:33 AM UTC

If user select column 1, I need to select 3, 5, 7, 9 columns. Best regards.

Administrator [Syncfusion]
Replied On June 16, 2004 07:42 AM UTC

One way you can do this is to handle the SelectionsChanged event.
private void gridControl1_SelectionChanged(object sender, GridSelectionChangedEventArgs e)
		this.gridControl1.Selections.SelectRange(GridRangeInfo.Col(3), true);
		this.gridControl1.Selections.SelectRange(GridRangeInfo.Col(5), true);
		this.gridControl1.Selections.SelectRange(GridRangeInfo.Col(7), true);
		this.gridControl1.Selections.SelectRange(GridRangeInfo.Col(9), 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

Live Chat Icon For mobile
Live Chat Icon