OT: Infragistics grid bands

OT: Infragistics grid bands

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


Michael Hildner posted on Tuesday, November 14, 2006

I see that the Infragistics grid automatically creates bands for you if your bo contains a list of other bo's. How do you go about filtering the child band so it only shows records associated with the expanded parent record?

I'm trying to show a list of "Tickets", where each Ticket has a collection of "Orders". Right now every order is showing up under every ticket. Or do I need to make a DataSet and do the relationship in there?

Thanks,

Mike

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

That should work automatically (we use CSLA + Infragistics extensively for exactly this case).  I've never seen a case where it pulls in "extra" records.  Are you sure your "Orders" collection under each "Ticket" is actually loading only those records it should?

Michael Hildner replied on Tuesday, November 14, 2006

No, I'm not :) I'm doing it wrong. I think I can fix that, but just a quick question - can you do this with one trip to the database? Or would each ticket fetched have to make another trip to the DB to retrieve its orders?

Thanks,

Mike

 

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

If this comes through just ignore.  My post reply keeps failing so I'm just trying this small message as a test.

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

No idea what is going on but I just cannot post my reply!!!  I'll try it in pieces.  Here goes:

That is up to you depending on your implementation.  We actually use three different methods depending on scenerio.   They are:

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

1) Default CSLA method - this will require a seperate trip to the DB for each child collection (though as part of same SQL transaction and using the same connection) and load each child collection initially

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

2) Lazy-Loading method - this will require a seperate trip to the DB for each child collection (seperate SQL transaction and connection), but will only load each child collection when you actually need it (when you expand the parent band in the grid to show the children). 

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

3) Single DB call method - if we know we will always need all child collections we'll return each object and all child (grandchild, etc as needed) in one DB call.  This can be very helpful in some cases (in one case we went from making over 50,000 seperate DB calls to 1).  You can find details on this with a search on this and the old forums.  I've also written a little document for our developers on our use of this method I could share but its fairly specific and references some of our objects and code as examples so not sure how much use it would be (not very general).

CaymanIslandsCarpediem replied on Tuesday, November 14, 2006

Ahh!  I originally had a URL link to a one such discusiion on loading children, etc in one call and it seems thats what was making my post fail.  Let me try it again.  Here is the link:

http://forums.lhotka.net/forums/thread/8542.aspx

Michael Hildner replied on Tuesday, November 14, 2006

Wow, thanks for being persistent. I appreciate the info. Nice to have options. For this particular case, I think I'll go the lazy-loading approach, only because the user will somewhat infrequently drill down, and that should just be for a ticket or two.

Thanks again,

Mike

Bayu replied on Tuesday, November 14, 2006

Hey Michael and CaymanIslandsCarpeDiem .....

Just out of curiosity ... are you also involved into developing WinForms applications using CAB?

If so, how is your experience with using the trio of CSLA + Infragistics + CAB?

Bayu

Michael Hildner replied on Tuesday, November 14, 2006

Hey Bayu,

I've played with CAB and Infragistics, but not with CSLA - this was before I discovered CSLA. I don't see why they couldn't be used together, though.

For what I was doing, CAB was pretty cool, but I think it was overkill for what I needed. Takes longer to develop stuff and I never needed to re-use the views - if I remember that terminology right.

What I did want to have was a plug-in type app where the plug-ins could talk to each other. So the event broker mechanism was cool.

BTW, I assume you know that Infragistics has it's own CAB components too.

Bayu replied on Tuesday, November 14, 2006

Michael Hildner:

Hey Bayu,

I've played with CAB and Infragistics, but not with CSLA - this was before I discovered CSLA. I don't see why they couldn't be used together, though.

For what I was doing, CAB was pretty cool, but I think it was overkill for what I needed. Takes longer to develop stuff and I never needed to re-use the views - if I remember that terminology right.

What I did want to have was a plug-in type app where the plug-ins could talk to each other. So the event broker mechanism was cool.

BTW, I assume you know that Infragistics has it's own CAB components too.



Hi Michael,

You're quick! ;-)

In my current project I am combining these three, they go together excellently indeed. I am aware of the CAB extensions implemented by Infragistics, it was one of the reasons that led me to buying their toolkit. ;-)

The reason I asked is that I am about to deploy my app. One of the challenges I will have to tackle soon is about deployment. With CAB I have realized a nicely decoupled plugin architecture, just like you say. So I have the potential of low deployment overhead. What I was interested in is in how to actually go about exploiting this potential ....

You see I want to install the CAB and Infragistics assemblies in the GAC of my customer. But all the plugin-, Csla-, and my BO and DAL assemblies  are best kept as private assemblies that can be updated/upgraded easily. I have had a look at ClickOnce and the AppUpdater App. Block, but I am not sure yet  what to do. Any ideas?

Did your experiments with CAB ever make it to a deployed app?

Thanks in advance!
Bayu

Michael Hildner replied on Tuesday, November 14, 2006

Bayu,

Yeah, my app was deployed with ClickOnce. I've never installed anything in the GAC. I never wanted that extra maintenence. I guess you'd be safe with CAB - that hasn't changed in almost a year, I believe, but Infragistics changes pretty quickly.

I just didn't see the advantage of installing anything in the GAC - nothing that offset the maintenance. Disk space is cheap :)

Not sure if you know how ClickOnce works, hope I'm not saying something you already know, but once your app is installed, and then you update your assemblies, only the modifed assemblies get sent over the wire. For example, one app I have and update regularly is only about 2-3 megs for the GUI and business library. That's usually the only thing that changes, so that's all the user has to wait for. Recently I upgraded to Infragistics 6.3, so that deployment was about 31 megs total.

Regards,

Mike 

Bayu replied on Wednesday, November 15, 2006

Michael Hildner:

Yeah, my app was deployed with ClickOnce. I've never installed anything in the GAC. I never wanted that extra maintenence. I guess you'd be safe with CAB - that hasn't changed in almost a year, I believe, but Infragistics changes pretty quickly.


I have never worked with ClickOnce yet. But is sounds like a good alternative. With ClickOnce, will updates be atomic? In other words, if you have a new version of Infragistics and correspondingly a new UI, then you wouldn't want the user to be able to run the app while only the new UI has been updated so far and the remainder is still in progress. Hmm, saying this, I cannot imagine they dit not make it atomic.

Michael Hildner:

I just didn't see the advantage of installing anything in the GAC - nothing that offset the maintenance. Disk space is cheap :)


Good point. I may be a bit too concerned about just a few MBs.

Michael Hildner:

Not sure if you know how ClickOnce works, hope I'm not saying something you already know, but once your app is installed, and then you update your assemblies, only the modifed assemblies get sent over the wire. For example, one app I have and update regularly is only about 2-3 megs for the GUI and business library. That's usually the only thing that changes, so that's all the user has to wait for. Recently I upgraded to Infragistics 6.3, so that deployment was about 31 megs total.



Time to learn about ClickOnce I guess. ;-)

Thanks! Your comments are much appreciated.

Regards,
Bayu

Michael Hildner replied on Wednesday, November 15, 2006

>>you wouldn't want the user to be able to run the app while only the new UI has been updated so far and the remainder is still in progress

That doesn't happen, nothing to worry about there. I think ClickOnce is great, I'd go for it.

Here's a helpful FAQ http://www.windowsforms.net/FAQs/default.aspx?PageID=1&CategoryID=24&tabindex=2

ajj3085 replied on Wednesday, November 15, 2006

I don't use CAB, but I do use Infragistics, and it deploys wonderlyfully with ClickOnce.

All updates are downloaded before the app runs, so you don't need to worry about anything being out of date.

Just one word of warning; the user can Skip the update if its detected.  Because of this, my application checks its version number against a value stored in the database, which defines the minium version of the application to run.  That way, I can keep older clients out in case the database structure has changed.

HTH
Andy

Bayu replied on Wednesday, November 15, 2006

ajj3085:


Just one word of warning; the user can Skip the update if its detected.  Because of this, my application checks its version number against a value stored in the database, which defines the minium version of the application to run.  That way, I can keep older clients out in case the database structure has changed.



I'll keep that in mind, I am pretty sure I will need such a check.
Thanks for that one.

Bayu

ajj3085 replied on Friday, November 17, 2006

Just to update.

There is a way to specify a minimum version, and the user then doesn't get to choose to update.  It just downloads automatically.

Its an option for the deployment manifest.

HTH
Andy

Copyright (c) Marimer LLC