Forums

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

Last post 9/12/2008 11:25 AM by Jian Ye. 6 replies.
Sort Posts: Previous Next
  • Jian Ye

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

    9/1/2008 3:39 AM
    • Top 500 Contributor
    • Joined on 5/14/2008
    • Posts 43

    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!

  • Anonymous

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

    9/1/2008 4:43 AM

    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.

  • Jian Ye

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

    9/1/2008 6:26 AM
    • Top 500 Contributor
    • Joined on 5/14/2008
    • Posts 43

    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?

     

     

     

  • Anonymous

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

    9/1/2008 8:10 AM

    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;

    }

  • Jian Ye

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

    9/1/2008 9:41 PM
    • Top 500 Contributor
    • Joined on 5/14/2008
    • Posts 43

    Hi, Victor

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

  • Jim Leary

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

    9/2/2008 4:38 PM
    • Top 500 Contributor
    • Joined on 1/18/2008
    • Posts 75

     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.

  • Jian Ye

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

    9/12/2008 11:25 AM
    • Top 500 Contributor
    • Joined on 5/14/2008
    • Posts 43

    Hi Jim,

    What is your question? Can I help you?

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.