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

Culture specific DataFormatString on column

3 Answers 147 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Arni Gunnar Ragnarsson
Top achievements
Rank 2
Arni Gunnar Ragnarsson asked on 18 Mar 2010, 12:51 AM
Hi.

I am moving a pretty large chunk of our system from regular grids with semi ajaxified updates and paging to total client side binding through webservices.

We have a diverse user base, running different cultures pr. user in the system, so we need to be able to se the DataFormatString on Page_Load (or some other time) for the datetime columns so that the display is consistent throughout the system.

I have tried and tried, but  not had any luck.

How would I go about this ... ?

And I don't want to create OnDataBound functions for all the grids just to be able to do this ... there should be a way somehow to do this.

Thanks for the help,
- Arni Gunnar Ragnarsson.

3 Answers, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 23 Mar 2010, 07:43 AM
Hi Arni Gunnar Ragnarsson,

In this case, in order to make sure that the format string is properly applied, you would need to use server side databinding for the controls. In this way, you would be able to dynamically set the format string for one or more of the columns.
I hope this is a feasible approach for you.

Sincerely yours,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Arni Gunnar Ragnarsson
Top achievements
Rank 2
answered on 23 Mar 2010, 12:07 PM
Server side binding is exactly what I am trying to avoid.

But is it possible to do server side binding at runtime, set the DataFormatString, and then bind clientside after that?
0
Yavor
Telerik team
answered on 26 Mar 2010, 07:59 AM
Hello Arni Gunnar Ragnarsson,

Basically, mixing the two approaches - server side binding initially, and then using client side databinding - is not a recommended approach. On subsequent page cycles you should use the same approach, which was used initially.

All the best,
Yavor
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Arni Gunnar Ragnarsson
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Arni Gunnar Ragnarsson
Top achievements
Rank 2
Share this question
or