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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

vb.net datagrid column header

Thread ID:





15846 Jun 29,2004 07:17 AM UTC Jun 30,2004 11:21 PM UTC WinForms 1
Tags: FAQ
Asked On June 29, 2004 07:17 AM UTC

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 11:21 PM UTC

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)


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon