noman nadeem
Top achievements
Rank 1
noman nadeem
asked on 02 Sep 2009, 04:59 AM
hi!
i am using telerik grid i have a data in the column is string like john but its showing this 000000john i dont understand why by default it should be string , when i want to show my data in decimal then its should format it in decimal or number type please tell me short way to make it string any format string that is used in grid columns ?
regards
noman
i am using telerik grid i have a data in the column is string like john but its showing this 000000john i dont understand why by default it should be string , when i want to show my data in decimal then its should format it in decimal or number type please tell me short way to make it string any format string that is used in grid columns ?
regards
noman
4 Answers, 1 is accepted
0
Hello noman nadeem,
Typically RadGridView would display any string as it is , without applying any additional formatting unless formatting is explicitly set.
Can you please paste the XAML related to RadGridView definition. Maybe there is a format string accidently left or something like that.
Greetings,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Typically RadGridView would display any string as it is , without applying any additional formatting unless formatting is explicitly set.
Can you please paste the XAML related to RadGridView definition. Maybe there is a format string accidently left or something like that.
Greetings,
Pavel Pavlov
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
noman nadeem
Top achievements
Rank 1
answered on 02 Sep 2009, 07:56 AM
hi pavel,
this is the xaml for column
if i used DataFormatString="{}{0:G}" then the heading "Career" shows like that "000000Career"
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" DataFormatString="{}{0:G}" />
if i used without DataFormatString="{}{0:G}" then the heading "Career" shows like that "000000Career"
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" />
no difference
which dataformatstring should i used please tell me i have only string not number type data.
i want to show my heading or data as it is like "Career" shows "Career" not "0000000Career"
Regards,
noman
this is the xaml for column
if i used DataFormatString="{}{0:G}" then the heading "Career" shows like that "000000Career"
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" DataFormatString="{}{0:G}" />
if i used without DataFormatString="{}{0:G}" then the heading "Career" shows like that "000000Career"
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" />
no difference
which dataformatstring should i used please tell me i have only string not number type data.
i want to show my heading or data as it is like "Career" shows "Career" not "0000000Career"
Regards,
noman
0
Hi noman,
The grid is using standard String.Format to apply DataFormatString property - I'm not sure about standard format to handle your case. You can use IValueConverter instead!
Kind regards,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
The grid is using standard String.Format to apply DataFormatString property - I'm not sure about standard format to handle your case. You can use IValueConverter instead!
Kind regards,
Vlad
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
noman nadeem
Top achievements
Rank 1
answered on 04 Sep 2009, 12:17 PM
hi!
how to use IValueConverter , i never use it , please tell me how to use in my code.
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" DataFormatString="{}{0:G}" />
thanks
Regards,
noman
how to use IValueConverter , i never use it , please tell me how to use in my code.
<telerik:GridViewDataColumn HeaderText="Heading" DataMemberBinding="{Binding headingname3}" DataFormatString="{}{0:G}" />
thanks
Regards,
noman