|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Gridview only displays 3 columns of 11 column datasetof my dataset which has 11 cols. I do have AutoGenerateColumns property set to true. Here is my code: <div> <asp:GridView ID="GridView1" runat="server"> </asp:GridView> </div> Here is my code file: responseWS = proxy.MarketShare(parm1) 'response from XML Native Web Services (SQL 2005) ' loop through responseWS object array to find the individual items For i = 0 To Microsoft.VisualBasic.UBound(responseWS) Select Case responseWS(i).GetType().ToString() Case "System.Data.DataSet" Dim ds As System.Data.DataSet ds = DirectCast(responseWS(i), System.Data.DataSet) GridView1.DataSource = ds.Tables(0) 'immediate window shows that ds.Tables(0).Columns.Count is 11 GridView1.DataBind() The grid shows OK except for the fact that only 3 columns are displayed. I know this Gridview can get quite elegant and fancy but at this point, I just want it to display all the data plainly. Could someone suggest something please? I am running ASP.NET 2.0 Visual Studio 2005 on Windows XP. hi jja,
just set AutoGenerateColumns propertyto false to get the effect of ur 11 columns JJA wrote: Show quoteHide quote > I've got a very "default" GridView control that is only showing 3 cols > of my dataset which has 11 cols. I do have AutoGenerateColumns property > set to true. Here is my code: > <div> > <asp:GridView ID="GridView1" runat="server"> > </asp:GridView> > </div> > > Here is my code file: > > responseWS = proxy.MarketShare(parm1) 'response from XML > Native Web Services (SQL 2005) > ' loop through responseWS object array to find the individual items > For i = 0 To Microsoft.VisualBasic.UBound(responseWS) > Select Case responseWS(i).GetType().ToString() > Case "System.Data.DataSet" > Dim ds As System.Data.DataSet > ds = DirectCast(responseWS(i), > System.Data.DataSet) > GridView1.DataSource = ds.Tables(0) > 'immediate window shows that ds.Tables(0).Columns.Count is 11 > GridView1.DataBind() > > The grid shows OK except for the fact that only 3 columns are > displayed. I know this Gridview can get quite elegant and fancy but at > this point, I just want it to display all the data plainly. Could > someone suggest something please? I am running ASP.NET 2.0 Visual > Studio 2005 on Windows XP.
New gridview question/problem.....
Web page size html text encoding problem Problems with Flash in WebBrowser Invalid postback or callback argument error Menu Control and Sitemap, eliminate the home column on the menu display CreateUserWizard ContinueButtonStyle Sorting GridView Web Part Connection HOWTO: Persist Scroll Position in Panel Control on Postback part II |
|||||||||||||||||||||||