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

Is there a way to use masked inputs for a bound integer column

1 Answer 62 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lynne
Top achievements
Rank 1
Lynne asked on 16 Dec 2011, 08:58 PM
I have an object property that's an int32.  It's really a duration-in-seconds, but for a variety of reasons we can't use a TimeSpan, which also seems not to be supported as a masked-input or column type by Telerik.

I'd like to be able to allow users to input time in minutes:seconds in a column that's bound to this property.  When I tried it, I got conversion errors.

Is this supported directly?  I'll also trying adding conversion properties to my partial classes (I'm using Entity Framework 4) and see if that works, i.e. binding to the conversion properties.

1 Answer, 1 is accepted

Sort by
0
Accepted
Nick
Telerik team
answered on 19 Dec 2011, 03:48 PM
Hi Lynne,

Unfortunately by default the GridView does not support this. However, you can define your own cell template, where you can put a TextBox which is bound to the desired property, which uses a Converter. You can implement the desired conversion logic in the Converter's methods manually. 

Hope this helps!

All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Lynne
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or