SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 22nd, 2002, 12:42 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
about datagrid.columns.headertext(had source code)

<i><b>Originally posted by : GuoYong (chenggy@163.net)</b></i><br />Source code<br />Dim strsql As String<br />strsql = System.Configuration.ConfigurationSettings.AppSett ings("server")<br />Dim cn As New OleDbConnection(strsql)<br />cn.Open()<br />strsql = "select cu_cust_code,cu_eng_name,cu_chn_name from e_customer where cu_center_code='" & DDL2.SelectedItem.Value & "'"<br />Dim ap As New OleDbDataAdapter(strsql, cn)<br />Dim ds As New DataSet()<br />ap.Fill(ds, "e_customer")<br />DataGrid1.DataSource = ds.Tables(0).DefaultView<br />DataGrid1.ShowHeader = True<br />DataGrid1.AllowPaging = True<br />DataGrid1.PageSize = 6<br />1 DataGrid1.Columns(0).HeaderText = "Cust. Code"<br />2 DataGrid1.Columns(1).HeaderText = "English Name"<br />3 DataGrid1.Columns(2).HeaderText = "Chinese Name"<br />DataGrid1.DataBind()<br /><br />System error message<br />line 1 error<br />index out of range<br />System.ArgumentOutOfRangeException<br /><br />why?help me please

Reply With Quote
  #2  
Old May 27th, 2002, 11:59 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,578 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Mohammad Jamous (jamouss@hotmail.com)</b></i><br />hi there<br /><br />try to change the column header in the dataset instaed of grid like this<br />************************<br />objChannels.DS(0).Columns(0).ColumnName = "English Name"<br />*************************<br />or you can use tableStyle approach, but it need<br />some orderd code.<br /><br />by the way i can send u an example how to use TableStyle.<br /><br />------------<br />GuoYong at 5/21/2002 10:42:42 PM<br /><br />Source code<br />Dim strsql As String<br />strsql = System.Configuration.ConfigurationSettings.AppSett ings("server")<br />Dim cn As New OleDbConnection(strsql)<br />cn.Open()<br />strsql = "select cu_cust_code,cu_eng_name,cu_chn_name from e_customer where cu_center_code='" & DDL2.SelectedItem.Value & "'"<br />Dim ap As New OleDbDataAdapter(strsql, cn)<br />Dim ds As New DataSet()<br />ap.Fill(ds, "e_customer")<br />DataGrid1.DataSource = ds.Tables(0).DefaultView<br />DataGrid1.ShowHeader = True<br />DataGrid1.AllowPaging = True<br />DataGrid1.PageSize = 6<br />1 DataGrid1.Columns(0).HeaderText = "Cust. Code"<br />2 DataGrid1.Columns(1).HeaderText = "English Name"<br />3 DataGrid1.Columns(2).HeaderText = "Chinese Name"<br />DataGrid1.DataBind()<br /><br />System error message<br />line 1 error<br />index out of range<br />System.ArgumentOutOfRangeException<br /><br />why?help me please

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > about datagrid.columns.headertext(had source code)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway