This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrid DataFormatString Not Working

1 Answer 212 Views
Grid
This is a migrated thread and some comments may be shown as answers.
RJ
Top achievements
Rank 1
RJ asked on 29 Jun 2009, 07:48 PM

Recently convert my radgrid from .Net1.1 to 2.0...
DataFormatString works fine with 1.1 but with 2.0 Radgrid Q3 2008 date cannot be formatted as I wanted, and it always adding time.

<rad:GridBoundColumn HeaderText="DOB" DataField="dob" DataFormatString="{0:MM/dd/yyyy}" UniqueName="dob">  
                                    <ItemStyle Font-Size="X-Small" Font-Names="Arial Narrow" HorizontalAlign="Center" VerticalAlign="Middle"></ItemStyle> 
                                    <HeaderStyle Width="74px"></HeaderStyle> 
                                </rad:GridBoundColumn> 

Any help would be appreciated...
Thanks in advance..

1 Answer, 1 is accepted

Sort by
0
RJ
Top achievements
Rank 1
answered on 29 Jun 2009, 11:40 PM
Additional Info:

Time is added after this code:

For

 

 i = 0 To recordCount - 1

 

 

 

Me.RadGrid.MasterTableView.Items(i).Edit = True

 

 

 

Next


RadGrid.MasterTableView.Rebind()

 



I wanted to make the grid editable, thats why I added this code...
But if the Edit is set to False, Format is okay, No Time is added to my Date..

Thanks Again

 

 

 

Tags
Grid
Asked by
RJ
Top achievements
Rank 1
Answers by
RJ
Top achievements
Rank 1
Share this question
or