Error TreeView

Error TreeView

Old forum URL: forums.lhotka.net/forums/t/1307.aspx


xal posted on Friday, September 22, 2006

Hello everybody!

I'm happy to announce the release of the ErrorTreeView on codeplex.

This is the first release of the project. The functionalities it provides are:

-Display a tree structure with the errors that your whole BO structure contains.
-Supports the renaming of objects on the fly.
-Supports all 3 severities of rules with their corresponding icons.
-Recognizes the adding/removing of child, grandchild, etc items to your structure.
-Fires an event (on double click) that you can easily handle to point the user to the correct property / item in a collection.

I hope you find it useful! You can get it at the CodePlex site.

Here's a screenshot for your viewing pleasure...


Andrés

cash_pat replied on Saturday, September 23, 2006

Thanks a Lot.

Baldu replied on Saturday, September 23, 2006

Very nice!

I don't think I'd use this in an end-user UI, but I can see it being useful in testing & debugging scenarios.

Thank you for that.

Charlie

Brian Criswell replied on Saturday, September 23, 2006

That is fantastic!  Can you set the ImageList for it or set the icons in some other manner?

xal replied on Saturday, September 23, 2006

I do plan to extend it and make it more customizable.
I'm currently using that in some projects where people don't like error providers, and in projects that handle way too many children to display a messagebox.
I also have a docked window in one of the apps that handles errors for all the "tabs" (instead of modals). That looks really nice and it's easy to create. The users can hide, drag or close the error window, just like in visual studio.
The nicest thing is that if you have 20k children, you can easily point the user to the one that has problems.

Plans for the future include:
-Choose what severities you want to show.
-Change icons or disable them.
-Provide a way to indicate which item is being edited to the tree, so that the user will be able to easily find the issues of the item being edited.


I might be missing some stuff, but that's mainly it.


Andrés

Pavel replied on Friday, May 25, 2007

I try to set ValidationRules for SomeValue property (if SomeValue=0 then message should popup) and it works for me showing message only for the first Child or GrandChild in GridView  controls.

What might be the problem ?

xal replied on Friday, May 25, 2007

Did you take a look at the sample app?
What's your object hierarchy like (class name & object type)?


Andrés

Pavel replied on Saturday, May 26, 2007

Andres,
I am using the sample that provided with ErrorTreeView.

Thanks,

Vaidal replied on Tuesday, May 29, 2007

I can´t find the source...

xal replied on Wednesday, May 30, 2007

Well, I don't know where the cslacontrib section of the forum went... but anyway:
http://www.codeplex.com/CSLAcontrib/SourceControl/DownloadSourceCode.aspx?changeSetId=6528

In there you should be able to find the source.

Pavel, I just tried it with the latest csla. The only issue I could find is that the rule methods were not static, so the sample app crashes on load. Anyway, changing those methods to "Shared" fixed it and i see that the tree behaves appropriately...

What exactly do you see?

Andrés

xal replied on Wednesday, May 30, 2007

Pavel:
Duh! sorry, I see your problem is related to what I just posted. Make sure the rule methods are Shared.

Andrés

Pavel replied on Thursday, May 31, 2007

xal:


Pavel, I just tried it with the latest csla. The only issue I could find is that the rule methods were not static, so the sample app crashes on load. Anyway, changing those methods to "Shared" fixed it and i see that the tree behaves appropriately...

What exactly do you see?

Andrés


Thanks Andres,

I changed ValidateRule function to Share and I changed AddRule as shown below and it started working.
 ValidationRules.AddRule(Of Child)(AddressOf ValidateValue, "SomeValue")

This is the old code: ValidationRules.AddRule(Of Child, Csla.Validation.RuleArgs)( _
        'AddressOf ValidateValue, New Csla.Validation.RuleArgs("SomeValue"))

e.Severity was changed to Csla.Validation.RuleSeverity.Error or ignored at all.

It is working now.
Thanks

Pavel replied on Thursday, May 31, 2007

One more question,

Now ErrorTreeView is working and if I DoubleClick on error message node the row in Gridview selected respectively.
It's great.
Any idea how to select a particular cell not row where a wrong value located ?

I assume than in real application with many columns it would be more efficient way to point a user where to fix a problem.

Thanks,

Pavel

xal replied on Thursday, May 31, 2007

What do you mean with this??
>> "e.Severity was changed to Csla.Validation.RuleSeverity.Error or ignored at all."


How to focus row + column? I didn't do any research, but I don't suppose it would be too hard...
Just loop through the grid's Columns collection and find the one bound to the same property. I suppose the grid has a way of focusing a specific column... but I never really tried that...

Andrés

Pavel replied on Friday, June 01, 2007

xal:
What do you mean with this??
>> "e.Severity was changed to Csla.Validation.RuleSeverity.Error or ignored at all."

Andrés


ErrorTreeView would still show a message, but GridView will be without exclamation sign in case Information or Warning level.
That is it -:)



vsp replied on Thursday, June 21, 2007

I have downloaded the code but it is VB. Do you have C# version and let me know the location?

Thanks

xal replied on Sunday, June 24, 2007

Sorry, no c# version. You could still reference the compiled dll from your c# project and use it though...
Just make sure you compile both your app and the treeview against the same version of csla.

Andrés

Copyright (c) Marimer LLC