Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 4th, 2005, 6:49 PM   #1
Arla
Hobbyist Programmer
 
Join Date: Mar 2005
Posts: 164
Rep Power: 4 Arla is on a distinguished road
About DataGrids and Styles

Currently I'm using a datagrid to display data, seems okay, but I have a few questions around the general use of them...

Currently in my code I have the following

			DataGridTableStyle ts1 = new DataGridTableStyle();
			ts1.MappingName = error.Return.TableName;
			
			DataGridColumnStyle col1 = new DataGridTextBoxColumn();
			col1.MappingName = "return_code";
			col1.HeaderText = "Return Code";
			col1.Width = 70;
			ts1.GridColumnStyles.Add(col1);
			
			DataGridColumnStyle col2 = new DataGridTextBoxColumn();
			col2.MappingName = "description";
			col2.HeaderText = "Description";
			col2.Width = 380;
			ts1.GridColumnStyles.Add(col2);
			
			DGReturnCode.TableStyles.Add(ts1);
			
			DGReturnCode.DataSource = error.Return;

This works, however is it possible to setup this stuff earlier than at runtime, can I setup styles either through the IDE (I'm using SharpDevelop) or by setting properties at the time I create the datagrid (or even through the datatable that I use as the datasource for the datagrid?)

Or do you just have to set it all up during the program?
Arla is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:49 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC