Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Button CLick with JavaScript and VB code

Posted on 2013-05-10
2
Medium Priority
?
492 Views
Last Modified: 2013-05-13
I have a button that on click I want to (modify an )use this Javascript with a yes no confirm that (len) records are being deleted
function getit() {
    var grid = $find("<%= rgQueue.ClientID %>");
    var len = grid.get_masterTableView().get_dataItems().length;
    alert(len);
}

Open in new window


If confirm = OK

Then let the VB code run
    Private Sub rbCancelList_Click(sender As Object, e As System.EventArgs) Handles rbCancelList.Click
        Dim a As ArrayList = GetTelerikGridSelections(rgQueue)
        'do something with the ArrayList
    End Sub

Open in new window

0
Comment
Question by:lrbrister
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
Ark earned 2000 total points
ID: 39160303
'server
rbCancelList.OnClientClick = "getit()"
Private Sub rbCancelList_Click(sender As Object, e As System.EventArgs) Handles rbCancelList.Click
        Dim a As ArrayList = GetTelerikGridSelections(rgQueue)
        'do something with the ArrayList
    End Sub

'client
function getit() {
    var grid = $find("<%= rgQueue.ClientID %>");
    var len = grid.get_masterTableView().get_dataItems().length;
    return confirm( 'delete ' + len + ' records?');
}
0
 

Author Closing Comment

by:lrbrister
ID: 39161099
Thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question