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.
Syncfusion Feedback

Show specific columns from a bounded datatable

Thread ID:

Created:

Updated:

Platform:

Replies:

48895 Sep 6,2006 06:53 AM UTC Sep 6,2006 10:38 AM UTC Windows Forms 1
loading
Tags: Grouping
jamesb
Asked On September 6, 2006 06:53 AM UTC

How do a show specific columns from a datatable bound to a ggc?
For example, if a datatable (dt) has col1, col2, and col2

and the ggc is bound to the datatable (dt) like
ggc.DataSource = dt;

How do I show only col1 and col 3 in the grid?

Administrator [Syncfusion]
Replied On September 6, 2006 10:38 AM UTC

Hi James,

Use the VisibleColumns property of the GridTableDescriptor to show / hide / move the columns in the grid. Below is a code snippet

//For hide the "Col0" column
this.grid.TableDescriptor.VisibleColumns.Remove("Col0");

//For show the "Col0" column
this.grid.TableDescriptor.VisibleColumns.Add("Col0");

//For move columns in a grid.
this.grid.TableDescriptor.VisibleColumns.Move(1,2);

Thanks,
Haneef

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.

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

;