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

C#

 
GeneralRe: Rich Text Box (Visual c#.net) Pin
naresh_pandey1326-Mar-04 1:59
naresh_pandey1326-Mar-04 1:59 
GeneralRich Text Box Pin
naresh_pandey1324-Mar-04 18:51
naresh_pandey1324-Mar-04 18:51 
GeneralSmart Build Pin
blackthunder00124-Mar-04 18:09
blackthunder00124-Mar-04 18:09 
GeneralRe: Smart Build Pin
Heath Stewart24-Mar-04 20:11
protectorHeath Stewart24-Mar-04 20:11 
GeneralRe: Smart Build Pin
blackthunder00124-Mar-04 23:42
blackthunder00124-Mar-04 23:42 
GeneralRe: Smart Build Pin
Heath Stewart25-Mar-04 4:02
protectorHeath Stewart25-Mar-04 4:02 
GeneralDataGrid Control Question Pin
DougW4824-Mar-04 16:54
DougW4824-Mar-04 16:54 
GeneralRe: DataGrid Control Question Pin
ian mariano24-Mar-04 17:28
ian mariano24-Mar-04 17:28 
Just create a new DataTable, add a few columns of the appropriate type, and set the grid data source to the new table Wink | ;) You have to make sure the grid allows new:

DataTable   t = new DataTable();
 
t.TableName = "test";
t.Columns.AddRange(
   new DataColumn[] {
      new DataColumn("one", typeof(string)),
      new DataColumn("two", typeof(int)),
      new DataColumn("three", typeof(DateTime)),
      new DataColumn("four", typeof(string)),
      new DataColumn("five", typeof(bool)),
      new DataColumn("six", typeof(double))
   });
 
dataGrid1.DataSource = t;


The above code in my small test app was in the constructor of a form after the InitializeComponent() call. I created a C# Windows Forms project, added a DataGrid, then added the above code.

It should be a simple starting point.

Ian Mariano - http://www.ian-space.com/


"We are all wave equations in the information matrix of the universe" - me

GeneralRe: DataGrid Control Question Pin
Heath Stewart24-Mar-04 17:31
protectorHeath Stewart24-Mar-04 17:31 
Questiongetting mouse position? Pin
azusakt24-Mar-04 16:29
azusakt24-Mar-04 16:29 
AnswerRe: getting mouse position? Pin
Heath Stewart24-Mar-04 17:24
protectorHeath Stewart24-Mar-04 17:24 
QuestionHow can I save an icon? Pin
Flack24-Mar-04 14:40
Flack24-Mar-04 14:40 
AnswerRe: How can I save an icon? Pin
Heath Stewart24-Mar-04 17:21
protectorHeath Stewart24-Mar-04 17:21 
GeneralCapturing ListView scrollbar events Pin
chuck05324-Mar-04 10:45
chuck05324-Mar-04 10:45 
GeneralRe: Capturing ListView scrollbar events Pin
Heath Stewart24-Mar-04 11:24
protectorHeath Stewart24-Mar-04 11:24 
GeneralTray Icon Pin
RickZ24-Mar-04 10:34
RickZ24-Mar-04 10:34 
GeneralRe: Tray Icon Pin
Dave Kreskowiak24-Mar-04 11:08
mveDave Kreskowiak24-Mar-04 11:08 
GeneralRe: Tray Icon Pin
SapiensBwG26-Mar-04 5:41
SapiensBwG26-Mar-04 5:41 
GeneralAssembly - from Unmanaged Pin
Kant24-Mar-04 10:28
Kant24-Mar-04 10:28 
GeneralRe: Assembly - from Unmanaged Pin
Dave Kreskowiak24-Mar-04 10:33
mveDave Kreskowiak24-Mar-04 10:33 
GeneralRe: Assembly - from Unmanaged Pin
Kant24-Mar-04 11:07
Kant24-Mar-04 11:07 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart24-Mar-04 11:22
protectorHeath Stewart24-Mar-04 11:22 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 6:16
Jeremy Kimball25-Mar-04 6:16 
GeneralRe: Assembly - from Unmanaged Pin
Heath Stewart25-Mar-04 8:08
protectorHeath Stewart25-Mar-04 8:08 
GeneralRe: Assembly - from Unmanaged Pin
Jeremy Kimball25-Mar-04 9:05
Jeremy Kimball25-Mar-04 9:05 

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.