<telerik:RadComboBox ID="SearchCountry" TabIndex="5" style="z-index: 9000;" Width="200px" EnableEmbeddedSkins="true" Skin="Sitefinity" runat="server" Height="150px" OnClientSelectedIndexChanging="LoadSearchStateProv"></telerik:RadComboBox>Try Dim reader As SqlDataReader = cmd.ExecuteReader() Do While reader.Read() RCBI = New RadComboBoxItem() RCBI.Text = reader(sFieldToPopulate) RCBI.Value = reader("CodeList") If oValueToMatch = RCBI.Value Then RCBI.Selected = True End If RadComboBox1.Items.Add(RCBI) Loop reader.Close() reader = NothingCatch ex As Exception Throw New ApplicationException("Error reading to populate country combo box from Select Statement=" & ComboSelectStmt & ". Code=" & ex.Message)FinallyEnd Try<%@ Page language="C#" Codebehind="Custom_DealUI.aspx.cs" AutoEventWireup="false" Inherits="KF.Crm.Web.Custom_DealUI" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> <!-- function OnClientSelectedIndexChangedEventHandler(sender, args) { //NEED TO SOMEHOW CALL THE CLIENT SIDE DATABIND FUNCTION } function RadGrid1_DataBinding(sender, args) { var dataSourceLocation = args.get_location(); var selectMethodName = args.get_methodName(); var methodArguments = args.get_methodArguments(); var startRowIndexParameterName = sender.ClientSettings.DataBinding.StartRowIndexParameterName; var maximumRowsParameterName = sender.ClientSettings.DataBinding.MaximumRowsParameterName; var sortParameterName = sender.ClientSettings.DataBinding.SortParameterName; var filterParameterName = sender.ClientSettings.DataBinding.FilterParameterName; } --> </script> </telerik:RadCodeBlock> <style type="text/css"> #mainForm { height: 646px; } </style> </head> <body class="BODY"> <form runat="server" id="mainForm" method="post"> <telerik:RadScriptManager ID="ScriptManager1" EnablePageMethods="true" runat="server" /> <!-- content start --> <telerik:RadComboBox ID="RadComboBox1" runat="server" OnClientSelectedIndexChanged ="OnClientSelectedIndexChangedEventHandler" DataTextField="DealSelector" DataValueField="DealSelector" Culture="English (Australia)" EnableAutomaticLoadOnDemand="True" Skin="Windows7" > <Items> <telerik:RadComboBoxItem runat="server" Text="All Deals" Value="All Deals" /> <telerik:RadComboBoxItem runat="server" Text="New Deals" Value="New Deals" /> <telerik:RadComboBoxItem runat="server" Text="Waiting Manager Approval" Value="Waiting Manager Approval" /> <telerik:RadComboBoxItem runat="server" Text="Manager Approved" Value="Manager Approved" /> <telerik:RadComboBoxItem runat="server" Text="Income Recognised" Value="Income Recognised" /> <telerik:RadComboBoxItem runat="server" Text="Pro-forma Invoice Created" Value="Pro-forma Invoice Created" /> <telerik:RadComboBoxItem runat="server" Text="Waiting Accounts Approval" Value="Waiting Accounts Approval" /> <telerik:RadComboBoxItem runat="server" Text="Invoiced" Value="Invoiced" /> <telerik:RadComboBoxItem runat="server" Text="Receipt Processed" Value="Receipt Processed" /> <telerik:RadComboBoxItem runat="server" Text="Credit Processed" Value="Credit Processed" /> <telerik:RadComboBoxItem runat="server" Text="Inactive" Value="Inactive" /> </Items> </telerik:RadComboBox> <telerik:RadGrid ID="RadGrid1" AllowSorting="True" AllowPaging="True" AllowFilteringByColumn="True" runat="server" CellSpacing="0" GridLines="None" PageSize="100" Skin="Windows7" Culture="English (Australia)" ShowStatusBar="True" Height="611px" style="margin-top: 34px"> <MasterTableView> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <Columns> <telerik:GridBoundColumn DataField="DealNo" HeaderText="DealNo" AllowFiltering="True" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ID" HeaderText="ID" AllowFiltering="True" Visible="True" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Location" HeaderText="Location" AllowFiltering="True" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Department" HeaderText="Department" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LeadOp" HeaderText="Lead Operative" AllowFiltering="True" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="TranType" HeaderText="Transaction Type" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="LevelSuite" HeaderText="Level Suite" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Address" HeaderText="Address" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="KFAAmtExGST" HeaderText="Amount Ex GST" AllowFiltering="False" DataType ="System.Decimal" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="DealStatus" HeaderText="Deal Status" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="GPDebtor" HeaderText="GP Debtor" AllowFiltering="False" > <HeaderStyle Font-Bold="True" /> </telerik:GridBoundColumn> </Columns> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <PagerStyle AlwaysVisible="True"></PagerStyle> </MasterTableView> <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu> <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" > <DataBinding Location="WebService.asmx" SelectMethod="GetDataAndCount" SelectCountMethod="GetCount" EnableCaching="True" /> <ClientEvents OnDataBinding="RadGrid1_DataBinding" /> <Scrolling AllowScroll="True" UseStaticHeaders="True" /> <Resizing AllowColumnResize="True" AllowResizeToFit="True" /> </ClientSettings> <FilterMenu EnableImageSprites="False"></FilterMenu> </telerik:RadGrid> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackImageUrl="loading.gif" BackgroundPosition="None" HorizontalAlign="Center" /> <!-- content end --> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> </form> </body> </html> cbo_Mode.SelectedIndex = cbo_Mode.FindItemIndexByValue(SubmissionMode);<telerik:RadMenu ID="RadMenu3" Runat="server"></telerik:RadMenu
works fine, but
<telerik:RadMenu ID="RadMenu3" Runat="server" Skin="Forest"><CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation></telerik:RadMenu>
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonEditForm.aspx.cs" Inherits="HonoursBoard.Admin.PersonEditForm" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" > | |
| <head id="Head1" runat="server"> | |
| <title>Untitled Page</title> | |
| </head> | |
| <body> | |
| <form id="form1" runat="server"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> | |
| </telerik:RadScriptManager> | |
| <div> | |
| <script type="text/javascript"> | |
| function CloseAndRebind(args) | |
| { | |
| GetRadWindow().Close(); | |
| GetRadWindow().BrowserWindow.refreshGrid(args); | |
| } | |
| function GetRadWindow() | |
| { | |
| var oWindow = null; | |
| if (window.radWindow) | |
| oWindow = window.radWindow; //Will work in Moz in all cases, including classic dialog | |
| else if (window.frameElement.radWindow) | |
| oWindow = window.frameElement.radWindow;//IE (and Moz as well) | |
| return oWindow; | |
| } | |
| function CancelEdit() | |
| { | |
| GetRadWindow().Close(); | |
| } | |
| </script> | |
| <asp:DetailsView ID="DetailsView1" DataKeyNames="intPersonID" runat="server" AutoGenerateRows="False" | |
| DataSourceID="SqlDataSource1" Height="50px" Width="125px" OnItemCommand="DetailsView1_ItemCommand"> | |
| <Fields> | |
| <asp:BoundField DataField="strTitle" HeaderText="Title" SortExpression="strTitle" /> | |
| <asp:BoundField DataField="strFirstName" HeaderText="First Name" SortExpression="strFirstName" /> | |
| <asp:BoundField DataField="strInitials" HeaderText="Initials" SortExpression="strInitials" /> | |
| <asp:BoundField DataField="strLastName" HeaderText="Last Name" SortExpression="strLastName" /> | |
| <asp:TemplateField HeaderText="Date Of Birth"> | |
| <ItemTemplate> | |
| <telerik:RadDatePicker EnableViewState="false" MinDate="01/01/1850" | |
| MaxDate="01/01/2100" Skin="Telerik" ID="RadDatePicker1" | |
| DbSelectedDate='<%# DataBinder.Eval(Container.DataItem, "datDateOfBirth") %>' | |
| Runat="server"></telerik:RadDatePicker> | |
| </ItemTemplate> | |
| </asp:TemplateField> | |
| <asp:TemplateField HeaderText="Biography"> | |
| <ItemTemplate> | |
| <telerik:RadEditor EnableViewState="false" ID="RadEditor1" runat="server" Skin="Telerik" | |
| ToolsFile="~/Editor/BasicTools.xml" Width="400px" Height="200px" | |
| Content='<%# DataBinder.Eval(Container.DataItem, "strBiography") %>'> | |
| </telerik:RadEditor> | |
| </ItemTemplate> | |
| </asp:TemplateField> | |
| <asp:CommandField ShowEditButton="True" /> | |
| <asp:CommandField ShowInsertButton="True" InsertText="Add" /> | |
| </Fields> | |
| </asp:DetailsView> | |
| </div> | |
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" | |
| ConnectionString="<%$ ConnectionStrings:dbGolfHonoursConnectionString %>" | |
| InsertCommand="InsertAPerson" InsertCommandType="StoredProcedure" | |
| SelectCommand="SelectPersonByPersonID" SelectCommandType="StoredProcedure" | |
| UpdateCommand="UpdateAPerson" UpdateCommandType="StoredProcedure"> | |
| <SelectParameters> | |
| <asp:QueryStringParameter DefaultValue="0" Name="PersonID" | |
| QueryStringField="intPersonID" Type="Int32" /> | |
| </SelectParameters> | |
| <UpdateParameters> | |
| <asp:Parameter Name="intPersonID" Type="Int32" /> | |
| <asp:Parameter Name="strTitle" Type="String" /> | |
| <asp:Parameter Name="strFirstName" Type="String" /> | |
| <asp:Parameter Name="strInitials" Type="String" /> | |
| <asp:Parameter Name="strLastName" Type="String" /> | |
| <asp:Parameter Name="strBiography" Type="String" /> | |
| <asp:Parameter Name="datDateOfBirth" Type="DateTime" /> | |
| </UpdateParameters> | |
| <InsertParameters> | |
| <asp:Parameter Name="strTitle" Type="String" /> | |
| <asp:Parameter Name="strFirstName" Type="String" /> | |
| <asp:Parameter Name="strInitials" Type="String" /> | |
| <asp:Parameter Name="strLastName" Type="String" /> | |
| <asp:Parameter Name="strBiography" Type="String" /> | |
| <asp:Parameter Name="datDateOfBirth" Type="DateTime" /> | |
| </InsertParameters> | |
| </asp:SqlDataSource> | |
| </form> | |
| </body> | |
| </html> |
| using System; | |
| using System.Collections; | |
| using System.Configuration; | |
| using System.Data; | |
| using System.Linq; | |
| using Telerik.Web.UI; | |
| using System.Web; | |
| using System.Web.Security; | |
| using System.Web.UI; | |
| using System.Web.UI.HtmlControls; | |
| using System.Web.UI.WebControls; | |
| using System.Web.UI.WebControls.WebParts; | |
| using System.Xml.Linq; | |
| namespace HonoursBoard.Admin | |
| { | |
| public partial class PersonEditForm : System.Web.UI.Page | |
| { | |
| protected void Page_Init(object sender, EventArgs e) | |
| { | |
| if (Request.QueryString["intPersonID"] == null) | |
| { | |
| DetailsView1.DefaultMode = DetailsViewMode.Insert; | |
| } | |
| else | |
| { | |
| DetailsView1.DefaultMode = DetailsViewMode.Edit; | |
| } | |
| } | |
| protected void DetailsView1_ItemCommand(object sender, System.Web.UI.WebControls.DetailsViewCommandEventArgs e) | |
| { | |
| if (e.CommandName == "Update") | |
| { | |
| ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind();", true); | |
| } | |
| else if (e.CommandName == "Insert") | |
| { | |
| ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('navigateToInserted');", true); | |
| } | |
| else | |
| { | |
| ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CancelEdit();", true); | |
| } | |
| } | |
| } | |
| } |
Code-Behind:
protected void btnClear_Click(object sender, EventArgs e)
{
RadWindowManager1.RadConfirm(
"ARE YOU SURE WANT TO CLEAR THE SEARCH FORM?", "buttonConfirm",450, 150, null, "INFO");
if (hdfConfirm.Value == "true")
{
resetSearchForm();
}
}
Javascript:
function
buttonConfirm(arg)
{
if (arg)
{
//Set hidden field (hdfConfirm) value to true
document.getElementById("<%=hdfConfirm.ClientID%>").value =
"true";
}
else
{
//Set hidden field (hdfConfirm) value to false
document.getElementById("<%=hdfConfirm.ClientID%>").value =
"false";
}
$find("<%=RadAjaxManager1.ClientID%>").ajaxRequest(arg);
But it didn't work. Would you please check to see if I'm missing something here?
Thanks
Lamk
<telerik:GridTemplateColumn UniqueName="colUnits" HeaderText="Units"> <HeaderStyle Width="100px" HorizontalAlign="Left" /> <ItemStyle Width="100px" HorizontalAlign="Right" /> <ItemTemplate> <telerik:RadNumericTextBox ID="txtUnits" runat="server" Width="40px" AutoPostBack="false" NumberFormat-DecimalDigits="0" CausesValidation="false" MinValue="0" MaxLength="3" NumberFormat-AllowRounding="false" Style="text-align:right;"> <ClientEvents OnValueChanged="txtUnits_OnValueChanged" /> <ClientEvents OnKeyPress="KeyPress" /> </telerik:RadNumericTextBox> </ItemTemplate> </telerik:GridTemplateColumn>grid.ExportSettings.ExportOnlyData = Truegrid.ExportSettings.ExportOnlyData = False