I have a hierarchical grid where AutoGenerateColumns is FALSE (i.e. I specify all columns) but most columns I would like to use the specialized Telerik columns (GridBoundColumn, GridDateTimeColumn, GridNumericColumn, etc.), not GridTemplateColumn, but I would like to add validators for these fields when in Insert/Edit modes (I use popup style inserts/edits).
The best thing I have found so far is based on this post
. This gets rather interesting, and hacky, because the ItemCreated event handler is for the entire grid and not for the specific MasterTableViews within the hierarchical grid. Is there a better way to do this? I would like to add things such as date ranges, numerical ranges, and a required validator, among other things (pretty simple validations) for this specific problem, but this really should be much more flexible than that, even.
My primary observation is that there is no simple way to just hook up a validator to an edit field, and this is something that should be a relatively trivial thing without requiring templates. I think it would make sense to add a new collection to a Grid, GridValidators, where I could add as many validators as I wanted. Then give each grid column a property, ValidatorToUse and link it up to one of those validators in that collection. Or perhaps allow the use to have several validators assigned to a single column somehow. Something...
And if I'm wrong and this exists, my apologies. I've missed some very obvious things in the past. ;-)