The Artima Developer Community
Sponsored Link •

C# Answers Forum
datagrid

1 reply on 1 page. Most recent reply: Jul 4, 2004 4:27 PM by Mohamed El Kerdany

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Raluca

Posts: 1
Nickname: ralu
Registered: May, 2004

datagrid Posted: May 9, 2004 5:37 AM
Reply to this message Reply
Advertisement
hello! does anyone know how can i set the width of a column in a datagrid (not the same value for each column)
pretty pls! 10x


Mohamed El Kerdany

Posts: 2
Nickname: kerdany
Registered: Jul, 2004

Re: datagrid Posted: Jul 4, 2004 4:27 PM
Reply to this message Reply
hello...

you will create a datagrid table style then u will assign each column style for it as follows :

DataGridTableStyle ts=new DataGridTableStyle();
ts.MappingName="Certificates";
ts.HeaderBackColor=System. Drawing.Color.LightSteelBlue;

DataGridColumnStyle Col1=new DataGridTextBoxColumn();
Col1.MappingName="cert_no";
Col1.HeaderText="Cert. #";
Col1.Width=80;
ts.GridColumnStyles.Add(Col1);

this.dataGrid1.TableStyles.A dd(ts);

hope i was clear :)

regards
kerdany

Flat View: This topic has 1 reply on 1 page
Topic: WSE 2.0 settings tool unavailable Previous Topic   Next Topic Topic: Smart client template solution ???

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use