in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

How can I set the IE Status bar by CallbackPanel Dynamically?

Last post 9/12/2008 11:25 AM by Jian Ye. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 9/1/2008 3:39 AM

    How can I set the IE Status bar by CallbackPanel Dynamically?

    Hi,

    In my page, I have a button, a textbox, a CallbackPanel, a ASPxGridView, I can input the filter in the textbox  then press the button to get the requited data

    by CallbackPanle using the performCallback method, and show the data in the ASPxGridView.

    I want to implement another feature that display the count of the GridView in the IE Status bar, I implement it using this code as below:

    string statusBarText = "row(s): " + ASPxGridView.Rows.Count;
    ClientScript.RegisterStartupScript(GetType(), "SetStatusBarText", "window.status='"+ statusBarText +"';", true);

    But, I find the page output the same count always, in this case, whatever I change the filter in the textbox, then I press the button to get new data, the count in the

    status bar is never been changed.

     

    I want to know how can I output the latest value in callback method.

     

    Thks!

  • 9/1/2008 4:43 AM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

    Hi Jian,

    Pass the required value (records count) as a part of the callback result
    and process this data within the CallbackComplete client-side event handler.

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
  • 9/1/2008 6:26 AM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

    Hi, Victor,

    Thank you for you reply quickly.

    I don't know how to return the value as a part of the callback result, I know we can pass the parameter from client to server, please tell me what to do.

    And you mentioned that "Client-side event" is the "EndCallback" event handler?

     

     

     

  • 9/1/2008 8:10 AM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

    Jian, look at the following code:

    ASPX:

    <script type="text/javascript">

        function UpdateWindowStatus() {

            window.status = grid.cpRowCount;

        }

        function OnUpdateButtonClick(s, e) {

            grid.PerformCallback();

        }

        function OnGridViewEndCallback(s, e) {

            UpdateWindowStatus();

        }

    </script>

     

    <dxwgv:ASPxGridView ID="gvGridView" runat="server" AutoGenerateColumns="False" DataSourceID="dsDataSource" KeyFieldName="CategoryID"

        ClientInstanceName="grid" OnCustomJSProperties="OnCustomJSPropertiesAssign">

        <Columns>

            <dxwgv:GridViewDataTextColumn FieldName="CategoryID" ReadOnly="True" VisibleIndex="0">

                <EditFormSettings Visible="False" />

            </dxwgv:GridViewDataTextColumn>

            <dxwgv:GridViewDataTextColumn FieldName="CategoryName" VisibleIndex="1" />

            <dxwgv:GridViewDataTextColumn FieldName="Description" VisibleIndex="2" />

        </Columns>

        <ClientSideEvents EndCallback="OnGridViewEndCallback" />

    </dxwgv:ASPxGridView>

     

    <br />

     

    <table>

        <tr>

            <td>

                Filter by Category Name:

            </td>

            <td>

                <dxe:ASPxTextBox ID="txtFilterBox" runat="server" Width="170px" />

            </td>

            <td>

                <dxe:ASPxButton ID="btnUpdate" runat="server" Text="Update">

                    <ClientSideEvents Click="OnUpdateButtonClick" />

                </dxe:ASPxButton>

            </td>

        </tr>

    </table>

     

    <asp:AccessDataSource ID="dsDataSource" runat="server" DataFile="~/App_Data/nwind.mdb"

        SelectCommand="SELECT * FROM [Categories] WHERE ([CategoryName] LIKE '%' + ? + '%')">

        <SelectParameters>

            <asp:ControlParameter ControlID="txtFilterBox" Name="CategoryName" PropertyName="Text" Type="String" />

        </SelectParameters>

    </asp:AccessDataSource>

    CS:

    protected void Page_Load(object sender, EventArgs e) {

        // TODO: default binding

    }

    protected void OnCustomJSPropertiesAssign(object sender, ASPxGridViewClientJSPropertiesEventArgs e) {

        ASPxGridView grid = (ASPxGridView)sender;

        e.Properties["cpRowCount"] = grid.VisibleRowCount;

    }

    Victor
    R&D, ASP.NET Team, DevExpress Inc.

    P.S. If you wish to receive direct assistance from our Support Team, use Support Center.
  • 9/1/2008 9:41 PM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

    Hi, Victor

    This is a nice example, I had resolve this issue, thank you very much.

  • 9/2/2008 4:38 PM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

     Hasn't support for status bar updates in IE and other browsers pretty much been deprecated by default in recent releases? Possibly off topic, but I had a request related to this type of functionality recently and that is what my research yielded.

  • 9/12/2008 11:25 AM In reply to

    Re: How can I set the IE Status bar by CallbackPanel Dynamically?

    Hi Jim,

    What is your question? Can I help you?

Page 1 of 1 (7 items)
Copyright © 1998-2009 Developer Express Inc.
ALL RIGHTS RESERVED