or
protected void rgDPR_ItemDataBound(object sender, GridItemEventArgs e){ DbSet<SICCode> sicCodes = DB.SICCodes; var query = (from codes in sicCodes orderby codes.Industry ascending select codes.Industry, codes.ID).ToList(); if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditableItem editedItem = e.Item as GridEditableItem; GridEditManager editMan = editedItem.EditManager; GridDropDownListColumnEditor editor = editMan.GetColumnEditor("SICCodeOverride") as GridDropDownListColumnEditor; editor.DataSource = query; editor.DataTextField = ""; // codes.Industry should go here editor.DataValueField = ""; // codes.ID should go here editor.DataBind(); }}RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("alert('NOTHING SELECTED. Please select the document for which you want to send a notifcation.');")
<telerik:RadAsyncUpload ID="AsyncUpload1" ClientIDMode="Static" MultipleFileSelection="Disabled" ManualUpload="true" UploadedFilesRendering="BelowFileInput" InputSize="50" OnClientFileSelected="AsyncUpload1_OnClientFileSelected" UseApplicationPoolImpersonation="true" runat="server"> <Localization Select="Select File" /> </telerik:RadAsyncUpload>function OnClientLoad(editor, args) {var element = document.all ? editor.get_document().body : editor.get_document();$telerik.addExternalHandler(element, "paste", function (e) {editor.fire("PastePlainText");if (e.preventDefault) e.preventDefault();if (e.stopPropagation) e.stopPropagation();return false;});}
<telerik:RadGrid ID="ReleaseableItemsRadGrid" runat="server" AllowPaging="true" AllowSorting="false"
OnNeedDataSource="ReleaseableItemsRadGrid_NeedDataSource" EnableLinqExpressions="false"
Width="2100px" AutoGenerateColumns="false" Skin="WebBlue" AllowFilteringByColumn="false" AllowMultiRowSelection="true"
OnItemDataBound="ReleaseableItemsRadGrid_ItemDataBound" AllowCustomPaging="false" OnItemCreated="ReleaseableItemsRadGrid_Created"
PageSize="15">
<Columns>
<telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="20px" UniqueName="SelectionCheckBoxCell"
ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20px" ItemStyle-Wrap="false"
ItemStyle-VerticalAlign="Middle">
<ItemTemplate>
<asp:CheckBox ID="RowSelectionCheckBox" runat="server" AutoPostBack="true" OnCheckedChanged="CheckBoxRowSelection" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="40px" UniqueName="QtyInColumn"
ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40px" HeaderText="Qty Rel">
<ItemTemplate>
<telerik:RadTextBox ID="QuantityInGridTextBox" runat="server" Width="30px" CssClass="textbox"
Skin="WebBlue" AutoPostBack="true" OnTextChanged="Ck_Qty" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</
Columns>
protected void ReleaseableItemsRadGrid_Created(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
e.Item.PreRender +=
new EventHandler(ReleaseableItemsRadGrid_ItemPreRender);
}
}
private void ReleaseableItemsRadGrid_ItemPreRender(object sender, EventArgs e)
{
((sender
as GridDataItem)["SelectionCheckBoxCell"].FindControl("RowSelectionCheckBox") as CheckBox).Checked = (sender as GridDataItem).Selected;
}