Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datagrid Format Question

Reply
Thread Tools

Datagrid Format Question

 
 
aaapaul
Guest
Posts: n/a
 
      03-01-2006
Hello !

I have a Datagrid with .AutoGenerateColumns = True

Colums 1 to X should have the same format.

In which event can I set the format ?

For i = 0 to dg.columns.count -1
dg.columns(i).dataformatstring = "{0:#,##0}"
next

Thanks
aaapaul

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      03-02-2006
The only event where you can catch autogenerated columns is ItemCreated.
Don't use Columns property, the event will be called once for every item.

Eliyahu

"aaapaul" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello !
>
> I have a Datagrid with .AutoGenerateColumns = True
>
> Colums 1 to X should have the same format.
>
> In which event can I set the format ?
>
> For i = 0 to dg.columns.count -1
> dg.columns(i).dataformatstring = "{0:#,##0}"
> next
>
> Thanks
> aaapaul
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
quick datagrid format question =?Utf-8?B?Tkg=?= ASP .Net 3 05-24-2005 12:57 PM
How can I save the style of a datagrid so that it appears on the automatic format to use iin another datagrid? Luis Esteban Valencia ASP .Net Datagrid Control 1 11-25-2004 08:05 AM
datagrid format question ibeetb ASP .Net Datagrid Control 1 07-15-2004 03:57 AM
NTFS quick format and normal format Guan Foo Wah MCSE 2 05-08-2004 11:35 PM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments