Possible to group textboxes for cangrow height?

4 posts, 0 answers
  1. Joel
    Joel avatar
    166 posts
    Member since:
    Oct 2006

    Posted 02 Jun 2011 Link to this post

    Not sure of the best way to approach this, any recommendations are welcome.  In the GroupHeaderSection I have 7 textboxes defined for column headers.  The textboxes are sized optimally to handle their contents 90% of the time.  Each box can grow vertically to accomodate longer text.  Each box has a 1px black border, per the customers requirements.

    What is happening is that one of the 7 textboxes is growing vertically, as designed, but what I would like to do is have all of the other boxes grow to the same height of the longest box, since it is a repeating header and looks pretty bad at the moment,

    Any suggestions?  Thanks.
  2. IvanDT
    Admin
    IvanDT avatar
    76 posts

    Posted 03 Jun 2011 Link to this post

    Hello Joel,

    Generally if you're after a tabular layout, you should utilize our Table item that takes care of this automatically.
     
    Other option is using the Anchoring and Docking properties of the TextBox. Take in consideration about the Docking that you must choose for the first six TextBoxes Left option and for the last to Fill option in order to fill the whole GroupHeaderSection. About the Anchoring you can just set the Bottom option.

    Kind regards,
    IvanDT
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Joel
    Joel avatar
    166 posts
    Member since:
    Oct 2006

    Posted 03 Jun 2011 Link to this post

    Thank you, the table appears ideal to me on the surface, but I have never understood how it could be implemented in a grouped scenario.  Currently I do the following for datasource assignment and leverage groups with header and detail.  All database processing is handled outside of the report layer.

    Partial Public Class DetailCrosstabWide
        Inherits Telerik.Reporting.Report
        Public Sub New(ByVal _lightcolor As Color, ByVal _DarkColor As Color, ByVal _RepTitle As String, ByVal _dt As DataTable)
            InitializeComponent()
            txt1.Style.BackgroundColor = _lightcolor
            txtTitle.Style.BackgroundColor = _DarkColor
            txtTitle.Value = _SvyTitle
            Me.DataSource = _dt
        End Sub
    End Class


    Since every group will have different headers, I would need to understand how I could access the header values (which are columns in the datatable) either as a value from the page datasource, or some other method.


    datatable structure is basically the following grouped by groupnametext

    groupnametext  rowtext1 col1headertxt1 col1val col2headertxt  col2val



      
  5. IvanDT
    Admin
    IvanDT avatar
    76 posts

    Posted 07 Jun 2011 Link to this post

    Hi Joel,

    In our previous response we suggest you to use Table as a different approach for your situation. If this does not apply very well for your scenario you can always use the second suggestion - Docking and Anchoring.
    If you decide to use the Table item, please review the respective articles:
    The Table itself has a header and it can be repeated on every page similarly to group header by using the ColumnHeadersPrintOnEveryPage property.
    All the best,
    IvanDT
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
Back to Top