473,770 Members | 7,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GridView AutoGenerateCol umns not working

Hello,

I would like to hear if any one else is having the same problem. The
AutoGenerateCol umns property is set to true. I can read the data right
and can loop through the datasource's columnscollecti on and get the
row count, but for some reasons the gridview does not get autopoulated
with the results. The Gridview is bound to objectdatasourc e and I can
see all the events firing as follows when I trace:
objdsCourseMatr ix_Selecting
objdsCourseMatr ix_Selected
gvCourseMatrix_ DataBinding
gvCourseMatrix_ DataBound
This was originally a .Net 1.1 project imported now into 2.0
Any ideas will be appreciated.

thanks.

Oct 10 '07 #1
2 4854
Answering my own post for the benefit of others.
The default value of AutoGenerateCol umns property of gridview is true
as it shows up in the proprty window, but my suggestion is : Don't
count on it.
I manually added the AutoGenerateCol umns attribute in the asp:GridView
element on the html page and its is now showing all the returned
columns without . I don't know how long it will stay there as it gets
reset (removes) from the html code when I do other changes to the
gridview or switch back & forth between the designer and the source.
On Oct 10, 1:53 pm, Aamir Ghanchi <aamirghan...@g mail.comwrote:
Hello,

I would like to hear if any one else is having the same problem. The
AutoGenerateCol umns property is set to true. I can read the data right
and can loop through the datasource's columnscollecti on and get the
row count, but for some reasons the gridview does not get autopoulated
with the results. The Gridview is bound to objectdatasourc e and I can
see all the events firing as follows when I trace:
objdsCourseMatr ix_Selecting
objdsCourseMatr ix_Selected
gvCourseMatrix_ DataBinding
gvCourseMatrix_ DataBound
This was originally a .Net 1.1 project imported now into 2.0
Any ideas will be appreciated.

thanks.

Oct 11 '07 #2
Thank you for sharing
"Aamir Ghanchi" <aa**********@g mail.comwrote in message
news:11******** **************@ 57g2000hsv.goog legroups.com...
Answering my own post for the benefit of others.
The default value of AutoGenerateCol umns property of gridview is true
as it shows up in the proprty window, but my suggestion is : Don't
count on it.
I manually added the AutoGenerateCol umns attribute in the asp:GridView
element on the html page and its is now showing all the returned
columns without . I don't know how long it will stay there as it gets
reset (removes) from the html code when I do other changes to the
gridview or switch back & forth between the designer and the source.
On Oct 10, 1:53 pm, Aamir Ghanchi <aamirghan...@g mail.comwrote:
>Hello,

I would like to hear if any one else is having the same problem. The
AutoGenerateCo lumns property is set to true. I can read the data right
and can loop through the datasource's columnscollecti on and get the
row count, but for some reasons the gridview does not get autopoulated
with the results. The Gridview is bound to objectdatasourc e and I can
see all the events firing as follows when I trace:
objdsCourseMat rix_Selecting
objdsCourseMatr ix_Selected
gvCourseMatrix_ DataBinding
gvCourseMatrix_ DataBound
This was originally a .Net 1.1 project imported now into 2.0
Any ideas will be appreciated.

thanks.


Oct 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1448
by: Sachin | last post by:
Hi All, I am using ASP.NET 2.0 and GridView control. I have a stored procedure, SP_GetAllRows which takes the table name as parameter and fires the query "Select * from TableName" dynamically. My GridView defined like,
0
8566
by: Innova | last post by:
Hi, We are working on a gridview inside the gridview (parent-child) scenario. The data of child grid will depend on the data of parent. Objectives: 1.Add new row in parent grid after each row and add child grid into that row because the columns in child grid are same as parent grid and we want to align them with the cols of parent grid. 2. If there is data for child grid we show a plus image in the parent row (in the row above the...
2
2137
by: guanfenglin | last post by:
Hello, I have a grid view which display and updates the data, however it doesn't work well, I always either get invalid name/number or not all varaibles bound, I am very frustrated at the moment. Thank you very much!! Here is the gridview code:
2
48406
by: cartmann | last post by:
Hi, I have a gridview with a template column. In the template column i have two commandbuttons. When clicking the buttons I enter the cmd_click event - but how do I read in which row the button was clicked?? I hope this makes sense? /Claus
4
26707
by: Tomasz Jastrzebski | last post by:
Hello Everyone, I have a GridView control bound to a plain DataTable object. AutoGenerateEditButton is set to true, Edit button gets displayed, and RowEditing event fires as expected.
3
6935
by: =?Utf-8?B?c2xlbWVu?= | last post by:
Hi, My GridView is bound to a DataTable and the GridView properties are set as follows: AutoGenerateColumns="true" AutoGenerateEditButton="true" AutoGenerateDeleteButton="true" The Edit and Detete button are displayed but when the Edit button is clicked, the Update/Cancel buttons are not displayed. Does anyone have any
10
7980
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I understand how to connect a SqlDataSource to a GridView and have a nice data-connected, paginated web page generated with virtually no coding. Starting from that base, I would like to add an extra column to the GridView and do two things: for each row, based on the value of another column, insert a string in the new column cell and set the background color of the new column cell. Suggested approaches would be appreciated.
3
1938
by: Nathan Sokalski | last post by:
I have a GridView control with three columns, all BoundField columns. They all have a HeaderText and DataField property set, and the third one has a DataFormatString property as well. When I run my code, the GridView displays two sets of columns. The first set looks exactly as I would expect. The second set, which should not be there anyway, uses the DataField as the header and does not apply the DataFormatString for the third column. What...
4
25536
by: Yin99 | last post by:
I have a Gridview binding to a DataTable source. I'd like to set the column with of the second column. I cannot do this apparently because when AutoGenerateColumns=true, they do not appear in the columns collection. I modified the RowCreated even to gridview, and I can change properties on the cells, but not width. (setting tooltip, background color, etc, all work but changing width has no effect). Here's sample code I am using:
0
10058
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7416
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.