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

Display Grid Column Headings with no Data

Thread ID:





16708 Jul 22,2004 09:35 AM UTC Jul 22,2004 10:35 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On July 22, 2004 09:35 AM UTC

Hi I have a DBG which has not yet been bound to a datasource and I have used the designer to setup the columns. I would like to get the column headings to display before I load the grid from my datasource. Any way to do this? I was thinking of using a dummy dataset with a blank datarow. Thanks in advance. Mark (vb.net)

Administrator [Syncfusion]
Replied On July 22, 2004 10:35 AM UTC

So you set up GridBoundColumns in the designer, then at runtime, you want to set an empty grid with the proper column headers until you set teh real DataSource later. Is this what you want? If so, in formload you can try setting the grid.DataSource to an empty DataTable. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.GridDataBoundGrid1.DataSource = New DataTable("emptytable") End Sub


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