We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

vb.net datagrid column header

Thread ID:

Created:

Updated:

Platform:

Replies:

15846 Jun 29,2004 03:17 AM Jun 30,2004 07:21 PM Windows Forms 1
loading
Tags: FAQ
harshal
Asked On June 29, 2004 03:17 AM

how do i change the column header in the datagrid ? i''m getting + sing and " table " on the datagrid at the loading ?how do i remove it ?

Administrator [Syncfusion]
Replied On June 30, 2004 07:21 PM

You''ll have to create DataGridTableStyle and add GridColumnStyle to it somthing like this ''Bind you DataGrid to the datasource. DataGrid1.DataSource = myDataSet.Tables("TableName") Dim myTS As New DataGridTableStyle ''Set MappingName for TableStyle myTS.MappingName = "TableName" ''Create 1st column. Dim myCOL As New DataGridTextBoxColumn With myCOL .MappingName = "App_ID" .HeaderText = "Applicant ID" End With myTS.GridColumnStyles.Add(myCOL) ''Create 2nd column. myCOL = New DataGridTextBoxColumn With myCOL .MappingName = "FirstName" .HeaderText = "First Name" End With myTS.GridColumnStyles.Add(myCOL) ''Add TableStyle to the DataGrid. DataGrid1.TableStyles.Add(myTS)

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;