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

Unbound MaskBoxColumn

5 Answers 89 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Evan
Top achievements
Rank 1
Evan asked on 17 Jul 2008, 05:06 PM
I'm trying to make two columns, one with a date and one with a time. I would use the DateTimeColumn, except there doesn't seem to be a very good way to format it as time. Also, the DateTimeColumn doesn't apply formatting to filter cells (or to its own cells for that matter - you have to modify them in the CellFormatting event.)

My solution was to just use MaskBoxColumns with masks that would correspond to date and time, respectively. However, MaskBoxColumns don't apply whatever value you assign to the Mask property, for whatever reason. It seems to always want to format anything entered as a monetary value, regardless of the mask. The MaskType value is also unavailable in this context.

My next step was to attempt to make a regular column and insert the MaskBoxeElements as necessary in the CellFormatting event, as described here: http://www.telerik.com/community/forums/thread/b311D-hhddm.aspx

This causes an exception in the "key" paramater of something - the stack trace was very vague and I couldn't pinpoint the problem, nor could I reproduce it when stepping through code - it only affected runtime.

So my question boils down to whichever of the following is easiest to answer:
1) Can I format a DateTimeColumn to be time? (e.g. 11:23 AM) If so, how do I apply DateTimeColumn formatting to a filter cell for that row?
2) Can I apply masks to MaskBoxColumns and have them actually affect the input?
3) Can I insert MaskBox controls into a column without causing fatal runtime errors?

Help is greatly appreciated, once I get this ironed out I don't forsee any other problems with my project; everything else is fairly straightforward.


5 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 Jul 2008, 07:52 AM
Hi Evan,

  1. We have an issue with formatting a DateTimeColumn when the grid is in unbound mode. We are currently working on fixing it but I'm not able to give you a specific time-frame when this will happen.
  2. Yes you can apply masks but the mask you apply are only for the numeric mask type which is set to be the mask type used from the mask column. To apply mask use its Mask property which internally sets this mask to the editor. We will consider exposing the MaskType property so you will be able to have standard and datetime mask, too.
  3. You cannot insert RadMaskedTextBox control as an editor in your column. We will consider developing the desired functionality for RadMaskedEditBoxEditor in one of our next versions. Unfortunately, I cannot provide you with a workaround for the time being.

If you have additional questions, feel free to contact me.

Best wishes,
Nikolay
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Evan
Top achievements
Rank 1
answered on 22 Jul 2008, 08:57 PM
I appreciate the response.

At the moment, this means that I must use a regular MS DataGridView to accomplish my goals. Even this is not a great solution; it requires subclassing the column to insert a DateTime editor.

I would think it would be fairly simple to expose the MaskType property, which would greatly extend the functionality of MaskBoxColumns, so please consider this a feature request.

Thanks,
Evan

0
Boyko Markov
Telerik team
answered on 24 Jul 2008, 01:43 PM
Hi Evan,

Thank you for contacting me.

I agree with your opinion that we must expose the MaskType property of the mask column and hopefully we'll make it for the Q2 SP1 release.

Please let me know if you have any other suggestions.

Regards,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Justin
Top achievements
Rank 1
answered on 24 Nov 2008, 09:42 PM
We are using the Q3 release and would like to use a SSM mask in the grid;  Is the mask type featuer enable now? I can't seem to find it.  How would we do this with just the mask field.
0
Boyko Markov
Telerik team
answered on 26 Nov 2008, 03:17 PM
Hi Justin,

You will be able to use the MaskType property in the upcoming Q3 SP1 release, scheduled for next week. The property is not publicly exposed in the current release.
 

All the best,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Evan
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Evan
Top achievements
Rank 1
Boyko Markov
Telerik team
Justin
Top achievements
Rank 1
Share this question
or