
I would like to enable filtering on the enter key, but i'm having problems with an example i downloaded from telerik and
would like to report a bug.
I downloaded 113486_radgridfiltering example which illustrates filtering on enter key.
The problem is that i use both masterpage and ajaxmanager and of course also an ajaxmanagerproxy.
I get a js error when i try to filter with enter key and for some reason the first item in the radgrid also is put in editmode.
Looks like the js needs a bit of tweaking. :)
I have altered the downloaded example 113486_radgridfiltering to illustrate the problems and packed it in a rar archive.
The example can be downloaded here: http://80.166.206.186/Screendump/
Hope u have a solution to my problem, filtering without enter key is not an option for my customers. :)
| <rad:RadAjaxPanel ID="errorMessageAjaxPanel" EnableAJAX="true" runat="server"> |
| <asp:Label ID="errorMessageLabel" runat="server" Font-Bold="true" ForeColor="Red"></asp:Label> |
| </rad:RadAjaxPanel> |
| <asp:Button ID="button" runat="server" /> |
| <table width="80%" style="margin-left: auto; margin-right: auto;" border="0"> |
| <tr> |
| <td> |
| <div style="float: left; margin: 5px 5px 10px 5px;"> |
| Select Holiday Year: |
| <asp:DropDownList ID="holidayYear" AutoPostBack="true" runat="server" OnSelectedIndexChanged="holidayYear_SelectedIndexChanged"> |
| </asp:DropDownList> |
|   |
| </div> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <rad:RadGrid ID="holidayRadGrid" AllowPaging="True" AllowSorting="True" GridLines="Horizontal" |
| HorizontalAlign="Center" ShowFooter="true" ShowStatusBar="true" EnableAJAX="true" |
| EnableAJAXLoadingTemplate="True" LoadingTemplateTransparency="25" AutoGenerateColumns="False" |
| Skin="Grid" SkinsPath="~/App_Themes/VertexDefault" OnNeedDataSource="holidayRadGrid_NeedDataSource" |
| OnUpdateCommand="holidayRadGrid_UpdateCommand" |
| PageSize="18" runat="server"> |
| <MasterTableView DataKeyNames="HolidayID,HolidayYear,HolidayDate,HolidayName" EditMode="InPlace" |
| TableLayout="Auto" AllowNaturalSort="false" BorderColor="Black"> |
| <Columns> |
| <rad:GridEditCommandColumn UniqueName="EditCommandColumn" HeaderStyle-Width="10px" /> |
| <rad:GridBoundColumn HeaderStyle-Width="60px" DataField="HolidayName" HeaderText="Holiday" |
| SortExpression="HolidayName" UniqueName="HolidayName" ReadOnly="true" /> |
| <rad:GridTemplateColumn HeaderStyle-Width="100px" DataField="HolidayDate" SortExpression="HolidayDate" |
| UniqueName="HolidayDate"> |
| <ItemTemplate> |
| <asp:Label ID="holidayDateLabel" Text='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? String.Empty : String.Format("{0:MM/dd/yyyy}", Eval("HolidayDate")) %>' |
| runat="server" /> |
| </ItemTemplate> |
| <EditItemTemplate> |
| <asp:Calendar ID="holidayDateCalendar" SelectedDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>' |
| VisibleDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>' |
| runat="server" /> |
| <%--<rad:RadCalendar ID="holidayDateCalendar" AutoPostBack="false" EnableMultiSelect="false" SelectedDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>' VisibleDate='<%# (DateTime) Eval("HolidayDate") == DateTime.MinValue ? ValidDate : Eval("HolidayDate") %>' runat="server" />--%> |
| </EditItemTemplate> |
| </rad:GridTemplateColumn> |
| <rad:GridBoundColumn DataField="HolidayID" UniqueName="HolidayID" ReadOnly="true" |
| Display="false" /> |
| <rad:GridBoundColumn DataField="HolidayYear" UniqueName="HolidayYear" ReadOnly="true" |
| Display="false" /> |
| </Columns> |
| </MasterTableView> |
| <ClientSettings EnablePostBackOnRowClick="true"> |
| <ClientEvents OnGridCreated="holidayRadGridCreated" OnRowContextMenu="holidayRadGridRowContextMenu" /> |
| </ClientSettings> |
| </rad:RadGrid> |
| <br /> |
| <div> |
| <vtx:ImageHoverButton ID="cancelButton" PostBackUrl="~/Home.aspx" ImageUrl="~/App_Themes/VertexDefault/Images/CancelNormal.png" |
| CssClass="ImageHover" AlternateText="Search" runat="server" /> |
| </div> |
| </td> |
| </tr> |
| </table> |
| <asp:Panel ID="actionPanel" runat="server" Style="display: none" CssClass="modalPopup"> |
| <asp:Panel ID="titlePanel" CssClass="modalTitle" BackImageUrl="~/App_Themes/VertexDefault/Images/ModalTitleGradient.jpg" |
| runat="server"> |
| <div> |
| <table width="100%"> |
| <tr> |
| <td style="width: 99%"> |
| <asp:Label ID="titleLabel" Text="Change status" runat="server" /> |
| </td> |
| <td align="right"> |
| <asp:ImageButton ID="closeButton" AlternateText="Close" ImageUrl="~/App_Themes/VertexDefault/Images/Close.png" |
| runat="server" /> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </asp:Panel> |
| <div style="margin-top: 10px"> |
| Confirm delete of Holiday Date<br /> |
| <b> |
| <asp:Label ID="lblHolidayDate" runat="Server" /></b> for Holiday: <b> |
| <asp:Label ID="lblHolidayName" runat="server" /></b> |
| <input type="hidden" id="holidayIDHidden" runat="server" /> |
| <input type="hidden" id="holidayNameHidden" runat="server" /> |
| <input type="hidden" id="holidayYearHidden" runat="server" /> |
| <input type="hidden" id="holidayDateHidden" runat="server" /> |
| <input type="hidden" id="errorMessageHidden" runat="server" /> |
| </div> |
| <br /> |
| <asp:Button ID="applyButton" Text="Apply" OnClick="applyButton_Click" runat="server" /><br /> |
| |
| </asp:Panel> |
| <asp:Button ID="hiddenButton" Style="display: none" runat="server" /> |
| <atk:ModalPopupExtender ID="actionPanelModalPopupExtender" BehaviorID="actionModalBehavior" |
| PopupControlID="actionPanel" TargetControlID="hiddenButton" CancelControlID="closeButton" |
| PopupDragHandleControlID="titlePanel" DropShadow="true" runat="server" /> |
| <rad:RadAjaxManager ID="ajaxManager" ClientEvents-OnResponseReceived="hideModalPopup()" |
| runat="server"> |
| <AjaxSettings> |
| <rad:AjaxSetting AjaxControlID="applyButton"> |
| <UpdatedControls> |
| <rad:AjaxUpdatedControl ControlID="applyButton" /> |
| <rad:AjaxUpdatedControl ControlID="errorMessageLabel" /> |
| <rad:AjaxUpdatedControl ControlID="holidayRadGrid" LoadingPanelID="holidayRadGridLoadingPanel" /> |
| </UpdatedControls> |
| </rad:AjaxSetting> |
| <rad:AjaxSetting AjaxControlID="button"> |
| <UpdatedControls> |
| <rad:AjaxUpdatedControl ControlID="errorMessageLabel" /> |
| </UpdatedControls> |
| </rad:AjaxSetting> |
| </AjaxSettings> |
| </rad:RadAjaxManager> |
| <rad:AjaxLoadingPanel ID="holidayRadGridLoadingPanel" runat="Server"> |
| <asp:Image ID="loadingImage" ImageUrl="~/App_Themes/VertexDefault/Grid/Loading.gif" |
| AlternateText="Loading" BorderWidth="0px" runat="server" /> |
| </rad:AjaxLoadingPanel> |
| <rad:RadMenu ID="gridContextRadMenu" IsContext="True" OnClientItemClicked="OnClientItemClickedHandler" |
| ContextMenuElementID="none" Skin="Menu" SkinsPath="~/App_Themes/VertexDefault" |
| runat="server"> |
| <Items> |
| <rad:RadMenuItem Text="Delete the date for this Holiday?" Value="CS" /> |
| </Items> |
| </rad:RadMenu> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| log.Debug("Page_Load"); |
| // Get current user and customer |
| User user = Master.CurrentUser; |
| Customer customer = GetCustomer(user); |
| // Set year for page heading |
| int holidayYearPlusOne = System.DateTime.Now.Year + 1; |
| int holidayYearPlusTwo = System.DateTime.Now.Year + 2; |
| lblHolidayYear.Text = System.DateTime.Now.Year.ToString(); |
| if (!IsPostBack) |
| { |
| int currentHolidayYear = Convert.ToInt32(DateTime.Now.ToString("yyyy")); |
| // Populate filing year dropdown |
| holidayYear.Items.Add(new ListItem(System.DateTime.Now.Year.ToString(), System.DateTime.Now.Year.ToString())); |
| holidayYear.Items.Add(new ListItem(holidayYearPlusOne.ToString(), holidayYearPlusOne.ToString())); |
| holidayYear.Items.Add(new ListItem(holidayYearPlusTwo.ToString(), holidayYearPlusTwo.ToString())); |
| // Clear old data |
| Session.Remove(Constants.Session.PageData); |
| // Build data |
| BuildTable(currentHolidayYear); |
| } |
| else |
| { |
| // Set year for page heading |
| lblHolidayYear.Text = holidayYear.SelectedValue; |
| } |
| // Checks page security |
| CheckPageSecurity(customer, user); |
| } |
| /// <summary> |
| /// Handles the SelectedIndexChanged event of the holidayYear control. |
| /// </summary> |
| /// <param name="sender">The source of the event.</param> |
| /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> |
| protected void holidayYear_SelectedIndexChanged(object sender, EventArgs e) |
| { |
| log.Debug("holidayYear_SelectedIndexChanged"); |
| if (returns == null) |
| { |
| // Create returns manager |
| returns = ReturnsFactory.CreateReturns(); |
| } |
| // Clear old data |
| Session.Remove(Constants.Session.PageData); |
| // Build data |
| BuildTable(Convert.ToInt32(holidayYear.SelectedValue.ToString())); |
| // Set year for page heading |
| lblHolidayYear.Text = holidayYear.SelectedValue; |
| // Clear out edit mode for items in grid |
| holidayRadGrid.MasterTableView.ClearEditItems(); |
| holidayRadGrid.Rebind(); |
| } |
| #endregion |
| #region Private Methods |
| /// <summary> |
| /// Builds the table. |
| /// </summary> |
| private void BuildTable(int currentHolidayYear) |
| { |
| log.Debug("BuildTable"); |
| try |
| { |
| if (returns == null) |
| { |
| // Create returns manager |
| returns = ReturnsFactory.CreateReturns(); |
| } |
| // Clear out any errors that may have been displayed to the screen |
| errorMessageLabel.Text = ""; |
| // Set 'Year' |
| validDate = new DateTime(Convert.ToInt32(holidayYear.SelectedValue), DateTime.Now.Month, DateTime.Now.Day); |
| // Fetch Holidays |
| Holidays holidays = (Holidays)Session[Constants.Session.PageData]; |
| // Get Holidays if they are not already in the session |
| if (holidays == null) |
| { |
| holidays = returns.GetHolidays(currentHolidayYear); |
| Session[Constants.Session.PageData] = holidays; |
| } |
| holidayRadGrid.DataSource = holidays.Values; |
| //holidayRadGrid.DataBind(); |
| if (errorMessageHidden.Value.Length > 0) |
| { |
| errorMessageLabel.Text = errorMessageHidden.Value; |
| } |
| // Set correct year to be used for the column HolidayDate's Header Text |
| holidayRadGrid.MasterTableView.GetColumn("HolidayDate").HeaderText = holidayYear.SelectedValue; |
| //holidayRadGrid.Rebind(); |
| } |
| catch (Exception ex) |
| { |
| log.Error("Error occurred in page '{0}'. Message: '{1}'", Request.Url.Segments[Request.Url.Segments.Length - 1], ex.Message); |
| Response.Redirect(Constants.Pages.ErrorPage); |
| } |
| } |
| /// <summary> |
| /// Checks the page security. |
| /// </summary> |
| /// <param name="customer">The customer.</param> |
| /// <param name="user">The user.</param> |
| private void CheckPageSecurity(Customer customer, User user) |
| { |
| log.Debug("CheckPageSecurity"); |
| // Allow delete/delete? |
| allowDelete = Master.CheckPageSecurity(customer, user, string.Format(@"{0}/Delete", AppRelativeVirtualPath)) == Permission.EditExecute; |
| } |
| /// <summary> |
| /// Gets the customer. |
| /// </summary> |
| /// <param name="user">The user.</param> |
| /// <returns></returns> |
| private Customer GetCustomer(User user) |
| { |
| // Get current customer |
| Customer customer = Master.CurrentCustomer; |
| // Customer specified on the querystring? |
| if (Request[Constants.QueryString.Customer] != null) |
| { |
| if (!Request[Constants.QueryString.Customer].Equals(customer.CustomerNumber, StringComparison.OrdinalIgnoreCase)) |
| { |
| if (returns == null) |
| { |
| // Create returns manager |
| returns = ReturnsFactory.CreateReturns(); |
| } |
| // Only allowed to specify a different customer if we are a Vertex user |
| if (!returns.IsVertexUser(user)) |
| { |
| // Log security violation |
| returns.LogSecurityViolation(user, string.Format("Attempt to access UserList.aspx with querystring '{0}'.", Request.QueryString)); |
| Response.Redirect(Constants.Pages.HomePage); |
| } |
| // Get customer |
| customer = returns.GetCustomer(Request[Constants.QueryString.Customer]); |
| } |
| } |
| return customer; |
| } |
| /// <summary> |
| /// Handles the UpdateCommand event of the holidayRadGrid control. |
| /// </summary> |
| /// <param name="source">The source of the event.</param> |
| /// <param name="e">The <see cref="Telerik.WebControls.GridCommandEventArgs"/> instance containing the event data.</param> |
| protected void holidayRadGrid_UpdateCommand(object source, GridCommandEventArgs e) |
| { |
| GridEditableItem eeditedItem = e.Item as GridEditableItem; |
| // Get current user and customer |
| User user = Master.CurrentUser; |
| try |
| { |
| if (returns == null) |
| { |
| // Create returns manager |
| returns = ReturnsFactory.CreateReturns(); |
| } |
| // Find controls in the edit item template |
| GridEditableItem item = (GridEditableItem)e.Item; |
| Calendar holidayDateCalendar = (Calendar) item.FindControl("holidayDateCalendar"); |
| // Validate input fields |
| if (!ValidateInput(holidayDateCalendar.SelectedDate)) |
| { |
| holidayRadGrid.Rebind(); |
| return; |
| } |
| // If the old value is equal to "1/1/0001 12:00:00 AM" then the a date for this holiday |
| // has never been set. |
| if ((DateTime)editedItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["HolidayDate"] == DateTime.MinValue) |
| { |
| // INSERT |
| Holiday holiday = new Holiday(); |
| holiday.HolidayDate = Convert.ToDateTime(holidayDateCalendar.SelectedDate); |
| holiday.HolidayYear = Convert.ToInt32(holidayYear.SelectedValue.ToString()); |
| holiday.HolidayID = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["HolidayID"].ToString()); |
| returns.CreateHolidayDate(holiday, user.UserID); |
| } |
| else |
| { |
| // UPDATE |
| Holiday holiday = new Holiday(); |
| holiday.HolidayDate = Convert.ToDateTime(holidayDateCalendar.SelectedDate); |
| holiday.HolidayYear = Convert.ToInt32(holidayYear.SelectedValue.ToString()); |
| holiday.HolidayID = Convert.ToInt32(editedItem.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["HolidayID"].ToString()); |
| returns.UpdateHolidayDate(holiday, user.UserID); |
| } |
| // Refresh grid |
| holidayRadGrid.DataSource = returns.GetHolidays(Convert.ToInt32(holidayYear.SelectedValue.ToString())).Values; |
| holidayRadGrid.Rebind(); |
| Response.Redirect(ReturnsConstants.Pages.HolidayListEdit); |
| } |
| catch (Exception ex) |
| { |
| // Log error |
| log.Error("Error occurred in page '{0}'. Message: '{1}'", Request.Url.Segments[Request.Url.Segments.Length - 1], ex.Message); |
| e.Canceled = true; |
| } |
| } |
| //protected void holidayRadGrid_ItemDataBound(object sender, GridItemEventArgs e) |
| //{ |
| // log.Debug("holidayRadGrid_ItemCreated"); |
| // if ((e.Item.ItemType == GridItemType.Item) || (e.Item.ItemType == GridItemType.AlternatingItem)) |
| // { |
| // if (e.Item is GridEditableItem) |
| // { |
| // GridEditableItem item = (GridEditableItem) e.Item; |
| // Calendar holidayDateCalendar = (Calendar) item.FindControl("holidayDateCalendar"); |
| // if (holidayDateCalendar != null) |
| // { |
| // holidayDateCalendar.SelectedDate = ValidDate; |
| // holidayDateCalendar.VisibleDate = ValidDate; |
| // } |
| // } |
| // } |
| //} |
| /// <summary> |
| /// Handles the NeedDataSource event of the holidayRadGrid control. |
| /// </summary> |
| /// <param name="source">The source of the event.</param> |
| /// <param name="e">The <see cref="Telerik.WebControls.GridNeedDataSourceEventArgs"/> instance containing the event data.</param> |
| protected void holidayRadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) |
| { |
| log.Debug("holidayRadGrid"); |
| // Fetch holiday Dates |
| //Holidays holidays = (Holidays)Session[Constants.Session.PageData]; |
| //holidayRadGrid.DataSource = holidays.Values; |
| BuildTable(Convert.ToInt32(DateTime.Now.ToString("yyyy"))); |
| if (errorMessageHidden.Value.Length != 0) |
| { |
| errorMessageLabel.Text = errorMessageHidden.Value; |
| } |
| } |
| /// <summary> |
| /// Handles the Click event of the applyButton control. |
| /// </summary> |
| /// <param name="sender">The source of the event.</param> |
| /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> |
| protected void applyButton_Click(object sender, EventArgs e) |
| { |
| log.Debug("applyButton_Click"); |
| try |
| { |
| if (returns == null) |
| { |
| // Create returns factory |
| returns = ReturnsFactory.CreateReturns(); |
| } |
| // Get update user details |
| User user = Master.CurrentUser; |
| // Delete holiday date for a specific holiday |
| if (holidayDateHidden.Value.Length > 0) |
| { |
| Holiday holiday = returns.GetHolidayDate(Convert.ToInt32(holidayIDHidden.Value.ToString()), Convert.ToInt32(holidayYearHidden.Value.ToString()), Convert.ToDateTime(holidayDateHidden.Value)); |
| returns.DeleteHolidayDate(holiday, user.UserID); |
| } |
| else |
| { |
| errorMessageLabel.Text = "You cannot delete an entry that has no date associated to it."; |
| //errorMessagePanel.Visible = true; |
| } |
| Holidays holidays = new Holidays(); |
| holidays = returns.GetHolidays(Convert.ToInt32(holidayYear.SelectedValue.ToString())); |
| holidayRadGrid.DataSource = holidays.Values; |
| holidayRadGrid.Rebind(); |
| // Store data |
| Session[Constants.Session.PageData] = holidays; |
| } |
| catch (Exception ex) |
| { |
| log.Error("Error occurred in page '{0}'. Message: '{1}'", Request.Url.Segments[Request.Url.Segments.Length - 1], ex.Message); |
| Response.Redirect(Constants.Pages.ErrorPage); |
| } |
| } |
| private bool ValidateInput(DateTime holidayDate) |
| { |
| log.Debug("ValidateInput"); |
| // If page is not valid then let the client side show it's errors |
| if (Page.IsValid) |
| { |
| // Re-validate page (in case client side validation did not work) |
| Page.Validate(); |
| } |
| // If page is not valid then let the client side show it's errors |
| if (!Page.IsValid) |
| { |
| return false; |
| } |
| try |
| { |
| if (holidayDate.Year.ToString() != holidayYear.SelectedValue) |
| { |
| errorMessageHidden.Value = string.Format("You must select a date that occurs within the currently selected year '{0}'.", holidayYear.SelectedValue); |
| Master.MessageBox.Show(string.Format("You must select a date that occurs within the currently selected year '{0}'.", holidayYear.SelectedValue), MessageBoxIcon.Error); |
| return false; |
| } |
| } |
| catch (Exception ex) |
| { |
| log.Error("Error occurred in page '{0}'. Message: '{1}'", Request.Url.Segments[Request.Url.Segments.Length - 1], ex.Message); |
| return false; |
| } |
| return true; |
| } |
| #endregion |
| #region Properties |
| /// <summary> |
| /// Gets a value indicating whether [allow delete]. |
| /// </summary> |
| /// <value><c>true</c> if [allow delete]; otherwise, <c>false</c>.</value> |
| protected string AllowDelete |
| { |
| get { return allowDelete.ToString().ToLower(); } |
| } |
| /// <summary> |
| /// Gets a value indicating whether [allow disable]. |
| /// </summary> |
| /// <value><c>true</c> if [allow disable]; otherwise, <c>false</c>.</value> |
| protected string AllowDisable |
| { |
| get { return allowDisable.ToString().ToLower(); } |
| } |
| /// <summary> |
| /// Gets the valid date. |
| /// </summary> |
| /// <value>The valid date.</value> |
| protected DateTime ValidDate |
| { |
| get { return validDate; } |
| } |
| #endregion |
| #region Fields |
| private bool allowDelete = true; |
| private bool allowDisable = true; |
| private IReturnsManager returns = null; |
| private DateTime validDate; |
| #endregion |
Hi All,
I am trying to create a webpart for MOSS using two radgrids and two sqldatasources, where the second shows details of the first.
The control parameter of the second datasource should be the selected value of this first grid.
The problem is when I click on a row in the first grid, nothing happens in the second which has led me to believe it is something to do with the control parameter.
Can someone help me determine the problem?
Thanks.
Aaron
| RadAjaxPanel pnlWorkOrders; | |||
| RadGrid rgOrders; | |||
| RadGrid rgDetails; | |||
| SqlDataSource dsOrders; | |||
| SqlDataSource dsDetails; | |||
| protected override void CreateChildControls() | |||
| { | |||
| pnlWorkOrders = new RadAjaxPanel(); | |||
| rgOrders = new RadGrid(); | |||
| rgDetails = new RadGrid(); | |||
| dsOrders = new SqlDataSource(); | |||
| dsDetails = new SqlDataSource(); | |||
| dsOrders.ID = "dsOrders"; | |||
| dsOrders.ProviderName = "System.Data.SqlClient"; | |||
| dsOrders.ConnectionString="Data Source=cdshelp;Initial Catalog=TRACKIT70_DATA2;User ID=web_TrackItReader;Password=TRACK11!"; | |||
| dsOrders.SelectCommand="SELECT [WO_NUM], [TASK], [REQUEST], [REQDATE], [DUEDATE], [RESPONS] FROM [TASKS] WHERE ([STATUS] <> @STATUS) AND (REQDATE > @DateNow)"; | |||
| dsOrders.SelectParameters.Add("STATUS", ""Completed""); | |||
| dsOrders.SelectParameters.Add("DateNow",DbType.DateTime,"01/01/2008"); | |||
| dsDetails.ID = "dsDetails"; | |||
| dsDetails.ProviderName = "System.Data.SqlClient"; | |||
| dsDetails.ConnectionString="Data Source=cdshelp;Initial Catalog=TRACKIT70_DATA2;User ID=web_TrackItReader;Password=TRACK11!"; | |||
| dsDetails.SelectCommand="SELECT [WO_NUM], [TASK], [DESCRIPT], [NOTE] FROM [TASKS] WHERE ([WO_NUM] = @WO_NUM)"; | |||
| dsDetails.SelectParameters.Add(new ControlParameter("WO_NUM", "rgOrders","SelectedValue")); | |||
| rgOrders.ID = "rgOrders"; | |||
| rgOrders.DataSourceID="dsOrders"; | |||
| rgOrders.MasterTableView.DataKeyNames = new string[] { "WO_NUM" }; | |||
| rgOrders.ClientSettings.EnablePostBackOnRowClick = true; | |||
| rgOrders.ClientSettings.Selecting.AllowRowSelect = true; | |||
|
|||
| rgOrders.AutoGenerateColumns = false; | |||
| GridBoundColumn wo = new GridBoundColumn(); | |||
| wo.HeaderText = "Work Order #"; | |||
| wo.UniqueName = "WO_NUM"; | |||
| wo.DataField = "WO_NUM"; | |||
| GridBoundColumn ta = new GridBoundColumn(); | |||
| ta.HeaderText = "Task"; | |||
| ta.UniqueName = "TASK"; | |||
| ta.DataField = "TASK"; | |||
| GridBoundColumn rq = new GridBoundColumn(); | |||
| rq.HeaderText = "Requested By"; | |||
| rq.UniqueName = "REQUEST"; | |||
| rq.DataField = "REQUEST"; | |||
| GridBoundColumn dc = new GridBoundColumn(); | |||
| dc.HeaderText = "Date Requested"; | |||
| dc.UniqueName = "REQDATE"; | |||
| dc.DataField = "REQDATE"; | |||
| GridBoundColumn dd = new GridBoundColumn(); | |||
| dd.HeaderText = "Due Date"; | |||
| dd.UniqueName = "DUEDATE"; | |||
| dd.DataField = "DUEDATE"; | |||
| rgOrders.Columns.Add(wo); | |||
| rgOrders.Columns.Add(ta); | |||
| rgOrders.Columns.Add(rq); | |||
| rgOrders.Columns.Add(dc); | |||
| rgOrders.Columns.Add(dd); | |||
| rgDetails.AutoGenerateColumns = false; | |||
| GridBoundColumn ds = new GridBoundColumn(); | |||
| ds.HeaderText = "Description"; | |||
| ds.UniqueName = "DESCRIPT"; | |||
| ds.DataField = "DESCRIPT"; | |||
| ds.HeaderStyle.Width = Unit.Percentage(50); | |||
| ds.ItemStyle.VerticalAlign = VerticalAlign.Top; | |||
| ds.ItemStyle.HorizontalAlign = HorizontalAlign.Left; | |||
| GridBoundColumn nt = new GridBoundColumn(); | |||
| nt.HeaderText = "Notes"; | |||
| nt.UniqueName = "NOTE"; | |||
| nt.DataField = "NOTE"; | |||
| nt.HeaderStyle.Width = Unit.Percentage(50); | |||
| nt.ItemStyle.VerticalAlign = VerticalAlign.Top; | |||
| nt.ItemStyle.HorizontalAlign = HorizontalAlign.Left; | |||
| pnlWorkOrders.Width = Unit.Percentage(100); | |||
| pnlWorkOrders.Height = Unit.Percentage(100); | |||
| pnlWorkOrders.Controls.Add(dsOrders); | |||
| pnlWorkOrders.Controls.Add(dsDetails); | |||
| pnlWorkOrders.Controls.Add(rgOrders); | |||
| pnlWorkOrders.Controls.Add(rgDetails); | |||
| this.Controls.Add(pnlWorkOrders); | |||
| } |
protected void uxOkButton_Click(object sender, EventArgs e)
{
uxAjaxManager.ResponseScripts.Add(
"(function(){var f = function(){radalert('Please select criteria.',300,100,'Search');Sys.Application.remove_load(f);};Sys.Application.add_load(f);})()");
}

<div id="Panel1Panel">
<div id="Panel1" style="height:75px;width:226px;">
<br />
<br />
<div id="Label1Panel">
<span id="Label1"></span>
</div>
</div>
<div id="Label1Panel"> </div>
</div>
In my own code this is causing issues like ajaxloadingpanel not to show on ajax.
Can you please explain this behaviour?
I also have issues with Sys.Webforms.PageRequestManager errors (http://www.telerik.com/community/forums/thread/b311D-bgdech.aspx)
Thanks,
Colin