Updating Grid

Updating Grid

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


RanchCharm posted on Thursday, November 29, 2007

Hello,

I have following list and objects (made up example)
 1. Customers BussinesListBase  -> has list of Customer objects (BusinessBase)
 2. Each Customer has a list called Orders (BusinessListBase) -> Orders have list of Order objects (BusinessBase).

I have two grids, one on top which shows list of Customers. Second one right below the top with list of Orders for selected Customer.

I want to show a dirty icon and invalid icon in the Orders grid when an Order is dirty or invalid. This way when the user sees list of Broken Rules they know which Order to fix from 100s of Orders displayed.

Do I have to subscribe to every Orders List changed event in all Customers in the UI to update the icons on the Row? Is there a easy way. I am using Infragistics UltraGrid.

I think am missing something about the IDataErrorInfo. Will that help? I tried to find similar article couldn't find one. If you know please let me know.

Thanks,
Nachi

ajj3085 replied on Friday, November 30, 2007

Well, you may want to post what you actually have instead of an example.  The example you provide likely is not the correct object model at all. 

RanchCharm replied on Friday, November 30, 2007

Thanks for looking at the Post.

My Object model looks like the way I explained. I just changed only the name of the objects. Here is the real Model.

I have a LoanList -> Which has Loan Objects. Each Loan Object has a  PaymentTransactions -> which is a list of PaymentTransaction objects. Each PaymentTransaction has another List which is irrelevant for the question.

Now I am thinking what is wrong with the object model.

Thanks,
Nachi

ajj3085 replied on Friday, November 30, 2007

Well it depends on your use case, but it seems very unlikely that you'll load a list of Loans, which corrosponding Transactions, and edit them all at once and save the entire list in a single transaction.

What is your use case that you need all of those things editable at once?  At the very most, LoadList would be an EditableRootListBase, since changes to one loan I would think should save regardless of whether or not other loans save.

So.. what's your use case?

RanchCharm replied on Friday, November 30, 2007

First a BIG Thanks for taking so much effort into looking this Problem. here is a brief description of use cases/project:

Users cannot create/delete existing loans. This is done in a different department which originates/closes loans. Loans are always in my system.

Users can only create/modify/delete Payment Transactions. They could modify few Loan details as well. Users generally upload (or create) one or more Payment information for one or more loans at the same time. They rarely edit one loan at a time.

They copy say Loan # (or other loan identifier), Transaction Dt, Payment Amount from excel file into a grid and click Update. I load all Loans into LoanList using the Loan #. Add new transactions if valid, sometimes payment transactions are valid by themselves but doesn't make sense when you combine with other transactions. Such Transactions I should add them but indicate the user that there is an issue.

I am looking for a way to tell the user that the transaction is new/changed and it is invalid by showing an icon next to the Payment Transaction in the grid.

Was that clear?

Thanks,
Nachi

Copyright (c) Marimer LLC