Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Kelly #1
Datagrid column formatting
Is it possible to set the column widths of a datagrid?
This is driving me crazy, and I haven't found a solution yet. I'm pretty new
to ASP.NET so there may be an easy way I'm just not aware of, however, I've
Googled this until my eyes hurt and still haven't found a solution.
Also, how would I set a few of my columns' format? (I have 3 date columns
within the datagrid and I'd like to set the format to dd/mm/yyyy or
something similar...)
Any and all help would be appreciated!
-Kelly
Kelly Guest
-
Formatting Date in Column of DataGrid
Hi guys, I have a WebServiceConnector component which is bound to a DataSet component, which is in turn bound to a DataGrid component. All is... -
Formatting the phone nos in the column in the datagrid
I want to format the phone nos displayed in the column of the datagrid to ###-###-#### i tried the following in the ItemCreated event but is not... -
Formatting datagrid column to show boolean as Yes/no instead of truefalse
Is there a way to change the formatting expression of a column in the property builder of the datagrid to make boolean values appear as yes/no... -
DataGrid formatting - only one column without borders
Yes, it is possible do it on datagrid ItemCreate event: int i = getMyNonBorderColumnIndex(); e.Item.Cells.Style.Add("BORDER-TOP-STYLE",... -
How to use formatting expression on DataGrid bound column.
Refer http://www.c-sharpcorner.com/Code/2003/June/FormatDataGridData.asp http://www.c-sharpcorner.com/Code/2003/June/DataFormatString.asp HTH... -
Elton W #2
Datagrid column formatting
Hi
You can use HeaderStyle-Width and ItemStyle-Width of
column to set column width.
To format date in a BoundColumn:
DataFormatString="{0: MM/dd/yyyy}"
To format date in a TemplateColumn:
Text ='<%# DataBinder.Eval
(Container.DataItem, "DateField", "{0: dd/MM/yyyy}")'
HTH
Elton Wang
[email]elton_wang@hotmail.com[/email]
yet. I'm pretty new>-----Original Message-----
>Is it possible to set the column widths of a datagrid?
>
>This is driving me crazy, and I haven't found a solutionof, however, I've>to ASP.NET so there may be an easy way I'm just not awaresolution.>Googled this until my eyes hurt and still haven't found ahave 3 date columns>
>Also, how would I set a few of my columns' format? (Idd/mm/yyyy or>within the datagrid and I'd like to set the format to>something similar...)
>
>Any and all help would be appreciated!
>
>-Kelly
>
>
>.
>Elton W Guest
-
Kelly #3
Re: Datagrid column formatting
Thank you! I'll fiddle with this a bit. :)
-Kelly
"Elton W" <anonymous@discussions.microsoft.com> wrote in message
news:12ae01c5477d$c8450de0$a401280a@phx.gbl...> Hi
>
> You can use HeaderStyle-Width and ItemStyle-Width of
> column to set column width.
>
> To format date in a BoundColumn:
> DataFormatString="{0: MM/dd/yyyy}"
>
> To format date in a TemplateColumn:
> Text ='<%# DataBinder.Eval
> (Container.DataItem, "DateField", "{0: dd/MM/yyyy}")'
>
> HTH
>
> Elton Wang
> [email]elton_wang@hotmail.com[/email]
>
>
>> yet. I'm pretty new> >-----Original Message-----
> >Is it possible to set the column widths of a datagrid?
> >
> >This is driving me crazy, and I haven't found a solution> of, however, I've> >to ASP.NET so there may be an easy way I'm just not aware> solution.> >Googled this until my eyes hurt and still haven't found a> have 3 date columns> >
> >Also, how would I set a few of my columns' format? (I> dd/mm/yyyy or> >within the datagrid and I'd like to set the format to> >something similar...)
> >
> >Any and all help would be appreciated!
> >
> >-Kelly
> >
> >
> >.
> >
Kelly Guest



Reply With Quote

