This is a migrated thread and some comments may be shown as answers.

Show loading panel on client side binding

1 Answer 180 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sneha
Top achievements
Rank 1
Sneha asked on 22 Jul 2010, 05:09 PM
My grid gets bound on the client side but when the data's loading it shows me a blank grid,I need a loading panel to show then.

Secondly I was unable to figure out how to have text show up beside a GridClientSelectColumn intuitive ones were Text and HeaderText
but they don't seem to work.

Another problem I faced was hiding columns, I have couple of buttons minimize and maximize in a user control these buttons are currently from a tool bar, no clicking them I set a hidden textbox to have which button was clicked and have the columns of the grid displayed accordingly.
I call the grid binding function and the hide columns function in the grids OnMasterTableViewCreated function, having hide columns there gives me the Error: 'this.get_columns()[...]' is null or not an object.

below is my hidecolumns function
 function hideColumns() {
            debugger;
            var tableView = $find("<%= radExhibitorList.ClientID %>").get_masterTableView();
            var Mode = $get("pnlExhibitor_hdnMode").value
            var gridcolumns = [0,1]; //tableView.get_Columns();
            var count = 0;

            for (count = 0; count <= gridcolumns.length; count++) {
                if (Mode == 'Minimise') {
                    var ParentControl = $get($get("pnlExhibitor_RadDock1_C_pnlHeader_hdnParentControl").value);
                    //
                    ParentControl.style.display = "none";
                }
                else if (Mode == 'Max') {
                    tableView.showColumn(gridcolumns[count]);
                }
                else { tableView.hideColumn(gridcolumns[count]); }
            }

        }


1 Answer, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 27 Jul 2010, 05:22 PM
Hello Sneha,

Concerning your first question, you can look at the following online example that shows how to display a loading panel on a grid bound on the client:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/databinding/defaultcs.aspx

With regards to your second question, you can attach a client event handler to the OnRowCreated event of the grid, get a reference to the celll of the ClientSelectColumn and populate it with the correspoinding text. For this purpose you should assign a UniqueName to the client select column and in javascript use the grid's master table view getCellByColumnUniqueName() method.

As for the third issue, the easies way to hide the columns is to use their Display property in mark-up. If not, you can use the master table view's hideColumn() client-side method.

Hope it helps.

Greetings,
Tsvetoslav
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Sneha
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Share this question
or