Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » How to reset column headers on datagrid?


How to reset column headers on datagrid?

Reply
  #1 (permalink)  
Old 05-02-04, 09:10 PM
schiavo schiavo is offline
Newbie Coder
 
Join Date: May 2004
Location: SW Missouri
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
How to reset column headers on datagrid?

I have a data grid, and a multiline textbox, and a submit button. The user (students) type SQL commandsw into the textbox, and click the button to runt he SQL selection and fill the grid. Works fine, except, the columnh headers persist from one selection to the next, and the next ... i.e., if the first selection is SELECT COMPANYNAME, CITY from CUSTOMERS ... and the next selection is "SELECT CONTACTNAME, STATE from CUSTOMERS" ... the grid retains the COMPANYNAME and CITY column headers, filling the columns with nuls. Each new column sticks as new SELECTS add stil more columns.

I've tried datagrid.clear and can't find any method of property that seems to reonfigure the headers. Can anyone help?

Thanks,

Stephen
Joplin, MO
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem getting data from DataGrid on update petersza ASP.NET 5 10-19-04 11:37 PM
Find a control in a datagrid template column gedaba ASP.NET 0 03-15-04 07:19 AM
Height constraints with the DataGrid Control dserrano Visual Basic 0 01-06-04 02:54 PM
Using forms with auto increase column perleo PHP 3 10-11-03 04:37 PM


All times are GMT -5. The time now is 02:21 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.