This question is locked. New answers and comments are not allowed.
I have been working on trying to get validation to work during the data binding process on RadGridView in Silverlight with no luck. Is this even possible?
Basically, I have a list of data I am importing and binding to the grid. The grid is serving as an intermediary before being posted into the database. I would like to be able to import the data and display it in the grid to the user along with all validation messages so they know what they need to fix before the actual database import happens. Can this work with something like the BindingValidationError event?
I am using the Beta build for Silverlight 4 and Visual Studio 2010. Below is an example of one of my data columns. Maybe I misunderstood what these options are supposed to do. During the bind operation I would like to ensure that the contents of the 'Season' string are actually valid and will import into the database correctly. I added an event handler for 'CellValidating' and set the IsValid property for this particular column to false, but the event only seems to fire when you actually edit something in the UI and NOT during the binding operation. There must be a way around this or something basic I am missing...
Basically, I have a list of data I am importing and binding to the grid. The grid is serving as an intermediary before being posted into the database. I would like to be able to import the data and display it in the grid to the user along with all validation messages so they know what they need to fix before the actual database import happens. Can this work with something like the BindingValidationError event?
I am using the Beta build for Silverlight 4 and Visual Studio 2010. Below is an example of one of my data columns. Maybe I misunderstood what these options are supposed to do. During the bind operation I would like to ensure that the contents of the 'Season' string are actually valid and will import into the database correctly. I added an event handler for 'CellValidating' and set the IsValid property for this particular column to false, but the event only seems to fire when you actually edit something in the UI and NOT during the binding operation. There must be a way around this or something basic I am missing...
| <telerikGrid:RadGridView x:Name="BaseDataGrid" RowValidated="BaseDataGrid_RowValidated" AutoGenerateColumns="False" |
| ItemsSource="{Binding BaseData, Mode=TwoWay}" Style="{StaticResource RefGridStyle}" DataLoadMode="Asynchronous" |
| MultipleSelect="True" SelectionMode="Extended" RowIndicatorVisibility="Collapsed" ValidationMode="Cell" |
| CellValidating="BaseDataGrid_CellValidating" EditTriggers="CellClick, Default"> |
| <telerikGrid:RadGridView.Columns> |
| <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Path=Season, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}"/> |
| </telerikGrid:RadGridView.Columns> |
| </telerikGrid:RadGridView> |