473,770 Members | 4,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gridview AutoGenerateCol umns=True

107 New Member
Hope to find the Solution,
My requirment is, I have set AutoGenerateCol umns=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 AutoGenerateCol umns=True.

Plz Suggest me anykind of alternatives.
Thnks in advance
Dec 19 '07 #1
11 2587
kenobewan
4,871 Recognized Expert Specialist
1. Hide it in the html
2. Do you mean data binding?
Dec 19 '07 #2
Plater
7,872 Recognized Expert Expert
AutoGenerateCol umns=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 New Member
Can we create a control on rowcreate event of Gridview.
Help me techies.....
Dec 21 '07 #4
giveDsolution
107 New Member
no response???? PLz help me guys
Dec 21 '07 #5
giveDsolution
107 New Member
no response???? PLz help me guys
Now i m ellaborating the Prob....

My problem is, I am binding a Gridview having autogeneratecol umns = True through store procedure.(Colu mns 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 New Member
Till now no response......i need the solution
Dec 21 '07 #7
giveDsolution
107 New Member
How to convert bound column of gridview(Autoge neratecolumns=t rue) to Template comlumn at runtime
Dec 21 '07 #8
giveDsolution
107 New Member
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 Recognized Expert Expert
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

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

Similar topics

2
2264
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 an item template with data containers. Thanks Andy
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,
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:
3
7780
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 using short format, etc. Anyway to implement it? Can RowDataBound event do it? Sounds I need to know the binding columns' data source type (?_ and set the format of the gridview columns according to the type. Is it possible?
0
955
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 GV_DataSource. I want my GridView to display the 3 fields where Valid field should be a Check Box.
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.
1
1744
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, AutoGenerateColumns="True". When I add two columns manually to be able to start drag and drop, the drag and drop works OK, but in GridView1_PreRender() and GridView1_RowCreated() I loose values of GridView1.Rows.Cells.Text and e.Row.Cells.Text, these are ""....
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
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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
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
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...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.