473,324 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Gridview AutoGenerateColumns=True

107 100+
Hope to find the Solution,
My requirment is, I have set AutoGenerateColumns=True for a gridview as i have to add columns at runtime.

My first question is: How to hide a column ?

And my second question is: Can i add the columns at runtime without doing AutoGenerateColumns=True.

Plz Suggest me anykind of alternatives.
Thnks in advance
Dec 19 '07 #1
11 2540
kenobewan
4,871 Expert 4TB
1. Hide it in the html
2. Do you mean data binding?
Dec 19 '07 #2
Plater
7,872 Expert 4TB
AutoGenerateColumns=True for a gridview as i have to add columns at runtime.
It was my understanding that if you are manually adding the columns yourself and not using a databind, you would want that property set to false.
Dec 19 '07 #3
giveDsolution
107 100+
Can we create a control on rowcreate event of Gridview.
Help me techies.....
Dec 21 '07 #4
giveDsolution
107 100+
no response???? PLz help me guys
Dec 21 '07 #5
giveDsolution
107 100+
no response???? PLz help me guys
Now i m ellaborating the Prob....

My problem is, I am binding a Gridview having autogeneratecolumns = True through store procedure.(Columns are not static)

And at the same time i m also creating radiobuttonlist in the gridview having the items which was dynamically filled from database.
Now the actual prob is, after selecting one choice from the radiobuttonlist when i click submit button (which will be stored in the Database) , radiobuttonlist vanishes.

can anyone suggest me the solution
Dec 21 '07 #6
giveDsolution
107 100+
Till now no response......i need the solution
Dec 21 '07 #7
giveDsolution
107 100+
How to convert bound column of gridview(Autogeneratecolumns=true) to Template comlumn at runtime
Dec 21 '07 #8
giveDsolution
107 100+
Till now i m not able to get my solution. Plz help me as i required it very urgently
Dec 26 '07 #9
Plater
7,872 Expert 4TB
If you do a re-bind of the datasource, your manually created columns (aka the radiobuttons) will be wiped out, you would need to re-add them.
Dec 26 '07 #10
giveDsolution
107 100+
If you do a re-bind of the datasource, your manually created columns (aka the radiobuttons) will be wiped out, you would need to re-add them.

Since i have not able to get the solution, i have change the logic that is i have created the template column at runtime without making autogeneratecolumns= true.

But now the problem is, if i click the submit button, which will enter the value in the database, the radiobuttonlist removed automatically.
Dec 27 '07 #11
Plater
7,872 Expert 4TB
Again, any time to you bind to a datasource, your data(and columns too I believe) is wiped out. So you would have to add them AFTER you bind your data.
Dec 27 '07 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andy Sutorius | last post by:
Can someone point me to an article on how to edit a datagrid when the grid is set to autogeneratecolumns? Each article I have come across has instructions when autogenerate is false and you have...
0
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....
2
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...
3
by: =?Utf-8?B?bmt3?= | last post by:
I have a gridview which need to filled by various data according to user's action. I want to format the dynamical displayed data. For example the number should be right aligned, datetime column...
0
by: shapper | last post by:
Hello, I have a GridView with 3 fields: Name (String), Description (String) and Valid (Boolean) The Grid View data source is a data view which is created by a function in my code name...
3
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...
10
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...
1
by: mghihor | last post by:
Dear GridView Experts! I have problems with GridView when adding a column using TemplateField. I fill GridView1 from a stored procedure. It has a Select statement and returns 14 columns,...
4
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.