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

Possible to group textboxes for cangrow height?

3 Answers 322 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 2
Joel asked on 02 Jun 2011, 05:46 PM
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.

3 Answers, 1 is accepted

Sort by
0
IvanDT
Telerik team
answered on 03 Jun 2011, 05:13 PM
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
0
Joel
Top achievements
Rank 2
answered on 03 Jun 2011, 07:51 PM
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



  
0
IvanDT
Telerik team
answered on 07 Jun 2011, 04:40 PM
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
Tags
General Discussions
Asked by
Joel
Top achievements
Rank 2
Answers by
IvanDT
Telerik team
Joel
Top achievements
Rank 2
Share this question
or