This question is locked. New answers and comments are not allowed.
Hi Telerik,
Currently we have a telerik window which has a telerik panel bar inside. Inside the panel bar we are displaying a tree view as seen in the screenshot. Since the panel bar has a fixed width we keep seeing the horizontal scrollbar when the nodes are expanded if it becomes too long to display.
We are wondering if we can tweak the html attributes of the treeview so that it doesn't display the scrollbar, and instead we wrap the text based on the available width within the tab panel.
We are supporting this effort in many browsers (IE7, 8, latest Chrome, and latest FF).
Here is the treeview source code:
Html.Telerik().TreeView()
.Name("TreeView")
.ShowCheckBox(true)
.ExpandAll(Model.Expand)
.BindTo(Model.PhaseCodeTree, mappings =>
{
mappings.For<Aquilent.Cara.Domain.PhaseCodeSelect>(
binding => binding.ItemDataBound((item, code) =>
{
item.Checked = false;
item.Enabled = true;
if (code.CodeId == 0)
{
item.Checkable = false;
}
item.Text = code.CodeNumberDisplay + " " + code.CodeName;
item.Value = code.PhaseCodeId.ToString();
})
.Children(code => code.ChildCodes));
mappings.For<Aquilent.Cara.Domain.PhaseCodeSelect>(binding => binding.ItemDataBound((item, code) => { item.Text = code.CodeName; }));
})
.HtmlAttributes(new { style = "height: 220px;overflow: auto;position: relative" })
.Render();
And the tab panel, per Telerik's suggestion (for another IE7 display issue that was answered), we are using a class called scrollable:
<% Html.Telerik().PanelBar()
.Name("CodingBar")
.ExpandMode(PanelBarExpandMode.Multiple)
.HighlightPath(false)
.Items(items =>
{
items.Add()
.Text("Coding")
.HtmlAttributes(new { @class = "scrollable" })
.Content(() =>
{%>.............................
Here is the scrollable style:
.scrollable .t-group
{
overflow: auto;
}
Thanks,
Wai Kei
Currently we have a telerik window which has a telerik panel bar inside. Inside the panel bar we are displaying a tree view as seen in the screenshot. Since the panel bar has a fixed width we keep seeing the horizontal scrollbar when the nodes are expanded if it becomes too long to display.
We are wondering if we can tweak the html attributes of the treeview so that it doesn't display the scrollbar, and instead we wrap the text based on the available width within the tab panel.
We are supporting this effort in many browsers (IE7, 8, latest Chrome, and latest FF).
Here is the treeview source code:
Html.Telerik().TreeView()
.Name("TreeView")
.ShowCheckBox(true)
.ExpandAll(Model.Expand)
.BindTo(Model.PhaseCodeTree, mappings =>
{
mappings.For<Aquilent.Cara.Domain.PhaseCodeSelect>(
binding => binding.ItemDataBound((item, code) =>
{
item.Checked = false;
item.Enabled = true;
if (code.CodeId == 0)
{
item.Checkable = false;
}
item.Text = code.CodeNumberDisplay + " " + code.CodeName;
item.Value = code.PhaseCodeId.ToString();
})
.Children(code => code.ChildCodes));
mappings.For<Aquilent.Cara.Domain.PhaseCodeSelect>(binding => binding.ItemDataBound((item, code) => { item.Text = code.CodeName; }));
})
.HtmlAttributes(new { style = "height: 220px;overflow: auto;position: relative" })
.Render();
And the tab panel, per Telerik's suggestion (for another IE7 display issue that was answered), we are using a class called scrollable:
<% Html.Telerik().PanelBar()
.Name("CodingBar")
.ExpandMode(PanelBarExpandMode.Multiple)
.HighlightPath(false)
.Items(items =>
{
items.Add()
.Text("Coding")
.HtmlAttributes(new { @class = "scrollable" })
.Content(() =>
{%>.............................
Here is the scrollable style:
.scrollable .t-group
{
overflow: auto;
}
Thanks,
Wai Kei
