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

RadGrid, block Grid on RowClick ItemCommand

3 Answers 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oscar Emiliano
Top achievements
Rank 1
Oscar Emiliano asked on 21 Mar 2017, 03:58 PM

Hi, thanks in advance for any help.

I have a page with a RadGrid and it has declared the "OnItemCommand" attribute. On a switch I have the "RowClick" case, where I take in consideration the main ID of the row and then I present details of that element in a bunch of textboxes.

What I need to do is to block UI when the user clicks on the Row while the information is loading. I know that Grid has its own loading Image but everything is still enabled when loading. I need to block because the rows in the gridview have buttons for actions like "view", "edit", "delete" (image buttons with "OnClientClicked" methods defined that open RadWindows as popups).

I am using jquery.blockUI, I am calling it on the codebehind at the "RowClick" case and unBlocking it once all the info is loaded at the end of "Page_Load" but the BlockUI is appearing after the grid loading animation is completed and I want them to happen at the same time.

 

protected void MainGridView_OnItemCommand(object sender, GridCommandEventArgs e)
{

     switch (e.CommandName)

     { 

          case "RowClick":                    

          Page page = HttpContext.Current.Handler as Page;

          ScriptManager.RegisterStartupScript(page, page.GetType(), "err_msg", "blockUI();", true);  // "blockUI" function has only a call to $.blockUI()

          fill_Details(MainGridView.SelectedValue);

          break;

          case "x":

           ....

           ....

       }

}

 

So, basically what I need is to be able to execute a javascript function at the same time that the loading image appears on the grid so I can disable any other action while loading is still in progress. 

 

Any comment, suggestion or hint will be highly appreciated.

 

Thanks & Regards

Oscar

 

3 Answers, 1 is accepted

Sort by
0
Oscar Emiliano
Top achievements
Rank 1
answered on 23 Mar 2017, 02:51 PM

Good Morning again....

Any help or hint you could provide for this? I will really appreciate it.

Thanks & Regards

0
Oscar Emiliano
Top achievements
Rank 1
answered on 27 Mar 2017, 02:34 PM

Good morning Admins....

It has been almost a week since my first post....could you please give me a reply?, at least to know that it is not possible or if I should look for another solution in other place....

Thanks in advance, Regards

Oscar

0
Oscar Emiliano
Top achievements
Rank 1
answered on 28 Mar 2017, 04:04 PM

Hi Again....

Please, any admin just let me know if my post is ok or if I have to find a different solution...

Regards

Tags
Grid
Asked by
Oscar Emiliano
Top achievements
Rank 1
Answers by
Oscar Emiliano
Top achievements
Rank 1
Share this question
or