or
<
td
style
=
"width: 133px; height: 20px; text-align: center; vertical-align: middle; background-image: url("
/resource/resmgr/IDGuard/LandTab_M.png");"> </
td
>
<
td
style
=
"width: 133px; height: 20px; text-align: center; vertical-align: middle; background-image: url("
resource
=
""
resmgr
=
""
idguard
=
""
landtab_m.png);"=""> </
td
>
<telerik:RadGrid ID=
"RadGrid1"
EnableViewState=
"false"
runat=
"server"
AllowPaging=
"true"
OnItemDataBound=
"RadGrid1_ItemDataBound"
AllowSorting=
"False"
AllowFilteringByColumn=
"true"
GridLines=
"None"
OnInit=
"RadGrid1_Init"
OnDeleteCommand=
"RadGrid1_DeleteCommand"
>
<ItemStyle Wrap=
"false"
></ItemStyle>
<MasterTableView AllowMultiColumnSorting=
"true"
TableLayout=
"Fixed"
DataKeyNames=
"Id"
ClientDataKeyNames=
"Id"
>
<Columns>
<telerik:GridTemplateColumn UniqueName=
"SelectRow"
HeaderText=
"Select"
AllowFiltering=
"false"
HeaderStyle-Width=
"20px"
>
<ItemTemplate>
<telerik:RadScriptBlock ID=
"RadScriptBlock1"
runat=
"server"
>
<script type=
"text/javascript"
>
function
getDataKeyValues(chk) {
//find datakeyvalue of selected row
var
masterTable = $find(
"<%=RadGrid1.ClientID%>"
).get_masterTableView();
var
count = masterTable.get_dataItems().length;
var
checkbox;
var
item;
for
(
var
i = 0; i < count; i++) {
item = masterTable.get_dataItems()[i];
checkbox = item.findElement(
"CheckBox1"
);
if
(checkbox.checked) {
var
dataKeyValue = item.getDataKeyValue(
"Id"
);
//alert(dataKeyValue);
var
hiddenValue = document.getElementById(
"hdn_Id"
);
//get Id inside Hidden field
hiddenValue.value = dataKeyValue;
alert(hiddenValue.value);
}
}
}
</script>
</telerik:RadScriptBlock>
<asp:CheckBox ID=
"CheckBox1"
runat=
"server"
/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridNumericColumn UniqueName=
"Id"
DataField=
"Id"
HeaderText=
"Id"
HeaderStyle-Width=
"20px"
AllowFiltering=
"False"
>
</telerik:GridNumericColumn>
<telerik:GridBoundColumn DataField=
"Description"
HeaderText=
"Description"
AndCurrentFilterFunction=
"Contains"
FilterListOptions=
"AllowAllFilters"
HeaderStyle-Width=
"100px"
>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<PagerStyle AlwaysVisible=
"true"
Mode=
"NumericPages"
></PagerStyle>
<ClientSettings>
<Selecting AllowRowSelect=
"true"
/>
<ClientEvents OnCommand=
"RadGrid1_Command"
OnRowDataBound=
"RadGrid1_RowDataBound"
></ClientEvents>
</ClientSettings>
</telerik:RadGrid>
<br />
<asp:HiddenField ID=
"hdn_Id"
runat=
"server"
/>
<asp:Button ID=
"btnPrint"
runat=
"server"
Text=
"Print"
CssClass=
"btn btn-primary"
OnClick=
"btnPrint_Click"
/>
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
CheckBox chk = (CheckBox)item.FindControl(
"CheckBox1"
);
chk.Attributes.Add(
"onclick"
,
"getDataKeyValues(this);"
);
}
}
protected
void
btnPrint_Click(
object
sender, EventArgs e)
{
funTax();
foreach
(GridDataItem item
in
RadGrid1.MasterTableView.Items)
{
CheckBox check = (CheckBox)item.FindControl(
"CheckBox1"
);
if
(check.Checked ==
true
)
{
string
itemId = hdn_Id.Value;
//Response.Redirect("~/Test.aspx?Id=" + itemId);
}
}
}
<
select
>
<
option
>Item 1</
option
>
<
option
> Item 1.1</
option
>
<
option
> Item 1.2</
option
>
<
option
>Item 2</
option
>
<
option
> Item 2.1</
option
>
<
option
> Item 2.1.1</
option
>
<
option
> Item 2.1.2</
option
>
<
option
>Item 3</
option
>
<
option
> Item 3.1</
option
>
<
option
> Item 3.2</
option
>
</
select
>
string
padding =
""
;
for
(
int
i = 0; i < depth; i++)
padding +=
" "
;
RadComboBoxItem item =
new
RadComboBoxItem();
item.Value = asset.AssetID.ToString();
item.Text = padding + asset.AssetName;
item.Enabled = (asset.Type == AssetType.AppSet);
item.Selected = (asset.AssetID == ParentAssetID);
rcb.Items.Add(item);
function
openPopUpWindow(Url, name) {
var
win = window.radopen(Url, name);
winRad1 = win;
var
TitleBar = win.GetTitlebar();
var
parent = TitleBar.parentNode;
var
oUL = parent.getElementsByTagName(
'TR'
)[0];
secondTD = oUL.getElementsByTagName(
'TD'
)[1];
innerEm = oUL.getElementsByTagName(
'EM'
)[0]; // This is where I want to change width
innerEm.id =
'TitleRadEM'
; // Assign an ID to it; Can't chnage it's width here as before load it's empty
elementThis = innerEm;
win.add_pageLoad(OnClientPageLoad12);
win.add_activate(OnClientActivate12);
win.add_resizeEnd(OnClientResizeEnd12);
if
(!(oUL.firstChild.id ==
"helplink"
)) {
var
oLI = document.createElement(
"TD"
);
oLI.id =
"helplink"
oLI.style.cssText =
'width:22px;'
;
var
Em = document.createElement(
"EM"
);
var
EmClose = document.createElement(
"EM"
);
var
A = document.createElement(
"A"
);
oLI.appendChild(Em);
A.className =
"helplinclass"
;
A.href =
"https://support.xyzxyzxyz.com/"
;
A.target =
"_blank"
;
A.title =
"Help"
;
A.id =
'HelpLink'
;
A.innerHTML =
'Help'
;
Em.appendChild(A);
oUL.insertBefore(oLI, oUL.lastChild);
var
oLI2 = document.createElement(
"TD"
);
oLI2.style.cssText =
'width:22px;'
;
oLI2.appendChild(EmClose);
EmClose.unselectable =
'on'
;
EmClose.innerHTML =
' Close'
;
EmClose.style[
"font-size"
] =
"10pt"
;
EmClose.style.cssText =
'font-size:10pt; padding-right:-1px;'
;
oUL.insertBefore(oLI2, oUL.lastChild);
win._updateTitleWidth();
}
win.center();
win.autoSize(
false
); // tried with true and without this as well
}
function
OnClientPageLoad12() {
var
windowR = GetRadWindowManager();
if
(winRad1 !=
null
) {
var
win = winRad1;
var
TitleBar = win.GetTitlebar();
var
parent = TitleBar.parentNode;
var
oUL = parent.getElementsByTagName(
'TR'
)[0];
secondTD = oUL.getElementsByTagName(
'TD'
)[1];
innerEm = oUL.getElementsByTagName(
'EM'
)[0];
innerEm.style.cssText =
'width:850px;'
;
win._updateTitleWidth();
}
}
function
OnClientActivate12() {
document.getElementById(
'TitleRadEM'
).style.cssText =
'width:850px;'
;
elementThis.style.cssText =
'width:850px;'
;
}