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

Dynamic Grid from inverted data

2 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rod Barrand
Top achievements
Rank 1
Rod Barrand asked on 22 Jul 2010, 11:15 AM
Hi, i have a grid built from values in database tables. The data is stored vertically
Partial NeedDataSource is:

foreach

 

(DataRow oDR in oStructureDT.Rows)

 

{

oNormalDT.Columns.Add(

new DataColumn(oDR["ColumnName"].ToString(),

 

ConvertType(oDR[

"DataType"].ToString())));

 

 

}

The DataType field is in the db as date, time, varchar and so on...
I'm trying to get the RadTimePicker to display in the edit form for a time DataType but all i can get is the calendar
I have AutoGenerateColumns = true, so i may have to rethink that. Can any one confirm?
I'm guessing i need to make the adjustment in itemdatabound, but not sure how to go about it.

Regards
Rod

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 22 Jul 2010, 03:32 PM
Hi Rod,

In order to make the auto-generated GridDateTimeColumn to display RadTimePicker in edit mode, I suggest that you handle the ColumnCreated server-side event of RadGrid. There if the currently created column if the GridDateTimeColumn, set its PickerType property to TimePicker.

Try it out and let me know how it goes.

Kind regards,
Iana
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
Rod Barrand
Top achievements
Rank 1
answered on 22 Jul 2010, 03:59 PM
Brilliant, thank you
Tags
Grid
Asked by
Rod Barrand
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Rod Barrand
Top achievements
Rank 1
Share this question
or