Click here to Skip to main content
15,899,126 members
Home / Discussions / C#
   

C#

 
GeneralRe: crystal reports question Pin
Dave Kreskowiak26-May-04 5:34
mveDave Kreskowiak26-May-04 5:34 
GeneralRe: crystal reports question Pin
Heath Stewart26-May-04 5:37
protectorHeath Stewart26-May-04 5:37 
GeneralRe: crystal reports question Pin
Nick Seng26-May-04 15:34
Nick Seng26-May-04 15:34 
GeneralRe: crystal reports question Pin
blankg26-May-04 21:46
blankg26-May-04 21:46 
GeneralDuplicate menus with checkboxes Pin
goldoche26-May-04 5:16
goldoche26-May-04 5:16 
GeneralRe: Duplicate menus with checkboxes Pin
Heath Stewart26-May-04 5:32
protectorHeath Stewart26-May-04 5:32 
GeneralFun with a datagrid Pin
Adam °Wimsatt26-May-04 5:14
Adam °Wimsatt26-May-04 5:14 
GeneralRe: Fun with a datagrid Pin
DougW4826-May-04 5:23
DougW4826-May-04 5:23 
You'll need to create a DataGridTableStyle for you grid. This should get you started:

DataGridTableStyle style = new DataGridTableStyle();<br />
style.MappingName = "Table";  // Name of the DataTable<br />
<br />
DataGridColumnStyle Style1 = new DataGridTextBoxColumn();<br />
Style1.Width = 100; // Width of that column<br />
Style1.MappingName = "TableColumn1";  // Name of the column in the DataTable<br />
Style1.HeaderText = "Column1";  // This will be displayed as the column header<br />
<br />
DataGridColumnStyle Style2 = new DataGridTextBoxColumn();<br />
Style2.Width = 100; // Width of the column<br />
Style2.MappingName = "TableColumn2"; // Name of the column in the DataTable<br />
Style2.HeaderText = "Colunn2"; // This will be displayed as the column header<br />
<br />
style.GridColumnStyles.AddRange<br />
(<br />
   new DataGridColumnStyle[]<br />
   {<br />
	Style1, Style2<br />
   }<br />
);<br />
<br />
dataGrid1.TableStyles.Add(style);


As you can see, you can put any columns in your datagrid from your source that you choose, and omit the rest. You can do a lot with the datagrid, but this is a good starting point.
GeneralRe: Fun with a datagrid Pin
Adam °Wimsatt26-May-04 5:38
Adam °Wimsatt26-May-04 5:38 
GeneralDataadapter Updates Pin
MrJJKoolJ26-May-04 5:03
MrJJKoolJ26-May-04 5:03 
GeneralRe: Dataadapter Updates Pin
Heath Stewart26-May-04 5:13
protectorHeath Stewart26-May-04 5:13 
GeneralRe: Dataadapter Updates Pin
MrJJKoolJ26-May-04 5:23
MrJJKoolJ26-May-04 5:23 
GeneralRe: Dataadapter Updates Pin
Heath Stewart26-May-04 5:26
protectorHeath Stewart26-May-04 5:26 
GeneralRe: Dataadapter Updates Pin
MrJJKoolJ26-May-04 5:36
MrJJKoolJ26-May-04 5:36 
GeneralRe: Dataadapter Updates Pin
Heath Stewart26-May-04 5:40
protectorHeath Stewart26-May-04 5:40 
GeneralRe: Dataadapter Updates Pin
MrJJKoolJ26-May-04 5:42
MrJJKoolJ26-May-04 5:42 
QuestionCrystal Report Bug?? Pin
DougW4826-May-04 4:36
DougW4826-May-04 4:36 
GeneralChr() function in c# Pin
RB@Emphasys26-May-04 4:35
RB@Emphasys26-May-04 4:35 
GeneralRe: Chr() function in c# Pin
Dave Kreskowiak26-May-04 4:51
mveDave Kreskowiak26-May-04 4:51 
GeneralRe: Chr() function in c# Pin
Heath Stewart26-May-04 5:08
protectorHeath Stewart26-May-04 5:08 
GeneralRe: Chr() function in c# Pin
Dave Kreskowiak26-May-04 5:23
mveDave Kreskowiak26-May-04 5:23 
GeneralRe: Chr() function in c# Pin
RB@Emphasys26-May-04 7:39
RB@Emphasys26-May-04 7:39 
GeneralRe: Using UCOMIPersistFile interface in C# Pin
Heath Stewart26-May-04 3:27
protectorHeath Stewart26-May-04 3:27 
GeneralEventLogs... Again Pin
Andy *M*26-May-04 0:12
Andy *M*26-May-04 0:12 
GeneralRe: EventLogs... Again Pin
Dave Kreskowiak26-May-04 2:28
mveDave Kreskowiak26-May-04 2:28 

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.