or
Is there a way to set the height of a multi-row textbox so that it automatically shows it's complete content without scrollbars, but also without unnecessary white space at the bottom?
Reason: I have a page which can be in edit or in read-only mode. In read-only mode, I'd like for all input controls to show their complete content, regardless of the amount of text (e. g. for printing). Is this possible?
<script
type
=
"text/javascript"
>
function stopPropagation(e) {
e.cancelBubble = true;
if (e.stopPropagation) {
e.stopPropagation();
}
}
function RadComboBox_OnClientLoad(sender) {
sender.get_inputDomElement().readOnly = "readonly";
}
</
script
>
<
div
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"rdProjectDeliverables"
Width
=
"215px"
CheckBoxes
=
"true"
Text
=
"Project Deliverables"
AllowCustomText
=
"false"
EnableLoadOnDemand
=
"false"
EmptyMessage
=
"Project Deliverables"
OnClientLoad
=
"RadComboBox_OnClientLoad"
OnClientItemChecked
=
"OnClientItemChecked"
AutoPostBack
=
"true"
>
<
Items
>
<
telerik:RadComboBoxItem
Text
=
""
Value
=
""
/>
<
telerik:RadComboBoxItem
Text
=
""
Value
=
""
/>
</
Items
>
<
ItemTemplate
>
<
asp:CheckBox
runat
=
"server"
ID
=
"CheckBox"
onclick
=
"stopPropagation(event);"
oncheckedchanged
=
"rdProjectDeliverables_CheckedChanged"
AutoPostBack
=
"true"
Text
=
""
/> <%# DataBinder.Eval(Container, "Text") %>
</
ItemTemplate
>
</
telerik:RadComboBox
>
</
div
>
protected void rdProjectDeliverables_CheckedChanged(object sender, EventArgs e)
{
GetMultiSelectDropDownSelections(rdProjectDeliverables);
}
private void GetMultiSelectDropDownSelections(RadComboBox ddl)
{
ArrayList checkedItems = GetCheckedItems(ddl);
foreach (RadComboBoxItem item in checkedItems)
{
//lblMessage.Text = lblMessage.Text + item.Value + "<
br
>";
if (item.Value == "9") //Value of 9 is the value of "Other" which requires a textbox to appear
{
pnlProjectDeliverablesOther.Visible = true;
requestitem.ProjectDeliverablesOther = fldProjectDeliverablesOther.Text;
}
requestitem.RequestId = _requestid;
requestitem.Value = DataHelper.ToInt32(item.Value);
if (_requestorid > 0)
{
requestitem.MultiSelectionSave();
}
}
}
private ArrayList GetCheckedItems(RadComboBox ddl)
{
ArrayList checkedItems = new ArrayList();
foreach (RadComboBoxItem item in ddl.Items)
{
CheckBox checkBox = (CheckBox)item.FindControl("CheckBox");
if (checkBox.Checked)
{
checkedItems.Add(item);
}
}
return checkedItems;
}
<
telerik:GridCalculatedColumn
DataFields
=
"Customer.Addresses"
Expression
=
"Count( Child )"
>
Dim
q = emp.BenchmarkForTask(50, 3,
"12/1/13"
)
' This gets my data
Dim
lemp
As
String
=
""
lemp =
""
chrtPerformanceNew.PlotArea.XAxis.Name =
"Employee"
chrtPerformanceNew.PlotArea.XAxis.DataLabelsField =
"Employee"
' Load each series from the data:
For
Each
tmp
In
q.OrderBy(
Function
(x) x.Employee)
If
lemp <> tmp.Employee
Then
Dim
x
As
New
Telerik.Web.UI.LineSeries
x.Name = tmp.Employee
x.DataFieldY =
"Performance"
x.LabelsAppearance.Visible =
False
x.TooltipsAppearance.DataFormatString =
"{WorkDay} - YO!"
x.LabelsAppearance.DataField =
"WorkDay"
chrtPerformanceNew.PlotArea.Series.Add(x)
lemp = tmp.Employee
End
If
Next
' Load data into series. How to I set it to the correct X axis?
For
Each
tmp
In
q.OrderBy(
Function
(x) x.WorkDay)
Dim
i
As
Integer
= 0
For
i = 0
To
chrtPerformanceNew.PlotArea.Series.Count - 1
If
chrtPerformanceNew.PlotArea.Series(i).Name = tmp.Employee
Then
Dim
ca
As
Telerik.Web.UI.LineSeries = chrtPerformanceNew.PlotArea.Series(i)
Dim
si
As
New
Telerik.Web.UI.SeriesItem
si.Name = tmp.WorkDay
si.TooltipValue = tmp.WorkDay &
" -> "
& tmp.Employee
si.YValue = tmp.Performance
ca.Items.Add(si)
End
If
Next
Next