Skip to main content

Posts

Showing posts from June, 2015

Json:Inline Table Editing Using Jquery Json

                  Some common editors are added into datagrid to allow users to edit data. All the editor are defined in $.fn.datagrid.defaults.editors object that can be extended to support new editor. This tutorial will show you how to add a new numberspinner editor into the datagrid.  HTML FILE =================================  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd "> < html > < body > < h2 > Extend editors for DataGrid </ h2 > < div class = "demo-info" > < div class = "demo-tip icon-tip" > & nbsp ; </ div > < div > Click the edit button on the right side of row to start editing with numberspinner editor for unit cost field . </ div > </ div > < div style = " margin : 10 px 0 " > </ div > < table id = "

add-remove-input-fields-dynamically-with-jquery

                       If you are looking to add and remove duplicate input fields, here’s jQuery example below to do the task for you. This jQuery snippet adds duplicate input fields dynamically. JQUERY FILE $ ( document ) . ready ( function ( ) {     var max_fields       = 10 ; //maximum input boxes allowed     var wrapper         = $ ( ".input_fields_wrap" ) ; //Fields wrapper     var add_button       = $ ( ".add_field_button" ) ; //Add button ID         var x = 1 ; //initlal text box count     $ ( add_button ) . click ( function ( e ) { //on add input button click         e. preventDefault ( ) ;         if ( x < max_fields ) { //max input box allowed             x ++; //text box increment             $ ( wrapper ) . append ( '<div><input type="text" name="mytext[]"/><a href="#" class="remove_field">Remove</a></div>' ) ; //add input