Hi, We using a XamGrid control which consists of textcolumns and DateColumns. we want to put some validations on the datecolumn and if the validations fail we want old date to be retained. The validations will be Columnwise as well as Rowwise. We are validation these dates in the CellExitingEditMode Event, however when the validation fails, even if we set e.Cancel = true; the new value is reflected. Please find the attached screenshot, here we have two datecolumns showing the start date and end date, the we want to validate the start date to be less than the end date. Please let us know if there is a way to retain the old values or cancel the changes made.
Further, we want to Display this XamGrid within the XamDialogWindow, but When we select a date from the datepicker, move to next cell and come back to the original cell and click on the DatePicker icon following exception is thrown "Must disconnect specified child from current parent Visual before attaching to new parent Visual" Please let us know what could be the cause of the error. I am having a Datatable as ItemsSource for the XamGrid.
We are using Infragistics Version 11.2.20112.1012
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Also I suggest you download the latest service release of 11.2 by logging to our web site and going to My IG \My Keys and Downloads. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi Stefan,
Thanks for your reply, this sample solved our validations issue which we were facing however as mentioned we want it to be displayed in the xamDialogWindow which is to be poped up independently and not embedded in any window.
Here is an sample application which replicates the exception thrown.
I have been looking into your sample and I can suggest you change the XamGrid's EditingSettings' AllowEditing Property from Cell to Hover. This way the Cell will enter edit mode when you hover over it and a single click will open the calendar. Please let me know if this helps you or you need further assistance on this matter.
Hi,
We are using 12.1.20121.1010 version of infragistics control for wpf.
We have created a TemplateColumn “StartDate” in XamGrid. On StartDate column we have validation check for the valid date. If the validation fails we display a message to the user. When the user again clicks the same cell that was being edited previously, single click on this cell doesn’t take the cell to the edit mode. User has to double click the cell in order to edit the dates. Please note this only happens for the cell whose validation has failed.
We have attached a sample project "XamGridDateColumn_26-Dec-2013.zip". To replicate this issue, In this sample you can change the StartDate from "2/1/2013" to "1/1/2013" for the FiscalPeriod 201302. Then click anywhere outside the cell, Since the validation is failed application will prompt a message "Start of Period cannot be less than start period of previous fiscal period." and we again click back to that StartDate cell will not edit the cell in a single click to edit the cell we required to click the cell twice. I just want to know is there any way to take the previously modified cell (cell for which the validation failed) into an edit mode on a single click.
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Hello support,We are currently using Infragistics wpf Version 12.1.20121.1010. in the xamGrid Control we are adding DateColumns and we need to add validation when the dates are changed. However when changing the dates we are getting "Must disconnect specified child from current parent Visual before attaching to new parent Visual" error. The xamGrid (With the DateColumn) is placed in a UserControl, further we have placed this UserControl on the normal Window. When editing the dates it gives the above mentioned error. Please let us know what could be the cause of this error.
After some investigation the our dev. team concluded that this issue is related to the MS DatePicker control. Here you can read more:
http://social.msdn.microsoft.com/Forums/ar/wpf/thread/0105c7af-0daa-4dc1-a3d9-24a2cf1e4756
http://connect.microsoft.com/VisualStudio/feedback/details/622571/popup-visual-tree-can-not-be-generated-again-when-user-switch-the-theme
Hope this helps you.