ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
1,323 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi.
I have a SQL datasource that returns 5 columns and a gridview to show them, but one of the columns does not show as a column in the gridview but turns into title (showing when holding the mouse over) in one of the other columns.
It keeps doing it no matter how the gridview is configured (Auto-generate fields or not).
If the SQL statement from the datasource is executed else where, all 5 columns is showing fine
What can cause this behaviour?
Hi.
The SQL Datasource Select statement looks like this and it is an IBM database:
The rest is quite simple where the gridview's datasorurce is set to the SQL Datasource.
But as you can see in the snip below (showing the source in the browser), the column called ACCESS turns into the title of the column called GB_TEXT even though it should have been a normal column
I don't know what happened to this question, but the image showing some of the source from the browser is lost and I cannot edit that comment to put it back in (page fails if I try), so I will try with text instead:
Edit: I can see the picture again in the previous comment, but anyway: The text here shows a little more
Does it work differently if you use another name for "ACCESS" column, header, etc.?
Hi @Kurt Jensen
In fact, I tested it myself with an example based on your description.
Code:
I think there is other code in your project that is interfering with the result. You can recreate the project and test it with just that. If there is still a problem, you can share more code to locate the problem.
Best Regards
Qi You
Hi @QiYou-MSFT
It sometimes helps that someone else takes a look at it to open ones eyes :-)
You are right, there was some code elsewhere in the project that I forgot all about. That code was manipulating the gridview.
Thank you very much for taking time to help and test it :-)
Best Regards
Kurt Jensen
Sign in to comment
In addition to @QiYou-MSFT , have you any code at Gridview.DataBound or GridviewRowDataBound events?
Sometimes we use these events to make some final changes before page render...
Sign in to comment
0 additional answers
Sort by: Most helpful