RadTreeView and DataValidation with INotifyDataErrorInfo

16 posts, 0 answers
  1. simeon
    simeon avatar
    12 posts
    Member since:
    Sep 2008

    Posted 17 Jan 2011 Link to this post

    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
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Jan 2011 Link to this post

    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>>
  3. DevCraft banner
  4. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 25 Mar 2011 Link to this post

    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
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 25 Mar 2011 Link to this post

    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
  6. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 31 Mar 2011 Link to this post

    Hi Petar,

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

    Cheers,
    Ganesh
  7. Simeon
    Simeon avatar
    23 posts
    Member since:
    Jul 2012

    Posted 31 Mar 2011 Link to this post

    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
  8. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 31 Mar 2011 Link to this post

    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
  9. Simeon
    Simeon avatar
    23 posts
    Member since:
    Jul 2012

    Posted 01 Apr 2011 Link to this post

    Sure no problem you can mail me on swilkinson@mandata.co.uk
  10. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 01 Apr 2011 Link to this post

    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
  11. John Gartee
    John Gartee avatar
    7 posts
    Member since:
    Mar 2004

    Posted 26 Oct 2011 Link to this post

    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.
  12. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 27 Oct 2011 Link to this post

    Try this link

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

  13. John Gartee
    John Gartee avatar
    7 posts
    Member since:
    Mar 2004

    Posted 27 Oct 2011 Link to this post

    Ganesh,

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

    John
  14. Ganesh Shivshankar
    Ganesh Shivshankar avatar
    78 posts
    Member since:
    Sep 2009

    Posted 30 Oct 2011 Link to this post

    John,

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

    Thanks.
  15. John Gartee
    John Gartee avatar
    7 posts
    Member since:
    Mar 2004

    Posted 30 Oct 2011 Link to this post

    I can be reached at jgartee@nbisolutions.net
    Thanks very much
  16. Yoan
    Yoan avatar
    17 posts
    Member since:
    Jan 2012

    Posted 05 Apr 2012 Link to this post

    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
  17. Bob
    Bob avatar
    46 posts
    Member since:
    Apr 2012

    Posted 28 Dec 2012 Link to this post

    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
Back to Top
DevCraft banner