How to design the Details Section of a group at the run time

4 posts, 1 answers
  1. Utku Ozan
    Utku Ozan avatar
    8 posts
    Member since:
    Feb 2008

    Posted 10 Mar 2009 Link to this post

    I am trying to create a report which will basically show data in groups. But the thing is that for each group the data to display might vary, both in columns and rows. This is why I can not design a Details Section at the Design-Time. While starting to process each group I am converting the necessary data while the groupHeader is being bound with:

    private void groupHeaderSection4_ItemDataBound(object sender, EventArgs e) 
        Telerik.Reporting.Processing.GroupSection dtl = (Telerik.Reporting.Processing.GroupSection)sender; 
        sectionsData = ConvertToDataTable(dtl); 
    which is OK. But after getting this re-constructed DataTable I want to design the Details Section of the Group according to the DataTable returned; which basically means to create columns and rows manually.

    To create a custom grid on the fly I am trying to create TextBoxes and manually design them. This is where it gets stuck. I am doing this while binding data to the Details Section as:
    1 private void detail_ItemDataBinding(object sender, EventArgs e) 
    3     Telerik.Reporting.Processing.DetailSection dtl = (Telerik.Reporting.Processing.DetailSection)sender; 
    4     dtl.Items.Clear(); 
    5     ProcessingBindColumnNames(dtl); 
    8 protected void ProcessingBindColumnNames(Telerik.Reporting.Processing.DetailSection dtl) 
    10     double columnWidth = (double)(Convert.ToDouble(dtl.Width) - Convert.ToDouble(tbDurumWidth)) / (sectionsData.Columns.Count - 1); 
    11     tbColumnWidth = new Telerik.Reporting.Drawing.Unit(columnWidth, UnitType.Cm); 
    12     for (int c = 0; c < sectionsData.Columns.Count - 1; c++) 
    13     { 
    14         Telerik.Reporting.Processing.TextBox tb = new Telerik.Reporting.Processing.TextBox(); 
    15     } 
    But at the line 14 I am getting "The Type 'Telerik.Reporting.Processing.TextBox' has no constructors defined".

    How can I create a TextBox while binding the Group Details Section and why this item has no constructor but Intellisense brings me one when I type new?

  2. Juzzer
    Juzzer avatar
    12 posts
    Member since:
    Sep 2007

    Posted 11 Mar 2009 Link to this post

    Try changing

    Telerik.Reporting.Processing.TextBox tb = new Telerik.Reporting.Processing.TextBox();


    Telerik.Reporting.TextBox tb = new Telerik.Reporting.TextBox();
  3. DevCraft banner
  4. Utku Ozan
    Utku Ozan avatar
    8 posts
    Member since:
    Feb 2008

    Posted 12 Mar 2009 Link to this post

    Of course I can create the TextBox from

        Telerik.Reporting.TextBox tb = new Telerik.Reporting.TextBox();

    but this time after creating and formatting necessary controls I can not add them to the detailsSection which created from the type of


    As far as I can understand Telerik.Reporting.Processing objects can only interact with objects from the same class.
  5. Answer
    Steve avatar
    10941 posts

    Posted 12 Mar 2009 Link to this post

    Hello Utku Ozan,

    The very idea of creating processing items is not a good one and Telerik.Reporting.Processing.TextBox does not have a constructor as it's not meant to be used for creating items. As Juzzer suggested, you should work with the definition items.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top