Wednesday, November 27, 2013

Adding,Deleting Row in gridview using Jquery (Very Effective)


Records
Company Product Model State City Quantity Contact Mail ID


Select
Jqueyy code: $(document).ready( function () { $("#DuplicateRow").click( function () { var checkboxValues = []; $('input[type="checkbox"]:checked').each( function () { var $chkbox = $(this); var $actualrow = $chkbox.closest('tr'); var $clonedRow = $actualrow.clone(); $clonedRow.find("select").each( function (i) { this.selectedIndex = $actualrow.find("select")[i].selectedIndex; } ) $chkbox.closest('#tabletomodify').append($clonedRow); } ); } ); $("#DeleteRow").click( function () { var checkboxValues = []; $('input[type="checkbox"]:checked').each( function () { var $chkbox = $(this); $(this).closest("tr").remove(); } ); } ); $("#AddRow").click( function () { var row = document.getElementById("row"); // find row to copy var table = document.getElementById("tabletomodify"); // find table to append to var clone = row.cloneNode(true); // copy children too clone.id = "row"; // change id or other attributes/contents table.appendChild(clone); // add new row to end of table } ); $('#tabletomodify').on('change','.selcompany', function () { var optionSelected = $("option:selected", this); var valueSelected = this.value; alert(valueSelected); }); } );

Friday, November 22, 2013

Object Object , Json Parse Problem in jquery

success: function(msg) { alert("{Pid:'"+ faram+"'}"); var orders =msg; if (orders.length > 0) { alert(orders.length ); test(orders); } function test(data) { for (i in data) { for (k in data[i]) { alert(data[i][k]); } }

Saturday, August 31, 2013

LINQ Tutorials

http://www.codeproject.com/Articles/46422/A-LINQ-Tutorial-Adding-Updating-Deleting-Data

Wednesday, August 21, 2013

Asp.net Gridview Lazy Loading

http://www.go4coding.com/post/2011/04/11/Auto-loading-content-on-page-scroll-in-aspnet-using-jquery.aspx http://aspsnippets.com/Articles/Loading-data-in-GridView-while-scrolling-down-in-ASPNet-using-jQuery-AJAX.aspx http://aspsnippets.com/Articles/Load-on-demand-data-in-GridView-on-scroll-using-ASPNet-and-jQuery-AJAX.aspx

Wednesday, August 14, 2013

"Invalid JSON primitive" in JQery, Ajax

Data Should Be written in this form if the argument is string data:'{Pid:'+ JSON.stringify(faram)+'}', or data:"{Pid:'"+ JSON.stringify(faram)+"'}", Success success: function(msg) { var orders =msg; if (orders.length > 0) { alert(orders); To Show The Errors error: function(xhr, textStatus, errorThrown) { alert(xhr.status); alert(errorThrown); alert(xhr.responseText);

Saturday, August 3, 2013

Bootstrap Tools

http://designshack.net/articles/css/20-awesome-resources-for-twitter-bootstrap-lovers/ http://stylebootstrap.info/ http://charliepark.org/bootstrap_buttons/ http://bootstrapstyler.com/#themes https://wrapbootstrap.com/ http://bootswatch.com/ http://builtwithbootstrap.com/ http://www.extendingfireworks.com/ http://axutopia.com/twitter-bootstrap/ http://gui.repixdesign.com/#freebies http://fortawesome.github.io/Font-Awesome/ http://addyosmani.github.io/jquery-ui-bootstrap/ http://www.eyecon.ro/colorpicker-and-datepicker-for-twitter-bootstrap.htm http://designshack.net/articles/css/5-incredibly-useful-tools-built-into-twitter-bootstrap/ http://alistapart.com/article/building-twitter-bootstrap