Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to correctly associate double click with the Edit?
Message
From
10/04/2013 15:32:30
 
General information
Forum:
Javascript
Category:
JQuery
Miscellaneous
Thread ID:
01570547
Message ID:
01570658
Views:
33
What version of MVC is this?

>I want to be on the latest and the greatest and also keep up with the fixes in flexigrid as well. In my bundle config I have right now:
>
>
>using System.Web.Optimization;
>
>namespace CardNumbers.App_Start
>{
>    public class BundleConfig
>    {
>        // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725
>        public static void RegisterBundles(BundleCollection bundles)
>        {
>            bundles.UseCdn = true; //enable CDN support
>
>            //add link to jquery on the CDN (Microsoft)
>            var jqueryCdnPath =  "http://code.jquery.com/jquery-latest.min.js"; 
>           // var jqueryCdnPath = "//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js";  
> 
>            bundles.Add(new ScriptBundle("~/bundles/jquery",jqueryCdnPath).Include(
>                "~/Scripts/jQuery/jquery-{version}.js"));
>
>            jqueryCdnPath = "//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js";
>            bundles.Add(new ScriptBundle("~/bundles/jqueryui", jqueryCdnPath).Include(
>                "~/Scripts/jQuery/jquery-ui-{version}.js"));
>
>            jqueryCdnPath = "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js";
>
>            bundles.Add(new ScriptBundle("~/bundles/jqueryval", jqueryCdnPath).Include(
>                "~/Scripts/jQuery/jquery.unobtrusive*",
>                "~/Scripts/jQuery/jquery.validate*"));
>
>            // Use the development version of Modernizr to develop with and learn from. Then, when you're
>            // ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
>            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
>                "~/Scripts/Shared/modernizr-*"));
>
>            bundles.Add(new ScriptBundle("~/bundles/flexigrid").Include("~/Scripts/Flexigrid/flexigrid.js"));
>
>           // jqueryCdnPath = "//ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/jquery.dataTables.min.js";
>            
>           //bundles.Add(new ScriptBundle("~/bundles/jquery.dataTables",jqueryCdnPath).Include("~/Scripts/jQuery.DataTables/jquery.dataTables.js"));
>
>            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
>
>            bundles.Add(new StyleBundle("~/Content/themes/FlexiGrid/css").Include
>                ("~/Content/themes/FlexiGrid/flexigrid.css"));
>
>            jqueryCdnPath = "http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css";
>
>            bundles.Add(new StyleBundle("~/Content/themes/base/css",jqueryCdnPath).Include(
>                "~/Content/themes/base/jquery.ui.core.css",
>                "~/Content/themes/base/jquery.ui.resizable.css",
>                "~/Content/themes/base/jquery.ui.selectable.css",
>                "~/Content/themes/base/jquery.ui.accordion.css",
>                "~/Content/themes/base/jquery.ui.autocomplete.css",
>                "~/Content/themes/base/jquery.ui.button.css",
>                "~/Content/themes/base/jquery.ui.dialog.css",
>                "~/Content/themes/base/jquery.ui.slider.css",
>                "~/Content/themes/base/jquery.ui.tabs.css",
>                "~/Content/themes/base/jquery.ui.datepicker.css",
>                "~/Content/themes/base/jquery.ui.progressbar.css",
>                "~/Content/themes/base/jquery.ui.theme.css", 
>                "~/Content/themes/base/jquery-ui-1.9.1.custom.css"));
>
>            //jqueryCdnPath = "//ajax.aspnetcdn.com/ajax/jquery.dataTables/1.9.4/css/jquery.dataTables.css";
>
>            //bundles.Add(new StyleBundle("~/Content/jquery.DataTables/css", jqueryCdnPath).Include("~/Content/jquery.dataTables.css"));
>
>            BundleTable.EnableOptimizations = true; 
>
>        }
>    }
>}
>
>So, it's referencing the latest stuff from jQuery. It may be not the best idea, but I am sort of learning on this project.
>
>
>>To debug this, I'd open the site up in Chrome and select a row. Then I'd go into Elements and click on the magnifying glass icon (small icon at the bottom) and select the row that is highlighted. In the source I'd make sure that they're still attaching the class of "trSelected" to the selected rows. If that looked good, I'd then click on the Console menu option and attempt to view difference references / run your code:
>>
>>
>>$('#flexClients')   (then hit Enter - is a bit of HTML returned? If not, you've got the wrong reference)
>>
>>$('.trSelected', $('#flexClients')).each(function() { alert('Id is: ' + $(this).attr('id')) })  (then hit enter, it should display the selected row ID)
>>
>
>I am going to try it in a moment, thanks a lot.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform