Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Post back is not allowing ohter controls to be updated.
posted

I have a WHDG that I am only displaying one band of data, only using the WHDG because we need grouping.

 

When you try to use the row selected event to update other controls it does not update them even though they are in side an update panel and you have updated it.

 

 

ASP

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="FrontEnd.WebForm1" %>

<%@ Register Assembly="Infragistics35.WebUI.WebDataInput.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %> <%@ Register Assembly="Infragistics35.Web.v10.1, Version=10.1.20101.1011, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %> <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">     <asp:ScriptManager ID="MainScriptManager" runat="server" />     <asp:UpdatePanel ID="panel1" runat="server" UpdateMode="Conditional" EnableViewState="true" ChildrenAsTriggers="true" RenderMode="Block" ViewStateMode="Enabled">         <ContentTemplate>             <igtxt:WebImageButton ID="button1" runat="server" Text="View CEF" EnableTheming="true" Width="150px" UseBrowserDefaults="False" AutoSubmit="true" Enabled="false" EnableViewState="true">                 <RoundedCorners DisabledImageUrl="ig_butXP5wh.gif" FocusImageUrl="ig_butXP3wh.gif" HoverImageUrl="ig_butXP2wh.gif" ImageUrl="ig_butXP1wh.gif" MaxHeight="80" MaxWidth="400" PressedImageUrl="ig_butXP4wh.gif" RenderingType="FileImages" />             </igtxt:WebImageButton>             <asp:Label ID="textlabel" runat="server" Text="start" />         </ContentTemplate>     </asp:UpdatePanel>     <asp:UpdatePanel ID="panel2" runat="server" UpdateMode="Conditional" EnableViewState="true" ChildrenAsTriggers="true" RenderMode="Block" ViewStateMode="Enabled">         <ContentTemplate>             <igtxt:WebImageButton ID="button2" runat="server" Text="View CEF" EnableTheming="true" Width="150px" UseBrowserDefaults="False" AutoSubmit="true" Enabled="true" EnableViewState="true">                 <RoundedCorners DisabledImageUrl="ig_butXP5wh.gif" FocusImageUrl="ig_butXP3wh.gif" HoverImageUrl="ig_butXP2wh.gif" ImageUrl="ig_butXP1wh.gif" MaxHeight="80" MaxWidth="400" PressedImageUrl="ig_butXP4wh.gif" RenderingType="FileImages" />             </igtxt:WebImageButton>             <ig:WebHierarchicalDataGrid ID="WebGrid1" runat="server" EnableAjax="true">                 <ExpandButton AltText="Expand Row" />                 <CollapseButton AltText="Collapse Row" />                 <GroupingSettings>                     <RemoveButton AltText="Ungroup Column" />                 </GroupingSettings>                 <Behaviors>                     <ig:Selection CellSelectType="None" Enabled="true" RowSelectType="Multiple" >                         <AutoPostBackFlags RowSelectionChanged="True" CellSelectionChanged="true" ColumnSelectionChanged="true" />                         <SelectionClientEvents RowSelectionChanged="" />                     </ig:Selection>                     <ig:RowSelectors Enabled="true">                     </ig:RowSelectors>                 </Behaviors>             </ig:WebHierarchicalDataGrid>         </ContentTemplate>     </asp:UpdatePanel> </asp:Content>

 

codebehind

 

using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;

namespace FrontEnd {     public partial class WebForm1 : System.Web.UI.Page     {         protected void Page_Load(object sender, EventArgs e)         {             button1.Click += new Infragistics.WebUI.WebDataInput.ClickHandler(button1_Click);             button2.Click += new Infragistics.WebUI.WebDataInput.ClickHandler(button2_Click);

            WebGrid1.DataSource = new ServiceActivityRepository().ShowList(ListTypes.AllVisits);             WebGrid1.DataBind();

            WebGrid1.RowSelectionChanged += new Infragistics.Web.UI.GridControls.SelectedRowEventHandler(Selection_RowSelectionChanged);                     }

        void Selection_RowSelectionChanged(object sender, Infragistics.Web.UI.GridControls.SelectedRowEventArgs e)         {             textlabel.Text = "right now";             button1.Enabled = !button1.Enabled;             panel1.Update();             button2.Enabled = !button2.Enabled;             panel2.Update();         }

        void button2_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)         {             button1.Enabled = !button1.Enabled;             panel1.Update();         }

        void button1_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)         {             button2.Enabled = !button2.Enabled;             panel2.Update();         }

    } }

 

 

 

  • 29417
    Verified Answer
    Offline posted

    Hello jrabarton ,

     

    Thank you for posting in our forum.

     

    I see that the grid’s ajax is enabled (EnableAjax="true”).

    In that case the grid will handle its own ajax requests which means that only the grid will be update during its ajax requests.

    To make sure the whole update panel will get updated set the EnableAjax property to false to disable the grid’s ajax.

     

    Let me know if that helps.

     

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://es.infragistics.com/support