RenderTable page change

Originally Posted 30 January 2017, 7:47 am EST

  • Originally Posted 30 January 2017, 7:47 am EST

    how is it possible to get the first row of a render tabel when -since i have a lotta rows - it changes rendering over another table?
    For example if i have 46 rows, the first 32 are rendered over the first page and is is correct: but i need to point at the row number 33, which is the first at the top of the second page.


    Fabio La Vitola
  • Marked as Answer



    You can retrieve the first row of the RenderTable on a page in PageAdded event as follows:

    private void _printDocument_PageAdded(C1PrintDocument sender, PageEventArgs e)
    foreach (RenderFragment fragment in e.Page.Fragments)
    foreach (object child in fragment.Children)
    if (child.GetType() == typeof(RenderTextFragment)) {
    RenderText text = ((RenderTextFragment)child).RenderObject;
    listBox1.Items.Add("page: " + (e.Page.Index + 1) + " , starting row: " + text.TableRow);

    For getting a row corresponding to index, use :

    TableRow tr = rt.Rows[index];

    Please find the sample application attached for complete implementation.
    Note: You can modify the sample based on your requirement(s).

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels