Click here to Skip to main content
15,911,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: Can i add a background image to the Windows datagrid? Pin
RajeshGuptha19-Apr-05 19:14
RajeshGuptha19-Apr-05 19:14 
GeneralRe: Can i add a background image to the Windows datagrid? Pin
Jim Matthews20-Apr-05 3:14
Jim Matthews20-Apr-05 3:14 
GeneralRe: Can i add a background image to the Windows datagrid? Pin
RajeshGuptha20-Apr-05 7:20
RajeshGuptha20-Apr-05 7:20 
GeneralTray Icons Pin
CStiefeling19-Apr-05 8:09
CStiefeling19-Apr-05 8:09 
GeneralRe: Tray Icons Pin
leppie19-Apr-05 19:11
leppie19-Apr-05 19:11 
QuestionDb2 connection?? Pin
trk_wakil19-Apr-05 7:38
trk_wakil19-Apr-05 7:38 
GeneralDragOver assistance needed... Pin
new_phoenix19-Apr-05 7:27
new_phoenix19-Apr-05 7:27 
GeneralRe: DragOver assistance needed... Pin
John Fisher19-Apr-05 8:27
John Fisher19-Apr-05 8:27 
GeneralRe: DragOver assistance needed... Pin
new_phoenix19-Apr-05 8:38
new_phoenix19-Apr-05 8:38 
GeneralRegex: Very basic question Pin
matthias s.19-Apr-05 5:42
matthias s.19-Apr-05 5:42 
GeneralRe: Regex: Very basic question Pin
dratcha19-Apr-05 6:52
dratcha19-Apr-05 6:52 
GeneralRe: Regex: Very basic question Pin
matthias s.19-Apr-05 12:23
matthias s.19-Apr-05 12:23 
GeneralRe: Regex: Very basic question Pin
leppie19-Apr-05 19:18
leppie19-Apr-05 19:18 
GeneralRe: Regex: Very basic question Pin
matthias s.20-Apr-05 0:16
matthias s.20-Apr-05 0:16 
GeneralRe: Regex: Very basic question Pin
leppie20-Apr-05 3:58
leppie20-Apr-05 3:58 
GeneralRe: Regex: Very basic question Pin
Member 163675520-Apr-05 23:39
Member 163675520-Apr-05 23:39 
GeneralRe: Regex: Very basic question Pin
leppie19-Apr-05 19:21
leppie19-Apr-05 19:21 
GeneralDatagrid formatting Pin
esjq19-Apr-05 4:55
esjq19-Apr-05 4:55 
GeneralRe: Datagrid formatting Pin
John Fisher19-Apr-05 8:14
John Fisher19-Apr-05 8:14 
GeneralRe: Datagrid formatting Pin
Luis Alonso Ramos19-Apr-05 9:17
Luis Alonso Ramos19-Apr-05 9:17 
Yes, check the DataGridTableStyle class. The basic idea is that you create one DataGridTableStyle object, and then add DataGridTextBoxColumn or other column types (check boxes por example) to the table style, only for the columns you want to display (use the MappingName property).

Here's an example, from some code I'm working on right now:
DataGridTableStyle style = new DataGridTableStyle();
style.MappingName        = dtZoneCollectors.TableName;

DataGridTextBoxColumn textCol = new DataGridTextBoxColumn();
textCol.MappingName           = "column_name";
textCol.HeaderText            = "Name as it will appear to the user";
textCol.Width                 = 200;
textCol.ReadOnly              = true;
style.GridColumnStyles.Add(textCol);

gridCollectors.TableStyles.Add(style);
It only adds one column, but hopefully you'll get the idea.

Good luck!

-- LuisR



Luis Alonso Ramos
Intelectix - Chihuahua, Mexico

Not much here: My CP Blog!

GeneralRe: Datagrid formatting Pin
esjq19-Apr-05 19:58
esjq19-Apr-05 19:58 
QuestionHow to select a check box and add to cart in C# Pin
userid_userid19-Apr-05 3:43
userid_userid19-Apr-05 3:43 
Question"Secure Electronic Transaction" in C#? Pin
msdawy19-Apr-05 3:30
msdawy19-Apr-05 3:30 
GeneralComboBox problem Pin
vuthaianh19-Apr-05 2:44
vuthaianh19-Apr-05 2:44 
GeneralRe: ComboBox problem Pin
MoustafaS19-Apr-05 4:25
MoustafaS19-Apr-05 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.