How to reload datagrid with checked rows

1 reply. Last post: July 16, 2010 11:02 AM by Andi Santoso
Tags :
  • (None)

I have a datagrid with one column in my grid where the  columntype is a checkbox and isrowchecker = true.  I have a button on my page where once it is clicked i can retrieve an arraylist of checked rows. i can't seem to refresh my grid and only show the selected rows from this button click. How is this done and what simple step am I missing? Thanks for any help.

Answers

Hi Kristian Cowart,

     First of all, I will assume that you are having this scenario under javasript code. We can simply add WebGrid.Refresh() after all the scenario is done, is this case, it would be getting all the checked rows informations. Here is the snippet to do so, in here I only show how many check box is checked.

        function Button1_onclick() {
            var WebGrid = ISGetObject("WebGrid1");
            alert("Total checked row : " + WebGrid.RootTable.GetCheckedRows().length);
            WebGrid.Refresh();
        }

      I hope it can helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

All Replies

Hi Kristian Cowart,

     First of all, I will assume that you are having this scenario under javasript code. We can simply add WebGrid.Refresh() after all the scenario is done, is this case, it would be getting all the checked rows informations. Here is the snippet to do so, in here I only show how many check box is checked.

        function Button1_onclick() {
            var WebGrid = ISGetObject("WebGrid1");
            alert("Total checked row : " + WebGrid.RootTable.GetCheckedRows().length);
            WebGrid.Refresh();
        }

      I hope it can helps. Thank you and have a nice day.

Best Regards,

Andi Santoso

All times are GMT -5. The time now is 8:23 PM.
Previous Next