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

Getting count of selected items (i.e. rows) from gridview using Javascript

1 Answer 135 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 16 Feb 2009, 07:30 AM
Hi,
    We want to get count of selected items (i.e. rows) from gridview using Javascript. We have used the following script in our code.
  <

telerik:RadCodeBlock ID="RadCodeBlock" runat="server">

 

    <

 

 

script type="text/javascript">

 

        function GetSelectedItems()

 

 

         {

 

                var selectItem = $find("<%= gvQueryList.MasterTableView.ClientID %>").get_selectedItems().length;

 

 

 

 

                if(selectItem == 0)

 

 

                 {

                        alert(

 

 

"Please select atleast one query");

 

                        return false;

 

 

                 }

 

                else if(selectItem >1)

 

 

                 {

                        alert(

 

 

"Please select only one query");

 

                        return false;

 

 

                 }
                

else

 

 

 

                {

 

 

                        return true;

 

 

                 }

    }

     </

script>

 

 </

telerik:RadCodeBlock>

 

 

 

 

 

The above script is working fine. But it is not working on our server. So is there any problem with our server browser or browser version ? Currently server brower version is IE 7. Can you suggest any other solution for the same using Javascript ?


Thanks in advance

 

 

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 18 Feb 2009, 09:10 AM
Hello Rahul,

Thank you for contacting us.

From the information provided so far I am not able to determine the exact source of the issue you are facing.
I suppose that the problem is not in your server browser or browser version.
Additionally in order to progress in the resolution of this issue, it will be best if you send me a small project which would allow me to track the issue locally.

Kind regards,
Pavlina
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
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or