-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: VadivelMohanakrishnan
Message 2 in Discussion

Hi Shekar,   1. Reference the Textbox property of the datagridcolumnstyle,  2. Create 
a new Font object,  3. Set the font property of the Textbox to the new Font created.   
 For example:   Dim da As New SqlDataAdapter("your query", "ur connection string")
Dim ds As New DataSet()
Dim dt As DataTable   Dim ts As New DataGridTableStyle()
Dim dgcs As DataGridColumnStyle
Dim dgtbc As DataGridTextBoxColumn   'Fill the dataset
da.Fill(ds, "TestTable")
dt = ds.Tables("TestTable")
DataGrid1.DataSource = dt
ts.MappingName = dt.TableName   'Add new tablestyle to the datagrid
DataGrid1.TableStyles.Add(ts)   'Loop through all gridcolumnstyles and set the 
properties for the Textbox object
For Each dgcs In DataGrid1.TableStyles.Item(0).GridColumnStyles
dgtbc = dgcs
 With dgtbc.TextBox
 .BackColor = Color.Aqua
 .ForeColor = Color.Red
 Dim fnt As New Font("Arial", 8, FontStyle.Bold, GraphicsUnit.Point, New Byte())
 .Font = fnt
End With
Next   Best Regards Vadivel   You should never try the obvious until you've cursed, 
screamed, shouted and blamed hardware, software and everyone around you. 

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to