protected void WorkOrdersRadFilter_ItemCommand(object sender, RadFilterCommandEventArgs e)
{
if(e.CommandName == RadFilter.AddExpressionCommandName)
{
e.Canceled =
true;
RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression("WORKORDERNUMBER");
(e.ExpressionItem
as RadFilterGroupExpressionItem).Expression.AddExpression(item);
WorkOrdersRadFilter.RecreateControl();
}
else if (e.CommandName == RadFilter.ChangeExpressionFieldNameCommandName)
{
string myCmdArg = e.CommandArgument.ToString();
if (myCmdArg != "WOTYPENAME" & myCmdArg != "STATUS_MESSAGE" & myCmdArg != "MATERIALTYPE" & myCmdArg != "CREATEDDATE")
{
e.Canceled =
true;
RadFilterStartsWithFilterExpression item = new RadFilterStartsWithFilterExpression(e.CommandArgument.ToString());
//replace the current item with the new item that has the default filter set to StartsWith
int i = e.ExpressionItem.OwnerGroup.Expression.Expressions.IndexOf((e.ExpressionItem).OwnerGroup.Expression.FindByFieldName((((RadFilterSingleExpressionItem)(e.EventSource)).Expression).FieldName));
e.ExpressionItem.OwnerGroup.Expression.Expressions.RemoveAt(i);
e.ExpressionItem.OwnerGroup.Expression.Expressions.Insert(i, item);
WorkOrdersRadFilter.RecreateControl();
}
}
}
I am using jQuery for setting controls.
var
status = $telerik.findComboBox("<%= rcbStatus.ClientID %>");
status.set_value(2);
status.set_text(
"On Order");
My understanding of jQuery (which is limited) is that I should be able to chain commands like this:
$telerik.findComboBox("<%= rcbStatus.ClientID %>").set_value(2).set_text("On Order");
But the chanined command doesn't work.
Am I missing something? Thanks for any help
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/ITIMaster.Master" CodeBehind="AlertTypeAdmin.aspx.vb" Inherits="EmailAlertsMonitor.AlertTypeAdmin" %> <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <telerik:RadGrid ID="gvAlertTypes" runat="server" AutoGenerateColumns="False" Skin="Outlook" CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" EnableViewState="False"> <MasterTableView AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataKeyNames="Alert_Type_ID" DataSourceID="SqlDataSource1" CommandItemDisplay ="TopAndBottom" EnableViewState="False" > <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"> <HeaderStyle Width="20px"></HeaderStyle> </RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"> <HeaderStyle Width="20px"></HeaderStyle> </ExpandCollapseColumn> <Columns> <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn"> <ItemStyle CssClass="MyImageButton" /> </telerik:GridEditCommandColumn> <telerik:GridButtonColumn ConfirmText="Are you sure you want to delete this Alert Type?" ConfirmDialogType="RadWindow" ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn"> <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton" /> </telerik:GridButtonColumn> <telerik:GridTemplateColumn DataField="Alert_Subject" HeaderText ="Alert Subject" FilterControlAltText="Filter column column" UniqueName="column"> <ItemTemplate > <asp:Label ID="lblAlertSubject" runat ="server" Text ='<%#EVAL("Alert_Subject") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:TextBox ID="txtAlertSubject" runat ="server" Text ='<%#EVAL("Alert_Subject") %>' MaxLength ="250" Width ="400px" TextMode="MultiLine" ></asp:TextBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Alert_Sender" HeaderText ="Alert Sender" FilterControlAltText="Filter column column" UniqueName="column1"> <ItemTemplate > <asp:Label ID="lblAlertSender" runat ="server" Text ='<%#EVAL("Alert_Sender") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:TextBox ID="txtAlertSender" runat ="server" Text ='<%#EVAL("Alert_Sender") %>' MaxLength ="30" ></asp:TextBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Alert_Level" HeaderText ="Alert Level" FilterControlAltText="Filter column column" UniqueName="column2"> <ItemTemplate > <asp:Label ID="lblAlertLevel" runat ="server" Text ='<%#EVAL("Alert_Level") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:HiddenField ID="hdAlertLevel" runat ="server" Value ='<%#EVAL("Alert_Level_ID") %>' /> <asp:DropDownList ID="ddlAlertLevels" runat ="server" DataSourceID ="SqlDataSource2" DataValueField ="Alert_Level_ID" DataTextField ="Alert_Level" > </asp:DropDownList> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Alert_State" HeaderText ="Alert State" FilterControlAltText="Filter column column" UniqueName="column3"> <ItemTemplate > <asp:Label ID="lblAlertState" runat ="server" Text ='<%#EVAL("Proj_State") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:HiddenField ID="hdAlertState" runat ="server" Value ='<%#EVAL("Alert_State") %>' /> <asp:DropDownList ID="ddlAlertStates" runat ="server" DataSourceID ="SqlDataSource3" DataValueField ="Proj_State_Code" DataTextField ="Proj_State" > </asp:DropDownList> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Alert_Server" HeaderText ="Alert Server" FilterControlAltText="Filter column column" UniqueName="column4"> <ItemTemplate > <asp:Label ID="lblAlertServer" runat ="server" Text ='<%#EVAL("Alert_Server") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:TextBox ID="txtAlertServer" runat ="server" Text ='<%#EVAL("Alert_Server") %>' MaxLength ="20" ></asp:TextBox> </EditItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Alert_Source" HeaderText ="Alert Source" FilterControlAltText="Filter column column" UniqueName="column5"> <ItemTemplate > <asp:Label ID="lblAlertSource" runat ="server" Text ='<%#EVAL("Alert_Source") %>'></asp:Label> </ItemTemplate> <EditItemTemplate > <asp:TextBox ID="txtAlertSource" runat ="server" Text ='<%#EVAL("Alert_Source") %>' MaxLength ="20" ></asp:TextBox> </EditItemTemplate> </telerik:GridTemplateColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> </MasterTableView> <FilterMenu EnableImageSprites="False"></FilterMenu> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Outlook"></HeaderContextMenu> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" DeleteCommand="DELETE FROM [Alert_Type] WHERE [Alert_Type_ID] = @Alert_Type_ID" InsertCommand="INSERT INTO [Alert_Type] ([Alert_Subject], [Alert_Sender], [Alert_Level], [Alert_State], [Alert_Server], [Alert_Source]) VALUES (@Alert_Subject, @Alert_Sender, @Alert_Level, @Alert_State, @Alert_Server, @Alert_Source)" SelectCommand="SELECT [Alert_Type_ID],[Alert_Subject],[Alert_Sender],at.Alert_Level as Alert_Level_ID ,al.Alert_Level ,[Alert_State], ast.Proj_State,[Alert_Server],[Alert_Source] FROM [AlertEmailManagement].[dbo].[Alert_Type] at left outer join Alert_Level al on at.Alert_Level =al.Alert_Level_ID left outer join Alert_States ast on at.Alert_State = ast.Proj_State_Code order by alert_state,alert_level_id,alert_source,alert_server " UpdateCommand="UPDATE [Alert_Type] SET [Alert_Subject] = @Alert_Subject, [Alert_Sender] = @Alert_Sender, [Alert_Level] = @Alert_Level, [Alert_State] = @Alert_State, [Alert_Server] = @Alert_Server, [Alert_Source] = @Alert_Source WHERE [Alert_Type_ID] = @Alert_Type_ID"> <DeleteParameters> <asp:Parameter Name="Alert_Type_ID" Type="Int64" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Alert_Subject" Type="String" /> <asp:Parameter Name="Alert_Sender" Type="String" /> <asp:Parameter Name="Alert_Level" Type="Int16" /> <asp:Parameter Name="Alert_State" Type="String" /> <asp:Parameter Name="Alert_Server" Type="String" /> <asp:Parameter Name="Alert_Source" Type="String" /> </InsertParameters> <UpdateParameters> <asp:Parameter Name="Alert_Subject" Type="String" /> <asp:Parameter Name="Alert_Sender" Type="String" /> <asp:Parameter Name="Alert_Level" Type="Int16" /> <asp:Parameter Name="Alert_State" Type="String" /> <asp:Parameter Name="Alert_Server" Type="String" /> <asp:Parameter Name="Alert_Source" Type="String" /> <asp:Parameter Name="Alert_Type_ID" Type="Int64" /> </UpdateParameters> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" SelectCommand="SELECT [Proj_State_Code], [Proj_State] FROM [Alert_States] ORDER BY [Proj_State]"> </asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:DBConnectionString %>" SelectCommand="SELECT [Alert_Level_ID], [Alert_Level] FROM [Alert_Level] ORDER BY [Alert_Level_ID]"> </asp:SqlDataSource> </asp:Content> 
<telerik:RadStyleSheetManager ID="StyleSheetManager" runat="server" > <StyleSheets> <telerik:StyleSheetReference Path="~/App_Themes/Default/Slider.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Menu.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Grid.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/TabStrip.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/ToolTip.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Window.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/ComboBox.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Calendar.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Button.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/TreeView.Activity.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Layout.css" /> <telerik:StyleSheetReference Path="~/App_Themes/Default/Styles.css" /> </StyleSheets></telerik:RadStyleSheetManager>I do have this key:
add key="Telerik.Web.UI.StyleSheetFolder" value="~/App_Themes/Default"/>