So I've been working in jsFiddle for quite a while lately trying to get grid editing working the way I've envisioned.
Essentially I have a grid describing some items, and costs associated with them. When toggling a button I want to be able to prevent my editable fields from being edited which I have been able to do. Because the costs on these items are so minimal they go past 2 decimal places of significance I've had to tell the grid to use an editor in which I create a numericTextBox and edit my values from there.
Here's where I run into an issue. I can no longer figure out how to perform any required field validation of my override columns after a value has been changed. I've tried assigning it as an additional validator on the numericTextBox and as a required field in both the column definitions and dataSource to no avail...
Ideally what I want to find a null value and replace it with the default, however I have not been able to tie into any blur, validate, edit, or save events which will let me change the value to default in the numericTextBox when deleted. I would need it to not only persist to the dataSource, but also reflect the default value in the grid as well. You can see my attempt at trying to do this on blur of my numericTextBox where I attempt to set the value to 5. If you delete the value entirely sometimes the text box will flash "5.00" very briefly before saving the null value.
So on blur of a property in a batch edit I'm looking to get a non-generic grid editor control to validate that a field is required, or in the more optimal case, replace it's value with another value.
I have a link to the jsFiddle I have been using to test this out if it helps: http://jsfiddle.net/sparksterz/YFqNC/
Essentially I have a grid describing some items, and costs associated with them. When toggling a button I want to be able to prevent my editable fields from being edited which I have been able to do. Because the costs on these items are so minimal they go past 2 decimal places of significance I've had to tell the grid to use an editor in which I create a numericTextBox and edit my values from there.
Here's where I run into an issue. I can no longer figure out how to perform any required field validation of my override columns after a value has been changed. I've tried assigning it as an additional validator on the numericTextBox and as a required field in both the column definitions and dataSource to no avail...
Ideally what I want to find a null value and replace it with the default, however I have not been able to tie into any blur, validate, edit, or save events which will let me change the value to default in the numericTextBox when deleted. I would need it to not only persist to the dataSource, but also reflect the default value in the grid as well. You can see my attempt at trying to do this on blur of my numericTextBox where I attempt to set the value to 5. If you delete the value entirely sometimes the text box will flash "5.00" very briefly before saving the null value.
So on blur of a property in a batch edit I'm looking to get a non-generic grid editor control to validate that a field is required, or in the more optimal case, replace it's value with another value.
I have a link to the jsFiddle I have been using to test this out if it helps: http://jsfiddle.net/sparksterz/YFqNC/