This is a migrated thread and some comments may be shown as answers.
Processing.Table ItemDataBound
1 Answer 244 Views
This is a migrated thread and some comments may be shown as answers.
CodeR
Top achievements
Rank 2
CodeR asked on 31 Aug 2009, 08:09 AM

Hi,

I am having heaps of trouble converting an old report to one based on the new Table control.

On the old report I could create 'column' that incremented a number based on criteria of a DataItem. This used to be run against the detail.ItemDataBinding event. See example below:

    Private Sub detail_ItemDataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles detail.ItemDataBinding  
        Dim detail As Processing.DetailSection = CType(sender, Processing.DetailSection)  
        Dim dataItem As DataRowView = CType(detail.DataItem, DataRowView)  
        'new project id  
        If m_CurrentProjectID <> dataItem("ProjectID") Then  
            'reset project total  
            If m_CurrentProjectID <> -1 Then IncrementInvoiceNo()  
 
            m_CurrentProjectID = dataItem("ProjectID")  
            m_CurrentClientID = dataItem("ClientID")  
            '  m_totalInvoiceCost += dataItem("TotalAmount")  
 
        ElseIf m_CurrentClientID <> dataItem("ClientID") Then  
            'reset client total  
            If m_CurrentClientID <> "" Then IncrementInvoiceNo()  
 
            m_CurrentClientID = dataItem("ClientID")  
            ' m_totalInvoiceCost += dataItem("TotalAmount")  
        End If  
 
        m_totalInvoiceCost += dataItem("TotalAmount")  
    End Sub 

  Now though, I am binding my data against a Prossessing.Table . i.e.

 Me.Table1.DataSource = l_dt.DefaultView 

Can I still get to the DataItems using the latest version of Reporting in a similar way to above using the Processing.Table ItemDataBound or ItemDataBinding events?

Cheers,

Damo.

1 Answer, 1 is accepted

Sort by
0
Hrisi
Telerik team
answered on 01 Sep 2009, 04:35 PM
Hi Damien Coyle,

The short answer is yes, all Report Items have ItemDataBinding/ItemDataBound events. In your example the ItemDataBound event is not required for what you use DetailSection, because you can achieve the same by using expressions and knowledge of Table Row Hierarchies.  Please, try our Table/Crosstab Wizard and let us know what do you think.

 
Greetings,
Hrisi
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Asked by
CodeR
Top achievements
Rank 2
Answers by
Hrisi
Telerik team
Share this question
or