This is a migrated thread and some comments may be shown as answers.

How to set the value for hidden field in radgridview.

1 Answer 22 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tai
Top achievements
Rank 1
Tai asked on 09 Sep 2010, 12:05 AM
Hi (thank you , I figured it out)

Assuming that i have a radgridview which will be bound to an EntitySet<Report> through DomainDataSource control.
my Entity "Report" has some fields such as:
     Description
    Debit 
    Credit

    TransactionAmount
    .....

On the ridview, i only let the grid display Description, Debit and Credit column so user can enter and modify those.
So right now each row on the grid only has 3 columns (but each Report has 4 fields)

What i want to implement now is that everytime a user has done insert/edit (Debit,Credit) row, then the value of the transactionAmount will be updated accordingly by the rule "transactionamount = debit - credit".

I am thinking about using the RowEditedEnd in order to update the transactionamount. However, I don't know which method to call in order to retrieve the Report (which has 4 fields) row of the selected one(SelectedItem only return the current Row which supposes to have only 3 columns). And call the suitable field for the report in order to save the selected Report back to the server side and goes into the database.

Can you provide me some guideline for my case?
thank you

1 Answer, 1 is accepted

Sort by
0
Tai
Top achievements
Rank 1
answered on 09 Sep 2010, 09:10 AM
Hi 
Never mind, i figure it out. The e.NewData will do the trick for my case
Tags
GridView
Asked by
Tai
Top achievements
Rank 1
Answers by
Tai
Top achievements
Rank 1
Share this question
or