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

how to apply convertor on a column at runtime

4 Answers 75 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Abhishek Gairola
Top achievements
Rank 1
Abhishek Gairola asked on 18 Jun 2010, 12:23 PM
I have a problem with Radgridview

At designtime i do not know what columns my grid will displa, so i am creating an object datatable at runtime and binding the gridview to this datatable object
The datatable object has rows and columns. each column has a datatype.
The problem occurs if a datetime column has a null value
the grid displays it as 01/01/0001
i want the convertor to be working but since i do not have any columns at design time, i do not know how to specify this convertor at runtime.
Also i am not able to relrieve the cell values for this grid
It displays "could not evaluate expression" something like this

is there a way to specify convertor on an event in gridview?

thank you for your attention

4 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 18 Jun 2010, 12:36 PM
Hi Abhishek Gairola,

You ,may  subscribe to  the RadGridVIew.DataLoaded event  and try setting the converter within the event.

Greetings,
Pavel Pavlov
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
Abhishek Gairola
Top achievements
Rank 1
answered on 18 Jun 2010, 12:39 PM
Thank you Pavel,

Can you please give me a small code on how to assign a convertor on this event?
0
Accepted
Pavel Pavlov
Telerik team
answered on 18 Jun 2010, 12:53 PM
Hi Abhishek Gairola,
Plese have a look at the DataLoaded handler in the project attached.

Sincerely yours,
Pavel Pavlov
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
Abhishek Gairola
Top achievements
Rank 1
answered on 18 Jun 2010, 05:57 PM
Thank you mate...
you solved my problem
cheers
Tags
GridView
Asked by
Abhishek Gairola
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Abhishek Gairola
Top achievements
Rank 1
Share this question
or