Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
540
XamGrid Item template
posted

 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;
                        }
                }