Based on the data type I am pouplating grid's column with different controls.All the controls are binded to property on Model
On the Cell Click I am setting SelectedProperty on Model.
The problem is when row with DatePicker is selected and I go and click numericupdown, 1st numericupdown control event is fired and then Grid's Cell Click event is fired . Same is true for DatePicker.
Is there any way to fire 1st Grid's Cell Click or any other event and than NumericUpDown/DatePicker event.
private TemplateColumn _TempCol = new TemplateColumn(); switch (property.SQLDataType.ToLower()) { case "date": { _TempCol.ItemTemplate = Resources["ColDatePicker"] as DataTemplate; break; } case "varchar": { _TempCol.ItemTemplate = Resources["ColText"] as DataTemplate; break; } case "float": { _TempCol.ItemTemplate = Resources["ColFloatNumericUpdown"] as DataTemplate; break; } case "int": { _TempCol.ItemTemplate = Resources["ColIntNumericUpdown"] as DataTemplate; break; } case "char": { _TempCol.ItemTemplate = Resources["ColText"] as DataTemplate; break; } case "bit": { _TempCol.ItemTemplate = Resources["Colcombobox"] as DataTemplate; break; } }
Hi,
The events bubble up in SL, which means that children get first dibs on events.
What exactly are you trying to do? Maybe there is a better approach to achieve what you're trying to do.
-SteveZ
I am adding cotrol to grid row dynamically a below.
I have a tab control and the below code is a part of on tab when I am switching tab and coming back to my tab all controls are messed up. Initially I have some date, text and combo box controls.
but after swtiching back all the controls are changing to same type...