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
11 2588
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 autogeneratecol umns= true.
But now the problem is, if i click the submit button, which will enter the value in the database, the radiobuttonlist removed automatically.
Plater 7,872
Recognized Expert Expert
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.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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
|
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,
|
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:
|
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?
|
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.
| |
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
|
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.
|
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 ""....
|
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:
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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();...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |