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

List - Get the filtered datarow

1 Answer 18 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Chris asked on 12 Jan 2016, 06:09 AM
HI

Is there have the built-in function to get the filtered data (filtered DataRows) before and after binding :

Binding :

  private void list1_NeedDataSource(object sender, EventArgs e)
  {
    System.Data.DataTable.datatable = dataset.Tables["table1"];
    //
    list1.DataSource = datatable;
    list1.Filters.AddRange(this.Filters);
    ... 
  }

    private void list1_ItemDataBinding(object sender, EventArgs e)
    {
      Telerik.Reporting.Processing.Table list = (Telerik.Reporting.Processing.Table)sender;
      DataTable NewTable = (DataTable)list.DataObject;
      foreach (DataRow LoopRow in NewTable.Rows)
        ... 
    }
 
or I need to filter the datarows by myself then set the list1.DataSource ?

Best regards

Chris
 
 

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 14 Jan 2016, 12:36 PM
Hi Chris,

Filters can be specified in the report definition and data will be filtered automatically. Please check Filtering data.

You can also use the data item's NeedDataSource event to set the data for the processing item - Using Report Events.


Please check also my update in the Printing Across and then Down Multi-Column Report forum thread.


Let us know if you have any further questions.

Regards,
Stef
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Stef
Telerik team
Share this question
or