Error
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.
  • JHTMLicon not supported. File not found.

false

Change/Set the name of the column in the DataColumnCollection.
Wednesday, 01 February 2012 01:17
Change/Set the name of the column in the DataColumnCollection.

DataColumn col= new DataColumn();
col.ColumnName = "SupplierID";
col.AutoIncrement = false;
// Add the column to the datatable
mydatatable.Columns.Add(col);

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/XN-bp3kxZwY/14601

 
Select/unselect all checkboxes in grid
Monday, 30 January 2012 07:09
// Select/unselect all checkboxes in grid



function SelectAllCheckBoxesInGrid(gridHeaderCheckBoxId, gridChildCheckBoxId) {
var frmElements = document.forms[0].getElementsByTagName('input');
for (i = 0; i < frmElements.length; i++) {
if (frmElements[i].type == "checkbox" && frmElements[i].id.indexOf(gridChildCheckBoxId, 0) >= 0) {
if (frmElements[i].disabled == false) {
frmElements[i].checked = gridHeaderCheckBoxId.checked;
}
}
}
return false;
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/6MnJgG2ERrI/14537

 
verify that atleast one check box checked in the grid
Friday, 27 January 2012 11:09
// verify that atleast one check box checked in the grid



function CheckAtleastOneisChecked(checkBox) { var frm = document.forms[0]; var flag = false; var cnt = 0; for (var i = 0; i < document.forms[0].length; i++) { if (document.forms[0].elements[i].id.indexOf(checkBox) != -1) { if (document.forms[0].elements[i].checked) { flag = true cnt = cnt + 1; } } } if (flag == false) { alert('Atleast one check box should be checked.') return false }

}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/JxxbnShP2uw/14489

 
Javascript for verifying that atmost single record is selected in the grid
Friday, 27 January 2012 11:02
// Javascript for verifying that atmost single record is selected in the grid



function ChecksingleSelected(checkBox) {

var frm = document.forms[0];
var flag = false;
var cnt = 0;

for (var i = 0; i < document.forms[0].length; i++) {
if (document.forms[0].elements[i].id.indexOf(checkBox) != -1) {
if (document.forms[0].elements[i].checked) {
flag = true
cnt = cnt + 1;
}
}
}
if (cnt > 1) {

alert('Only record can be seleccte/checked.');
return false;
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/xXSwjmM3MZ8/14487

 
Javascript tp check/uncheck the header check box on chile check boxes check/uncheck
Friday, 27 January 2012 10:54
// Javascript tp check/uncheck the header check box on chile check boxes check/uncheck



function CheckChanged(headerCheckBox, childCheckBox) {
var frm = document.forms[0];
var allChildChecked;
allChildChecked= true;
for (i = 0; i < frm.length; i++) {
e = frm.elements[i];
if (e.type == 'checkbox' && e.name.indexOf(childCheckBox) != -1) {

if (e.checked == false) {
allChildChecked= false;
break;
}
}
}
for (i = 0; i < frm.length; i++) {
e = frm.elements[i];
if (e.type == 'checkbox' && e.name.indexOf(headerCheckBox) != -1) {
if (boolAllChecked == false)
e.checked = false;
else
e.checked = true;
break;
}
}
}

Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/SUp6-bFG4SE/14483

 


Taxonomy by Zaragoza Online