Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
Ultragrid and DataSource
posted

Hi, I am wondering if there is a better solution to a problem I am currently facing. I am still fairly new to this technology so please don't mind me and I can't seem to find a solution online.

Currently, I have a list of transaction call transactionList in the bussiness object. Starting off, I will have something like this:

private transactionList transactionList1 = null;

Then I through some method, I retrieve the list of transaction and populate the grid. Now I will have something like this:

transactionList1 = transactionList.getTransaction(something, something, something......);

FillGrid(transactionList1);

Now here's the problem... If I want to get something from the transactionList1 and do some changes to my grid I will have to do something like this.

for(){

uGrid.DisplayLayout.Rows[i].Cells[uGrid.ActiveCell.Column.Key].Value = transactionList1.getID();

}

for(){

uGrid.DisplayLayout.Rows[i].Cells[uGrid.ActiveCell.Column.Key].Value = transactionList1.getStartDate();

}

for(){

uGrid.DisplayLayout.Rows[i].Cells[uGrid.ActiveCell.Column.Key].Value = transactionList1.getExpireDate();

}

.

.

.

.....

You get the point. So I am wondering if there is any way I can set this up so I don't have to go through all 50 columns this way. Maybe I can do something to the business object or the DataSource to make things more reusable and robust.

Parents Reply Children