CallbackSettings-Action= C1GridView 2025v2 399

Posted by: enrique.pv-ext on 7 May 2026, 9:39 am EST

  • Posted 7 May 2026, 9:39 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 399 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1GridView from C1.Web.Wijmo.Controls.48.dll

    using C1.Web.Wijmo.Controls.C1GridView;

    which differences

    CallbackSettings-Action=“All”

    vs

    CallbackSettings-Action=“None”

    In aspx:

        <%--CallbackSettings-Action="All"--%>
        <cc1:C1GridView ID="C1GridView1" EnableViewState="true"
            runat="server"
            AllowPaging="true"         AllowSorting="true"        ShowFilter="true"
            AutogenerateColumns="False"        ShowFooter="False"        AllowColMoving="True"
            Height="800px"
            ScrollingSettings-Mode="Vertical"
            ShowRowHeader="true" ShowGroupArea="true"
            GroupAreaCaption="Drag and drop fields here"
            CallbackSettings-Action="None"..

    CallbackSettings-Action=“All” then Page.IsCallback value is true.

      private bool IsAsyncPartialPostBack()
      {
          var scriptManager = ScriptManager.GetCurrent(Page);
          return scriptManager != null && scriptManager.IsInAsyncPostBack;
      }
      private bool _pendingSingleGroupingWarning;
      private void TraceRequestType(string context)
      {
          var isPostBack = IsPostBack;
          var isAsyncPartial = IsAsyncPartialPostBack();
          var isCallback = Page.IsCallback;

    I set CallbackSettings-Action=“None” value.

    CallbackSettings-Action=“None” value, and how-to Show alert in Callback page ??

        protected void C1GridView1_ColumnGrouping(object sender, C1.Web.Wijmo.Controls.C1GridView.C1GridViewColumnGroupEventArgs e)
        {
        ....
            if (!string.IsNullOrEmpty(currentGrouped) &&
                !string.IsNullOrEmpty(newGrouped) &&
                !string.Equals(currentGrouped, newGrouped, StringComparison.Ordinal))
            {
                e.Cancel = true;
                //ShowSingleGroupingWarning();
                _pendingSingleGroupingWarning = true;
            }
        }
    
            protected override void OnPreRender(EventArgs e)
            {
                base.OnPreRender(e);
    
                if (_pendingSingleGroupingWarning)
                {
                    ShowSingleGroupingWarning();
                }
            }
    

    any alternatives

    CallbackSettings-Action=“All”

    vs

    CallbackSettings-Action=“None” ?

    when use CallbackSettings-Action=“All” ?

    when use CallbackSettings-Action=“None” ?

    thanks !!!

  • Posted 8 May 2026, 5:30 am EST

    Hi,

    Here are the functional differences between the CallbackSettings-Action properties for C1GridView:

    "All" (Callbacks): Only the grid communicates with the server. This is highly optimized for performance, but because it bypasses standard page rendering, you cannot update external controls or inject server-side JavaScript (like your alert).
    
    "None" (Postbacks): The grid triggers a standard page Postback. This allows server-side JavaScript and external control updates, but it causes a full page reload.
    

    Solution for displaying your alert:

    Since your current code relies on server-side logic to trigger the warning, you must use CallbackSettings-Action=“None” and wrap your C1GridView inside an asp:UpdatePanel.

    This will convert the full page reload into an Asynchronous Postback. This configuration is required for the ScriptManager to successfully register and display your startup script alert without causing the page to flicker.

    For more information, please check our documentation here:

    Regards,

    Akshay

  • Posted 8 May 2026, 5:42 am EST

    Thanks a lot Akshay, its more clear info.

    Is it possible using CallbackSettings-Action = “All” (Callbacks) for display the alert ?

  • Posted 8 May 2026, 6:05 am EST

    Hi,

    You can try adding the following client-side event to show alert:

       function C1GridView1_OnClientColumnGrouping(s, e) {
    
           var gridElement = s.target;
           var $grid = $(gridElement);
           var widget = $grid.data("wijmo-c1gridview") || $grid.data("wijmo-wijgrid") || $grid.data("wijgrid");
           console.log($grid)
           if (widget && widget.options && widget.options.columns) {
               var groupedCount = 0;
               var cols = widget.options.columns;
    
               // Count columns that currently have an active group position
               for (var i = 0; i < cols.length; i++) {
                   var gInfo = cols[i].groupInfo;
                   if (gInfo && gInfo.position) {
                       var pos = gInfo.position.toString().toLowerCase();
                       if (pos !== "none" && pos !== "0") {
                           groupedCount++;
                       }
                   }
               }
    
               // If 1 or more columns are already grouped, block the action and show alert
               if (groupedCount >= 1) {
                   alert("Grouping is limited to 1 column at a time.");
    
                   // Cancel the ASP.NET AJAX grouping event
                   if (e && typeof e.set_cancel === "function") {
                       e.set_cancel(true);
                   }
                   return false;
               }
           }
       }
    

    This should work with CallbackSettings-Action=“All”

    Regards,

    Akshay

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels