Hi
Can anyone please tell how to work on validating the record entered from new row control(xamgrid) against the above existing records.
For eg. To check if duplicate records are not getting entered by the user from teh new row control.
I will highly appreciate if you can send me a small sample.
Thanks in advance.
Rakesh Bisht
Hello Rakesh,
I have been looking into your question and if you want to make some validation when adding new row in the XamGrid control, the best choice is on ‘RowAdding’ event. For example, if you want to restrict the adding of a new row which has the same data as an existing one you can do the following check in the event’s body :
private void xamGrid1_RowAdding(object sender, Infragistics.Controls.Grids.CancellableRowAddingEventArgs e)
{
foreach (Row item in this.xamGrid1.Rows)
if (e.Row.Cells[0].Value.ToString() == item.Cells[0].Value.ToString() && e.Row.Cells[1].Value.ToString() == item.Cells[1].Value.ToString())
e.Cancel = true;
}
Let me know, if you need any further assistance on this matter.
Hi Yanko,
Thankyou for replying.
I am using MVVM pattern and IDataErrorInfo for the same.
Can you please suggest a way using MVVM with a small sample.
Rakesh
Thank you for your feedback. I am glad that you have managed to solve your issue. Would you please explain what do you mean by “i feel the red background tooltip is not coming inherently from xamgrid” ?
Looking forward to hearing from you.
Sorry for late reply.
I wish if you could investigate the validation error for WPF xamgrid which is shown in below URL really works as it is given in the example
http://help.infragistics.com/Help/NetAdvantage/WPF/2012.1/CLR4.0/html/xamGrid_Validating_Data.html
This is what I was speaking for “i feel the red background tooltip is not coming inherently from xamgrid” ?
I had to work on the styling to make it work as given in above URL for WPF.
But I had read somewhere that it comes inherently for Silverlight xamgrid. So can you please confirm if this feature is readily available in WPF xamGrid?
Thanks
Thank you for your feedback. Regarding your latest question about the red TextBlock showing the Error info – it is available in the Silvelight xamGrid. The xamGrid in WPF does not support to show this TextBlock.
I am done with my issue.
One suggestion : It would be great if the red background validation tooltip is also available inherently for WPF xamgrid similiar to silverlight one.
Thanks for your support.
After some research the functionality that you are looking for has been determined to be a new product idea. I have sent your product idea directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this product idea is PI13060037.
If you would like to follow up on your product idea at a later point, you may contact Developer Support management via email. Please include the reference number of your product idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.