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

How to fetch Id of RadGrid.ExpandCollapseCommandName in Javascript

1 Answer 66 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ritzie
Top achievements
Rank 1
Ritzie asked on 10 Mar 2009, 06:25 AM


  Hello All,

                I am using a Rad Grd in my Program ,I want the program requirement is that the AjaxLoadingPanel must be shown only when the ExpandCollapseEvent gets fired of the RadGrid for that I want to fetch the Id of the ExpandCollapse in javascript because I am using the following code

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    
<script type="text/javascript">
       
var currentLoadingPanel = null;
       var currentUpdatedControl
= null;
       function RequestStart(sender, args)
       {
           
currentLoadingPanel = $find("RadAjaxLoadingPanel1");
          
           
if (args.get_eventTarget() == "Button1")
           {
               
currentUpdatedControl = "Panel1";
           }
           
else
           {
               
currentUpdatedControl = "Panel2";
           }
           
//show the loading panel over the updated control
           
currentLoadingPanel.show(currentUpdatedControl);
       }
       
function ResponseEnd()
       {
           
//hide the loading panel and clean up the global variables
           
if (currentLoadingPanel != null)
               currentLoadingPanel.hide(currentUpdatedControl);
           currentUpdatedControl
= null;
           currentLoadingPanel
= null;
       }
   
</script>
   
</telerik:RadCodeBlock>


For that I will need that Please suggest me the answer..
Thankx in advance
Ritzie

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 12 Mar 2009, 02:17 PM
Hi Ritzie,

The following code demonstrates how to determine if the command was raised by clicking on an expand/collapse image in a hierarchy:

.Js
  function requestStart(sender, args)  
               {  
               var eTarget = args.get_eventTarget();  
                    if(eTarget.search("ExpandColumn")!=-1)  
                    {                      
                    //showImage...
                    }  
               }            

I hope this helps!

Sincerely yours,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Ritzie
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or