Thursday, December 26, 2013

Row wise sum to the next row

whileprintingrecords; numbervar subtotal; subtotal := subtotal + ({@TotAmt})

Wednesday, November 27, 2013

Another Way To addrow in datatable using Jquery

Antecedents/Triggers Consequences Timing Consistency
function addRow() { var tbl = document.getElementById('tbl'); var Row = parseInt(document.getElementById('hsb').value); var temprow=Row+1; var mainRow = tbl.insertRow(temprow); var trId ="tr"+temprow; mainRow.id=trId; var td = document.createElement("td"); td.colSpan='6'; var table = document.createElement("table"); table.border="0"; table.cellPadding="0"; table.cellSpacing="1"; table.width="100%" var newRow = table.insertRow(0); var sec = "'risk'"; var newCell = newRow.insertCell(0); newCell.width="50%" newCell.innerHTML = ' var newCell = newRow.insertCell(1); newCell.width="17%" newCell.innerHTML = ''; var newCell = newRow.insertCell(2); newCell.width="10%" newCell.innerHTML = ''; var newCell = newRow.insertCell(3); newCell.width="10%" newCell.innerHTML = ''; td.appendChild(table); mainRow.appendChild(td); document.getElementById('hsb').value=temprow; }

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);