This is a migrated thread and some comments may be shown as answers.

RadTreeView and DataValidation with INotifyDataErrorInfo

15 Answers 125 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
simeon
Top achievements
Rank 1
simeon asked on 17 Jan 2011, 04:41 PM
Can you make a RadTreeView do data validation messaging the same way as you can with the standard silverlight controls and the rad input controls?  It would be awesome for me if I could make the RadTreeView go into an error state if it has no items are checked but I cant see an easy way of doing it....

Cheers,

Simeon

15 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 20 Jan 2011, 03:10 PM
Hi simeon,

We`ve logged your question as a feature request in our PITS ( TreeView: Validation abilities based on INotifyDataErrorInfo interface like in input controls ) where you will be soon able to vote for.
A sample validation of whether there are some checked items in the tree could be achieved with using the mouse over event handler of the RadTreeView. You can check whether the RadTreeView.CheckedItems.Count is 0 or not and throw a warning message.
Hope this helped you.

Best wishes,
Petar Mladenov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 25 Mar 2011, 09:15 AM
Hi Petar,

Is this now possible with version 2010.2.812.1040 ? I'd like achieve the same, i.e. a validation tooltip around the RadTreeView which shows up if there are no selected items.

Cheers,
Ganesh
0
Petar Mladenov
Telerik team
answered on 25 Mar 2011, 02:11 PM
Hello Ganesh Shivshankar,

I prepared a project for you that uses the Loaded, Selected and Unselected events of the Q2 2010 (812) version of the RadTreeView in order to set/unset a Tooltip. Let me know if this fits in your scenario or not.

All the best,
Petar Mladenov
the Telerik team
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 31 Mar 2011, 12:15 PM
Hi Petar,

Thats not what I was looking for. I was able to achieve it differently. See attached screen shot.

Cheers,
Ganesh
0
Simeon
Top achievements
Rank 1
answered on 31 Mar 2011, 01:05 PM
Thats exactly what I was trying to achieve.  In the end we just gave up and used an alert.  Being a bit cheeky, but would you care to share your code Ganesh?  Because that looks excellent and would work in what I was trying to do....

Cheers,

Simeon
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 01 Apr 2011, 04:10 AM
Hi Simeon,

It does look impressive but it doesnt work with IDataErrorInfo. I had to specifically write logic to handle valid and invalid states. However that is still a generic logic. Unfortunately I'm not allowed to upload code due to my company policy restrictions. If you want give me your email id and I shall send a sample project to you from my residence.

Cheers,
Ganesh
0
Simeon
Top achievements
Rank 1
answered on 01 Apr 2011, 08:49 AM
Sure no problem you can mail me on swilkinson@mandata.co.uk
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 01 Apr 2011, 12:28 PM
Cool. Apparently I managed to get the treeview to show validation errors using IDataErrorInfo. Very happy with it now. Will send you the code tonight.

Cheers,
Ganesh
0
John Gartee
Top achievements
Rank 1
answered on 26 Oct 2011, 08:09 PM
I hesitate to ask, but this is the exact behavior I am looking for as well.  I would love to see your code.

I just fear that everybody and their brother is going to ask you to send your code sample

If you can spare the time, I would like to review it.

John Gartee.
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 27 Oct 2011, 05:49 AM
Try this link

https://tfrpqw.bay.livefilestore.com/y1pFOrlfZhxtMHG1TfNF7mfOwbxaLDulek87d7PBpNY4dnAClKBJtxyDCazmhyYUX8Qcwn01oijs0KK6zRcZ13CcA/TreeViewWithValidation.rar?download&psid=1

0
John Gartee
Top achievements
Rank 1
answered on 27 Oct 2011, 05:37 PM
Ganesh,

I'm sorry for the trouble, but your link is returning a 404 Not Found error.

John
0
Ganesh Shivshankar
Top achievements
Rank 1
answered on 31 Oct 2011, 04:37 AM
John,

Sorry for the late response. Give me your emailid. I shall send you the link today evening.

Thanks.
0
John Gartee
Top achievements
Rank 1
answered on 31 Oct 2011, 04:50 AM
I can be reached at jgartee@nbisolutions.net
Thanks very much
0
Yoan
Top achievements
Rank 1
answered on 05 Apr 2012, 09:34 AM
Hello everybody , I hope somebody will read my post because this theme still seems not to be forgotten. 
I have the same problem as John Gartee and Simeon , due to Telerik obviously still do not have a solution for this I would like to ask someone of those who have the code of Ganesh for validating the treeview to help me and send it ( if he does not mind ). My email is : yoan.petrov@gmail.com

Thanks in advance

Best regards,
Yoan
0
Bob
Top achievements
Rank 1
answered on 28 Dec 2012, 07:47 PM
Hello all,

Can someone email me the code that Ganesh used to "validate" the RadTreeView using IDataErrorInfo or INotifyDataErrorInfo?

My email is bbaldwin@trabongroup.com

Thanks in advance.

Bob Baldwin
aka VSDotNetGuy
Trabon Solutions
Tags
TreeView
Asked by
simeon
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Ganesh Shivshankar
Top achievements
Rank 1
Simeon
Top achievements
Rank 1
John Gartee
Top achievements
Rank 1
Yoan
Top achievements
Rank 1
Bob
Top achievements
Rank 1
Share this question
or