{"id":12395,"date":"2016-01-18T14:33:00","date_gmt":"2016-01-18T14:33:00","guid":{"rendered":"https:\/\/viewmyprojects.com\/winwirewp\/?p=12395"},"modified":"2023-11-30T10:05:33","modified_gmt":"2023-11-30T10:05:33","slug":"angular-js-basics-ng-grid-features-part-2","status":"publish","type":"post","link":"https:\/\/viewmyprojects.com\/winwirewp\/blog\/angular-js-basics-ng-grid-features-part-2\/","title":{"rendered":"Angular JS \u2013 Basics \u2013 ng-grid features \u2013 Part 2"},"content":{"rendered":"\n<p><strong>Filter<\/strong><\/p>\n\n\n\n<p>External filter option, where theuser can filter specific column based on search text.<br>In HTML, we have to add text box as below.<\/p>\n\n\n\n<p>Ng-model is a directive which binds the value of HTML controls to application data.<br>Ng-change is the event which is called on text change.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"651\" height=\"43\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/angular-JS.webp\" alt=\"\" class=\"wp-image-18847\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/angular-JS.webp 651w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/angular-JS-300x20.webp 300w\" sizes=\"auto, (max-width: 651px) 100vw, 651px\" \/><\/figure><\/div>\n\n\n<p>In JS, add filter options<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"252\" height=\"59\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2022\/06\/angular-JS1.png\" alt=\"\" class=\"wp-image-12397\"\/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"100\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS2.webp\" alt=\"\" class=\"wp-image-18845\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS2.webp 719w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS2-300x42.webp 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"787\" height=\"378\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS3.webp\" alt=\"\" class=\"wp-image-18844\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS3.webp 787w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS3-300x144.webp 300w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS3-768x369.webp 768w\" sizes=\"auto, (max-width: 787px) 100vw, 787px\" \/><\/figure><\/div>\n\n\n<p>Ng-change event calls below function, here am searching EmployeeName column with search text which is defined by ng-model<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"531\" height=\"143\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS4.webp\" alt=\"\" class=\"wp-image-18843\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS4.webp 531w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS4-300x81.webp 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/figure><\/div>\n\n\n<p><strong>OUTPUT<br><\/strong><br>Filter on Employee Name<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"299\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS5.webp\" alt=\"\" class=\"wp-image-18842\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS5.webp 476w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS5-300x188.webp 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/figure><\/div>\n\n\n<p><strong>Cell Selection and Cell Inline Edit<\/strong><\/p>\n\n\n\n<p>Ng-grid has inbuilt cell selection and edit feature. We can enable\/disable it for specific columns in column definitions.<\/p>\n\n\n\n<p>Below is the example where theuser can select specific rows and display specific column values of selected rows in a Div.<\/p>\n\n\n\n<p>In HTML, selected EmployeeNames will be displayed as array which is represented by selectedIDs<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"358\" height=\"43\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2022\/06\/Angular-JS6.png\" alt=\"\" class=\"wp-image-12402\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2022\/06\/Angular-JS6.png 358w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2022\/06\/Angular-JS6-300x36.png 300w\" sizes=\"auto, (max-width: 358px) 100vw, 358px\" \/><\/figure><\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"558\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS7.webp\" alt=\"\" class=\"wp-image-18839\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS7.webp 793w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS7-300x211.webp 300w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS7-768x540.webp 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure><\/div>\n\n\n<p><strong>OUTPUT<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"256\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS8.webp\" alt=\"\" class=\"wp-image-18840\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS8.webp 476w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS8-300x161.webp 300w\" sizes=\"auto, (max-width: 476px) 100vw, 476px\" \/><\/figure><\/div>\n\n\n<p>Selected rows employee names are displayed as array below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"467\" height=\"170\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9.webp\" alt=\"\" class=\"wp-image-18838\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9.webp 467w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9-300x109.webp 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/figure><\/div>\n\n\n<p><strong>Cell Editing<br><\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"467\" height=\"170\" src=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9-1.webp\" alt=\"\" class=\"wp-image-18837\" srcset=\"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9-1.webp 467w, https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS9-1-300x109.webp 300w\" sizes=\"auto, (max-width: 467px) 100vw, 467px\" \/><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>Filter External filter option, where theuser can filter specific column based on search text.In HTML, we have to add text box as below. Ng-model is a directive which binds the value of HTML controls to application data.Ng-change is the event which is called on text change. In JS, add filter options Ng-change event calls below&hellip; <a class=\"more-link\" href=\"https:\/\/viewmyprojects.com\/winwirewp\/blog\/angular-js-basics-ng-grid-features-part-2\/\">Continue reading <span class=\"screen-reader-text\">Angular JS \u2013 Basics \u2013 ng-grid features \u2013 Part 2<\/span><\/a><\/p>\n","protected":false},"author":63,"featured_media":16816,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_uag_custom_page_level_css":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-12395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","entry"],"acf":[],"featured_image_src":"https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp","author_info":{"display_name":"Sruthi","author_link":"https:\/\/viewmyprojects.com\/winwirewp\/author\/sruthi\/"},"views":3558,"uagb_featured_image_src":{"full":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp",800,440,false],"thumbnail":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic-150x150.webp",150,150,true],"medium":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic-300x165.webp",300,165,true],"medium_large":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic-768x422.webp",750,412,true],"large":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp",750,413,false],"1536x1536":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp",800,440,false],"2048x2048":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp",800,440,false],"post-thumbnail":["https:\/\/viewmyprojects.com\/winwirewp\/wp-content\/uploads\/2023\/11\/Angular-JS-\u2013-Basics-ng-grid-features-Part-2-graphic.webp",800,440,false]},"uagb_author_info":{"display_name":"Sruthi","author_link":"https:\/\/viewmyprojects.com\/winwirewp\/author\/sruthi\/"},"uagb_comment_info":0,"uagb_excerpt":"Filter External filter option, where theuser can filter specific column based on search text.In HTML, we have to add text box as below. Ng-model is a directive which binds the value of HTML controls to application data.Ng-change is the event which is called on text change. In JS, add filter options Ng-change event calls below&hellip;&hellip;","_links":{"self":[{"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/posts\/12395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/comments?post=12395"}],"version-history":[{"count":2,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/posts\/12395\/revisions"}],"predecessor-version":[{"id":18867,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/posts\/12395\/revisions\/18867"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/media\/16816"}],"wp:attachment":[{"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/media?parent=12395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/categories?post=12395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/viewmyprojects.com\/winwirewp\/wp-json\/wp\/v2\/tags?post=12395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}