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? 3 7773
You've got to have something there, to be able to format - especially since
you want to have different columns formatted differently - at least you will
need to have boundcolumns, in order to create formatting for each one.
I would think that it might be possible in the rowDatabound event, though
I've never tried it, but you'd need to go by cell number
--
David Wier
MVP/ASPInsider http://aspnet101.com http://aspexpress.com
"nkw" <nk*@discussion s.microsoft.com wrote in message
news:8B******** *************** ***********@mic rosoft.com...
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?
I cannot bound the columns though. Sounds I need:
1. Capture the column rendering event
2. Get the bound data column type
"David Wier" <da********@noS pamhotmail.comw rote in message
news:#4******** ******@TK2MSFTN GP04.phx.gbl...
You've got to have something there, to be able to format - especially
since
you want to have different columns formatted differently - at least you
will
need to have boundcolumns, in order to create formatting for each one.
I would think that it might be possible in the rowDatabound event, though
I've never tried it, but you'd need to go by cell number
--
David Wier
MVP/ASPInsider http://aspnet101.com http://aspexpress.com
"nkw" <nk*@discussion s.microsoft.com wrote in message
news:8B******** *************** ***********@mic rosoft.com...
>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?
You can easily do it in the databound event of the gridview.
"nkw" <nk*@discussion s.microsoft.com wrote in message
news:8B******** *************** ***********@mic rosoft.com...
>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?
This thread has been closed and replies have been disabled. Please start a new discussion. 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: kashif456 |
last post by:
I can't figure out why I am getting error updating, deleting and
inserting new rows. I am amble to get my dataview populated and also
detailview populated: Here's my code:
<%@ Page Language=VB CompilationMode=Auto Inherits=CrisisResponseBase
%>
<script runat="server">
'Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
|
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: BillE |
last post by:
I am populating a gridview using auto-generated fields, because I need to
enable sorting.
I would like to format a column containing dates in the gridview.
How is this done?
Thanks
Bill
| |
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: Aamir Ghanchi |
last post by:
Hello,
I would like to hear if any one else is having the same problem. The
AutoGenerateColumns property is set to true. I can read the data right
and can loop through the datasource's columnscollection and get the
row count, but for some reasons the gridview does not get autopoulated
with the results. The Gridview is bound to objectdatasource and I can
see all the events firing as follows when I trace:
objdsCourseMatrix_Selecting...
|
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: giveDsolution |
last post by:
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
|
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...
|
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: 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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: 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...
| |