here I am trying to hide the column in the datagrid, the column is:
<asp:BoundField HeaderText="Transaction Category ID" DataField="TransactionCategoryID"
ItemStyle-CssClass="gridview_item_center" visible="false"/>
but the problem is, when I try to get the data (in javascript function below), while the datagrid column is hidden it acts like it doesn't exist, so the value returned is wrong, is there any alternate solution to just simply hide the column but the value is still acceptable?
the javascript (should it needed):
function ShowAddDialog(lnkTransactionID) {
if (lnkTransactionID != null) {
//alert("ID:" + $(lnkTransactionID)[0].innerHTML);
var td = lnkTransactionID.parentElement;
var transactionCategory = $(td.nextSibling)[0].innerHTML;
var transactionDesc = $(td.nextSibling.nextSibling.nextSibling)[0].innerHTML;
$("[id$='lblTransactionID']").text($(lnkTransactionID)[0].innerHTML);
$("[id$='hfTransactionID']").val($(lnkTransactionID)[0].innerHTML);
$("[id$='ddlTransactionCategoryInput']").val(transactionCategory);
$("[id$='txtTransactionDescInput']").val(transactionDesc);
}
$("#divDialog").dialog("open");
}