Jump to content
Xtreme .Net Talk

Customize Datagrid; Only display certain columns with defined names


Recommended Posts

Posted

--Using [VS C#.NET]--

 

Given a datagrid [dgDisplay] that is populated by a dataset [dsValues].

Thing is dsValues has 11 columns total of which I only want to display 3 in my DataGrid [Columns: Name, ID, Address].

However if I just blindly bind the datasource it displays all columns with the header names from the Database.

 

How do we customize which columns to display & what their headers are?

(I want to define my own column names that are more used friendly)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...