473,404 Members | 2,187 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,404 software developers and data experts.

Formmating item in datagrid

my DB has a date column
my data_set's locale is zh-HK, i want to the date format to be "en-US" while
other items remain using zh-HK locale

so, how i can only format the items for a specific column?
thanks a lot!!
Nov 19 '05 #1
4 809
DateTime.ToString is supposed to allow culture specific formats by passing
an additional argument:

http://msdn.microsoft.com/library/de...asp?frame=true

-Brock
DevelopMentor
http://staff.develop.com/ballen
my DB has a date column
my data_set's locale is zh-HK, i want to the date format to be "en-US"
while
other items remain using zh-HK locale
so, how i can only format the items for a specific column? thanks a
lot!!


Nov 19 '05 #2
great, thanks!

by the way, how can I retrieve the item from the datagrid?

DataSet1.xxxx.xxxx = String.Format(locale,xxx,xxx)

"Brock Allen" wrote:
DateTime.ToString is supposed to allow culture specific formats by passing
an additional argument:

http://msdn.microsoft.com/library/de...asp?frame=true

-Brock
DevelopMentor
http://staff.develop.com/ballen
my DB has a date column
my data_set's locale is zh-HK, i want to the date format to be "en-US"
while
other items remain using zh-HK locale
so, how i can only format the items for a specific column? thanks a
lot!!


Nov 19 '05 #3
> by the way, how can I retrieve the item from the datagrid?

DataSet1.xxxx.xxxx = String.Format(locale,xxx,xxx)


You should be doing this in your template for the column where you specify
the data binding.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #4
thanks!
i have got it :-)

"Brock Allen" wrote:
by the way, how can I retrieve the item from the datagrid?

DataSet1.xxxx.xxxx = String.Format(locale,xxx,xxx)


You should be doing this in your template for the column where you specify
the data binding.

-Brock
DevelopMentor
http://staff.develop.com/ballen

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Stephen | last post by:
I am trying to delete a row in a datagrid on the onclick of a asp:ButtonColumn. The datagrid is created from the items in an arraylist so what im trying to do is remove the item from the array and...
7
by: localhost | last post by:
A DataGrid with shows a label in one of the columns when in view mode. When in edit mode, I want to show a dropdown, and have the default selection set to what the textbox used to be. Right now...
3
by: Lerp | last post by:
Hi all, What's the syntax for creating a row out of the current item in a datagrid? Something like this ? Dim myRow as DataRow = mydataGrid.DataKeys(e.item.itemindex)
3
by: Tim::.. | last post by:
Can someone please tell me how I go about preselecting an item in a drop drown list when I click the Edit Command in a datagrid? I have tried the following but it doesn't work for me! I would...
2
by: Tomek R. | last post by:
Hello ! I've got weird problem when adding new datagrid item. Here is the situation: my grid dgDeps is binded to DepartmentList arraylist, stored in Session between round-trips.. To add new...
2
by: Luis Esteban Valencia Muñoz | last post by:
I have a datagrid that displays editable text fields (2 different price fields) and a checkbox in every row. It has a "SaveChanges" button at the bottom, which, when pressed, looks at every...
15
by: glenn | last post by:
Hi folks, I have a DropDownList in a DataGrid that is populated from records in a database. I want to add a value that might be a string such as "Select a Company" for the first item since an...
8
by: brock wade | last post by:
I have a Datagrid that is working fine displying my records, but I'm trying to program buttons on each record line to launch another web page that shows all the details for the product: ...
0
by: stevem2112 | last post by:
I have a datagrid with 2 Template columns. One column has DropDownLists and the other has Textboxes. I bind each DDL in the ItemCreated event. This datagrid is inside a UserControl that is inside...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
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,...
0
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...
0
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,...
0
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...

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.