<style type="text/css">
.AutoShrink
{
width: auto !important;
max-width:1350px;
}
div.AutoShrink
{
float: left;
}
</style>
<telerik:RadGrid ID="grdResult" runat="server"
AllowMultiRowSelection="True" AllowSorting="True" Height="400px" width="1350px"
style="margin-right: 1px" Skin="WebBlue" GridLines="None" AllowPaging="true" PageSize="100"
CssClass="AutoShrink" >
<PagerStyle Position="Top" />
<MasterTableView AllowPaging="true" AutoGenerateColumns="true" AllowMultiColumnSorting="true" ClientDataKeyNames="SRC,SER,BAND,XLA,XLG,RGN,STT,EIP,SVC,FRQ,FTA" Font-Size="Smaller" PageSize="100" TableLayout="Auto" CssClass="AutoShrink" >
<Columns>
<%-- <telerik:GridClientSelectColumn UniqueName="SEL" HeaderText="SEL" ItemStyle-Width="20px" HeaderStyle-Width="20px"></telerik:GridClientSelectColumn>--%>
<telerik:GridTemplateColumn UniqueName="SEL">
<HeaderTemplate>
<asp:CheckBox runat="server" ID="ChkAll" ToolTip="Click to select all" onclick="javascript:SelectAllCheckboxes(this);" />
</HeaderTemplate>
<ItemTemplate>
<asp:CheckBox runat="server" ID="SEL" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings ReorderColumnsOnClient="true" EnableRowHoverStyle="False" AllowColumnsReorder="true" >
<Scrolling AllowScroll="True" />
<Selecting AllowRowSelect="true" />
<Resizing EnableRealTimeResize="true" ResizeGridOnColumnResize="true" AllowColumnResize="true"/>
<ClientEvents OnRowContextMenu="grdResult_RowSelected" OnRowClick="RowClicked" />
</ClientSettings>
<HeaderStyle Width="100px"/>
<PagerStyle Mode="NextPrevAndNumeric" ></PagerStyle>
</telerik:RadGrid>
Thanks,
Raji


I click a menu item and the color after I close and return to the menu item changes to blue. I want it to remain white.

I hate to bring this question to you but I don't understand your RadGrid filtering example and have coded it the best I can. It is a simple example that has a DataTable loaded as the grid datasource on page load. Now the both the ASPX and the ASPX.CS code is below:
ASPX.CS
public partial class AdminSearch : System.Web.UI.Page
{
public static ArrayList LocationArray;
public DataTable myDataTable = new DataTable();
SqlDataSource sqlDS = new SqlDataSource();
protected void Page_Load(object sender, EventArgs e)
{
SearchGrid.DataSource = GetDataTable();
}
public DataTable GetDataTable()
{
myDataTable.Columns.Add(new DataColumn("KMLID", typeof(string)));
myDataTable.Columns.Add(new DataColumn("Remarks", typeof(string)));
myDataTable.Columns.Add(new DataColumn("LONGITUDE", typeof(string)));
myDataTable.Columns.Add(new DataColumn("LATITUDE", typeof(string)));
myDataTable.Columns.Add(new DataColumn("Pax", typeof(string)));
myDataTable.Columns.Add(new DataColumn("StartDate", typeof(string)));
myDataTable.Columns.Add(new DataColumn("EndDate", typeof(string)));
myDataTable.Columns.Add(new DataColumn("Type", typeof(string)));
DataRow workRow;
bool bsuccess = CacheManager.Get<ArrayList>("LocationArray", out LocationArray);
foreach (Marker m in LocationArray)
{
workRow = myDataTable.NewRow();
workRow["KMLID"] = m.KMLID;
workRow["Remarks"] = m.Remarks;
workRow["LONGITUDE"] = m.LONGITUDE;
workRow["LATITUDE"] = m.LATITUDE;
workRow["Pax"] = m.Pax;
workRow["StartDate"] = m.StartDate.ToString();
workRow["EndDate"] = m.EndDate.ToString();
if (m.Type == "Operations")
{
workRow["Type"] = m.Type;
}
else
{
workRow["Type"] = m.Type;
}
myDataTable.Rows.Add(workRow);
}
return myDataTable;
}
protected void SearchGrid_PreRender(object sender, System.EventArgs e)
{
if (SearchGrid.MasterTableView.FilterExpression != string.Empty)
{
SearchGrid.DataSource = GetDataTable();
}
}
protected void SearchGrid_ItemCommand(object source, GridCommandEventArgs e)
{
myDataTable.Clear();
if (e.CommandName == RadGrid.FilterCommandName)
{
Pair filterPair = (Pair)e.CommandArgument;
switch (filterPair.Second.ToString())
{
case "StartDate":
this.startDate = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("StartDatePicker") as RadDatePicker).SelectedDate;
this.endDate = ((e.Item as GridFilteringItem)[filterPair.Second.ToString()].FindControl("StartDatePicker") as RadDatePicker).SelectedDate;
break;
default:
break;
}
}
}
protected DateTime? SetStartDate(GridItem item)
{
if (item.OwnerTableView.GetColumn("StartDate").CurrentFilterValue == string.Empty)
{
return new DateTime?();
}
else
{
return DateTime.Parse(item.OwnerTableView.GetColumn("StartDate").CurrentFilterValue);
}
}
protected DateTime? startDate
{
set
{
ViewState["strD"] = value;
}
get
{
if (ViewState["strD"] != null)
return (DateTime)ViewState["strD"];
else
return new DateTime(2019, 7, 4);
}
}
protected DateTime? endDate
{
set
{
ViewState["endD"] = value;
}
get
{
if (ViewState["endD"] != null)
return (DateTime)ViewState["endD"];
else
return new DateTime(2019, 5, 6);
}
}
}
ASPX
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AdminSearch.aspx.cs" Inherits="COPASPApplication.AdminSearch" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<div>
<span style="align-content:end; font-size:12px;"><asp:LinkButton runat="server" PostBackUrl="COPAdminView.aspx">Administrative User Page</asp:LinkButton></span>
<h3>Administrative Search Page</h3>
</div>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
<div class="demo-container no-bg">
<telerik:RadGrid RenderMode="Lightweight" ID="SearchGrid" Width="100%" AllowFilteringByColumn="True"
AllowSorting="True" AllowPaging="True" PageSize="7" runat="server" AutoGenerateColumns="False"
EnableLinqExpressions="false" OnItemCommand="SearchGrid_ItemCommand" ShowStatusBar="true">
<MasterTableView DataKeyNames="KMLID" TableLayout="Fixed">
<Columns>
<telerik:GridBoundColumn DataField="KMLID" HeaderText="KMLID" UniqueName="KMLID"
HeaderStyle-Width="25px" SortExpression="KMLID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Remarks" HeaderText="Remarks" UniqueName="Remarks"
HeaderStyle-Width="100px" SortExpression="Remarks">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LONGITUDE" HeaderText="LONGITUDE" UniqueName="LONGITUDE"
HeaderStyle-Width="80px" SortExpression="LONGITUDE">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LATITUDE" HeaderText="LATITUDE" UniqueName="LATITUDE"
HeaderStyle-Width="80px" SortExpression="LATITUDE">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Pax" HeaderText="Pax" UniqueName="Pax"
HeaderStyle-Width="25px" SortExpression="Pax" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="StartDate" DataField="StartDate" HeaderText="Start date"
DataFormatString="{0:D}" HeaderStyle-Width="90px">
<FilterTemplate>
<telerik:RadDatePicker RenderMode="Lightweight" ID="StartDatePicker" runat="server" Width="110px" ClientEvents-OnDateSelected="StartDateSelected"
MinDate="01-01-2019" MaxDate="05-06-2025" FocusedDate="07-04-1996" />
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function StartDateSelected(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
var startDate = $find('<%# ((GridItem)Container).FindControl("StartDatePicker").ClientID %>');
var startDate = FormatSelectedDate(sender);
tableView.filter("StartDate", startDate, "EqualTo");
}
function FormatSelectedDate(picker) {
var date = picker.get_selectedDate();
var dateInput = picker.get_dateInput();
var formattedDate = dateInput.get_dateFormatInfo().FormatDate(date, dateInput.get_displayDateFormat());
return formattedDate;
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn UniqueName="EndDate" DataField="EndDate" HeaderText="EndDate"
DataFormatString="{0:d}" HeaderStyle-Width="80px">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Type" HeaderText="Type" UniqueName="Type"
HeaderStyle-Width="80px" SortExpression="Type">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
</div>
</asp:Content>

Hello Guys,
Long time TELERIK fan.. but my first Post..
I am banging my head for the past 2 days in figuring out the issue.
Below is my RadGrid for Bulk Edit/Update. All the CRUD operations works with a minor issue.
I have two radcomboboxs "cmbFundingSrc" & "cmbEntityType". When i click the row to edit values..
RadCombobox "cmbFundingSrc" will loose the selected value BUT other RadCombobox "cmbEntityType" will retain & show the existing selected value.
What could be the issue? Kindly let me know
<%@ Register assembly="Telerik.Web.UI, Version=2018.1.117.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<telerik:RadFormDecorator ID="FormDecorator1" runat="server" />
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" RenderMode="Inline">
<asp:Panel runat="server" ID="pnlLineItemFormAdd" >
<br />
<table cellpadding="4" cellspacing="2" border="1" width="100%" style="table-layout:fixed" class="detail-SubTable" >
<tr>
<td>
<telerik:RadGrid ID="rgRegEntity" runat="server" AllowSorting="True" AllowPaging="True"
RenderMode="Lightweight" AllowAutomaticInserts="True" AutoGenerateColumns="False" AllowAutomaticUpdates="True"
DataSourceID="SqlDataSource1" OnItemDeleted="rgRegEntity_ItemDeleted"
AllowAutomaticDeletes="True">
<MasterTableView DataKeyNames="RegistrationFundingSourceUID" ClientDataKeyNames="RegistrationFundingSourceUID"
DataSourceID="SqlDataSource1"
NoMasterRecordsText="No Records to display." Width="100%" TableLayout="Auto" ShowHeadersWhenNoRecords="true"
EditMode="Batch" CommandItemDisplay="TopAndBottom">
<BatchEditingSettings EditType="Row" SaveAllHierarchyLevels="true" OpenEditingEvent="Click"/>
<CommandItemSettings ShowSaveChangesButton="true" ShowCancelChangesButton="true" />
<Columns>
<telerik:GridButtonColumn ConfirmText="Delete this LineItem?" ConfirmDialogType="RadWindow"
ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="3%" ItemStyle-Width="50px"
CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="RegistrationUID" HeaderStyle-Width="3%" HeaderText="RegistrationUID" SortExpression="RegistrationUID"
UniqueName="RegistrationUID" Visible="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Funding Source <br />[Reporting Category]" HeaderStyle-Width="14%" UniqueName="CPFundingsId" DataField="CPFundingsId">
<ItemTemplate>
<%# Eval("fundingsourcename") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList RenderMode="Lightweight" DefaultMessage="Select Funding Src" runat="server" ID="cmbFundingSrc" DataValueField="CPFundingsId"
DataTextField="fundingsourcename" DataSourceID="SqlFundingDataSource" DropDownWidth="200px" >
</telerik:RadDropDownList>
<span style="color: Red">
<asp:RequiredFieldValidator ID="RequiredFieldValidator12"
ControlToValidate="cmbFundingSrc" ErrorMessage="*Required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</span>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Document <br />Type" HeaderStyle-Width="7%" UniqueName="EntityTypeUID" DataField="EntityTypeUID">
<ItemTemplate>
<%# Eval("EntityType") %>
</ItemTemplate>
<EditItemTemplate>
<telerik:RadDropDownList RenderMode="Lightweight" runat="server" DefaultMessage="Select Document Type" ID="cmbEntityType" DataValueField="EntityTypeUID"
DataTextField="EntityType" DataSourceID="SqlEntityTpeMstDataSource" DropDownWidth="200px">
</telerik:RadDropDownList>
<span style="color: Red">
<asp:RequiredFieldValidator ID="RequiredFieldValidator9"
ControlToValidate="cmbEntityType" ErrorMessage="*Required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</span>
</EditItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
<ClientSettings AllowExpandCollapse="true">
<Selecting AllowRowSelect="true" />
<Scrolling AllowScroll="True" ScrollHeight="255" UseStaticHeaders="true" />
</ClientSettings>
</telerik:RadGrid>
</td>
</tr>
</table>
<hr id="hrLine" class="line-Style-Separator" />
<div width="100" STYLE="text-align:left;">
<asp:Label runat="server" ID="lblLastModifiedBy" STYLE="text-align:left;" />
</div>
<asp:TextBox runat="server" ID="txtRegID" visible="false"></asp:TextBox>
<asp:TextBox runat="server" ID="txtPrimeContractorID" visible="false"></asp:TextBox>
<asp:TextBox runat="server" ID="txtLoggedInUserID" visible="false"></asp:TextBox>
</asp:Panel>
</telerik:RadAjaxPanel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:Budget2013ConnectionString %>"
SelectCommand="SELECT
distinct [RegistrationUID]
,[RegistrationFundingSourceUID]
,[CPFundingsId]
,[fundingsourcename]
,[EntityTypeUID]
,[EntityId]
,[EntityType]
,[SecondaryContractor]
FROM vwRegistrationLineltems WHERE (RegistrationUID = @RegistrationUID)"
DeleteCommand="DELETE FROM [tblRegistrationFundingSources] WHERE [RegistrationFundingSourceUID]= @RegistrationFundingSourceUID"
>
<SelectParameters>
<asp:QueryStringParameter Name="RegistrationUID" Type="Int32" QueryStringField="RegistrationUID" />
</SelectParameters>
<DeleteParameters>
<asp:Parameter Name="RegistrationFundingSourceUID" Type="Int32"></asp:Parameter>
</DeleteParameters>
</asp:SqlDataSource>
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlEntityTpeMstDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:Budget2013ConnectionString %>"
SelectCommand=" SELECT [EntityTypeUID],[EntityType] FROM [Budget2013].[Lookups].[tblEntityTypeMst]">
</asp:SqlDataSource>
<asp:SqlDataSource ID="SqlFundingDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:Budget2013ConnectionString %>"
SelectCommand="SELECT DISTINCT [CPFundingsId] ,[fundingsourcename] FROM [Budget2013].[dbo].[vwRegistrationCPListWithFundingInfo] "
>
</asp:SqlDataSource>
<SelectParameters>
<asp:QueryStringParameter Name="RegistrationUID" Type="Int32" QueryStringField="RegistrationUID" />
</SelectParameters>
</asp:SqlDataSource>
I would like to know if it's possible to bind extra values other than DataTextField and DataValueField. I am using SQLDataSource.
Thanks!
Im trying to SAVE the resulting image to the server. Tried following some sample code with no luck
Sever side code never fires
(Code simple passes a MEMORY STREAM object to a function (doc.AddVersion) that will save the content into the database)
Error: Sys.ArgumentException: Cannot deserialize empty string.Parameter name: data ScriptResource.axd:50457:2736 create argument deserialize _readJson _finishOperation createCallback createDelegate WebForm_ExecuteCallback WebForm_CallbackCompleteProtected Sub RadImgEdt_ImageSaving(sender As Object, args As Telerik.Web.UI.ImageEditorSavingEventArgs) Dim doc As Object = tableDocumentGeneric.getDocument() Dim img As Telerik.Web.UI.ImageEditor.EditableImage = args.Image Dim ms As New IO.MemoryStream img.CopyToStream(ms) doc.AddVersion(ms) args.Cancel = True End Sub
<telerik:RadImageEditor ID="RadImageEditor1" runat="server" OnClientImageLoad="OnClientImageLoad" OnClientCommandExecuting="OnClientCommandExecuting" OnImageSaving="RadImgEdt_ImageSaving" Style="top: 0px; left: 0px;" Width="100%" Height="100%"> <EditableImageSettings MaxJsonLength="2147483640" /> <Tools> <telerik:ImageEditorToolGroup> <telerik:ImageEditorTool CommandName="Print"/> <telerik:ImageEditorTool CommandName="Save" /> <telerik:ImageEditorTool CommandName="Crop" /> <telerik:ImageEditorTool CommandName="Zoom" /> <telerik:ImageEditorToolStrip Text="Undo" CommandName="Undo" /> <telerik:ImageEditorToolStrip Text="Redo" CommandName="Redo" /> <telerik:ImageEditorTool Text="Rotate Right" CommandName="RotateRight" /> <telerik:ImageEditorTool Text="Rotate Left" CommandName="RotateLeft" /> <telerik:ImageEditorTool Text="Reset" CommandName="Reset" /> </telerik:ImageEditorToolGroup> </Tools></telerik:RadImageEditor><script> (function (global, undefined) { Telerik.Web.UI.ImageEditor.CommandList["Print"] = function (imgEditor, commandName, args) { printIT(); }; })(window); function printIT() { //redirect to show PDF version of item
} function OnClientImageLoad(imageEditor, args) { imgEditor = imageEditor; imgEditor.set_height(document.body.scrollHeight - 50); imageEditor.zoomBestFit(); } //SAVE function OnClientCommandExecuting(imageEditor, eventArgs) { if (eventArgs.get_commandName() == 'Save') { console.log(eventArgs); imageEditor.saveImageOnServer('', true); //Prevent the buil-in Save dialog to pop up imageEditor.setToggleState('Save', false); imageEditor.saveImageOnServer('', true); eventArgs.set_cancel(true); } }</script>
Hi,
I need to use bootstrap's modal and no controls are working inside those modals but of course outside the modals.
I am talking about a very simple one. Let's consider the following:
<!-- Modal --><div id="myModal" class="modal fade" role="dialog"> <div class="modal-dialog"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header">...
If I place a button inside a div with the class "modal", add an server side event handler, it never will be triggered when clicked.
Pushing the same button outside the modal works perfectly and the event is triggered.
The same happens to the RadDatePicker: The selected date cannot be used by other controls if the RadDatePicker is in the modal.
I am using Bootstrap v3.3.5 and almost about to despair of this :S
Hope someone can help.
Best regards
In our webapp each time the user clicks on a node in the tree, the node drops down and shows a "loading" (in nodes place) graphic for a second - then node pops back in place an shows the content of the node. Is there a way to change this behavior of the UI? Preferably not have the selected node drop down - just replace the text temporarily with loading image - or loading image at end of text, or turn off the loading image. Distracting to have the tree nodes jump up/down each time clicked.
