or
//Sorting items in the right list box ----------------------- var items = e.get_destinationListBox().get_items(); arrTexts = new Array(); for (var i = 0; i < items.get_count(); i++) { arrTexts[i] = items.getItem(i).get_text(); } arrTexts.sort(); for (var i = 0; i < arrTexts.length; i++) { //alert(arrTexts[i]); }
<
telerik:GridClientSelectColumn HeaderText="Incl" HeaderStyle-Width="5%" UniqueName="ClientSelectColumn" />
Dim
window1
As
New
Telerik.Web.UI.RadWindow
With
window1
.VisibleOnPageLoad =
True
.ID =
"UniqueDialogWindowID"
.Width = 450
.Height = 550
.AutoSize =
True
.Modal =
True
.VisibleStatusbar =
False
.ContentContainer.Controls.Add(
New
LiteralControl(
"Dynamic loaded control"
))
.Title =
"Test"
End
With
Page.Controls.Add(window1)
http://demos.telerik.com/aspnet-ajax/tooltip/examples/usingwithimagemap/defaultcs.aspx
private
void
CreateDynamicTable(
string
ProductCode)
{
//<skipped>
RadComboBox combo =
new
RadComboBox();
RadComboBoxItem l =
new
RadComboBoxItem();
combo.EmptyMessage =
"- PASIRINKITE -"
;
string
[] items = result.Expression.ToString().Split(
'|'
);
string
[] values = result.PriceCoefficient.ToString().Split(
'|'
);
int
itemsCount = result.Expression.ToString().Count();
foreach
(var item
in
items.Zip(values, (ix, v) =>
new
{ ix, v }))
{
l =
new
RadComboBoxItem(item.ix, item.v);
combo.Items.Add(l);
}
tc.Attributes.Add(
"width"
,
"145px"
);
combo.Attributes.Add(
"Style"
,
"font-family: verdana; width: 140px; font-size : 7pt"
);
combo.ID =
"cboAttributeName_"
+ i.ToString();
combo.ClientIDMode = ClientIDMode.Static;
combo.OnClientSelectedIndexChanged =
"SelectedIndexChanged"
;
combo.Attributes.Add(
"AtributeName"
, result.AttributeName);
tc.Controls.Add(combo);
<skipped>
}
var
attributes_array =
new
Array();
function
SelectedIndexChanged(sender, eventArgs) {
var
item = eventArgs.get_item();
var
dblCofficient = parseFloat(item.get_value());
var
dblActualPrice = document.getElementById(
'lblActualPrice'
).innerHTML;
if
(dblCofficient > 0) {
var
strlblYourPrice = document.getElementById(
'lblYourPrice'
).innerHTML;
var
strlblUsualPrice = document.getElementById(
'lblUsualPrice'
).innerHTML;
document.getElementById(
'lblYourPrice'
).innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2).toString().replace(
"."
,
","
) +
' Lt.'
;
document.getElementById(
'lblActualPriceDb'
).innerHTML = roundNumber(dblActualPrice * (dblCofficient / 100), 2).toFixed(2);
document.getElementById(
'lblUsualPrice'
).innerHTML = roundNumber(dblActualPrice * 1.25 * (dblCofficient / 100), 2).toFixed(2).toString().replace(
"."
,
","
) +
' Lt.'
;
}
var
AtributeName = sender.get_attributes().getAttribute(
"AtributeName"
);
var
AtributeValue = item.get_text();
var
field = document.getElementById(
'txtAttributes'
).value;
attributes_array[AtributeName] = AtributeValue;
var
str;
for
(
var
key
in
attributes_array) {
if
(attributes_array.hasOwnProperty(key)) {
str +=
" "
+ key +
": "
+ attributes_array[key] +
";"
//существующий формат, или:
}
}
str = str.substr(10);
document.getElementById(
'txtAttributes'
).value = str;
}