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

Grid- NestedViewTemplate

0 Answers 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Priya
Top achievements
Rank 1
Priya asked on 07 Jan 2013, 02:55 PM

Hi,

In Radgrid I am displaying invoice details like -'Invoice- Legal fee', 'Invoice- expenses' and 'Invoice- discount'.

Below each Invoice I am creating NestedViewTemplate for displaying Invoice's Credit memo details like 'Credit memo- Legal fee', 'Credit memo-  expenses' and 'Credit memo- discount'.

Now for displaying Grand Total for Legal fee, expenses, discount I want to do something like this –

 (Invoice- Legal fee- Credit memo- Legal fee)

(Invoice- expenses' - Credit memo- expenses')

(Invoice- discount'- Credit memo- discount')

This is working properly using

     Protected Sub RadGrid2_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)

            If TypeOf e.Item Is GridFooterItem Then

                Dim footerItem As GridFooterItem = TryCast(e.Item, GridFooterItem)

                If footerItem("Total").Text <> "" Then

                    strCMTotal1 = footerItem("Total").Text

                    strCMLegalSum1 = footerItem("Legal_Fees").Text

                    strCMExpenseSum1 = footerItem("Expenses").Text

                    strCMDiscount1 = footerItem("Discount").Text

                    strCMAdminFees1 = footerItem("%_of_Legal_Fees").Text

                    footerItem("Legal_Fees").Text =  strCMLegalSum1 - strCMLegalSum / 3   ‘Subtracting Credit memo details from Invoice details

                    footerItem("Expenses").Text = strCMExpenseSum1 - strCMExpenseSum / 3    ‘Subtracting Credit memo details from Invoice details

                    footerItem("Discount").Text =  strCMDiscount1 - strCMDiscount / 3    ‘Subtracting Credit memo details from Invoice details

                    footerItem("%_of_Legal_Fees").Text =   strCMAdminFees1 - strCMAdminFees / 3    ‘Subtracting Credit memo details from Invoice details

                    footerItem("Total").Text =  strCMTotal1 - strCMTotal / 3    ‘Subtracting Credit memo details from Invoice details

                End If

            End If

        End Sub

, but when I search (using grid filter), grand Total is not correct because i am not able to access filtered records and filtered credit memo details. Please suggest.

It’s very urgent. Thanks in advance.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Priya
Top achievements
Rank 1
Share this question
or