- Thu Feb 23, 2017 8:03 am
#789346
How i hide grid value?
I have a grid. i want to hide this grid.
i tried this code but don't work.
$(document).ready ( function()
{
var gridLength = $("#gridVar001").getNumberRows();
var uid = $("#currentUser").getText();
var matchfound = false;
var gridval = $("#gridVar001").getValue();
//form[gridVar001][2][cxodd01]
$("#gridVar001").find("select").each ( function()
{
if($(this).attr('id').indexOf('cxodd') > 0)
{
alert("$(this).val() = " + $(this).val() + "; uid=" + uid);
if ($(this).val() == uid)
{
$(this).parent().parent().parent().parent().parent().show();
}
else if ($(this).val() != uid)
{
//alert('hiding');
$(this).parent().parent().parent().parent().parent().hide();
}
}
else
{
//alert("ddid="+$(this).attr('id'));
}
}
)
//}
//)
//( function() {
$("#checkJanuary").css("display", "none");
$("#CheckFebruary").css("display", "none");
if(($("#checkJanuary").getValue()==1) || ($("#checkJanuary").getValue()=='["1"]') || ($("#checkJanuary").getValue()=="1"))
{
$("gridVar002").hide();
//$("#cxodd02").hide();
//$("#datetime0000000001").hide();
//$("#dropdown0000000002").hide();
//$("#textarea0000000001").hide();
//$("#commentCOFebruary").hide();
}
else if(($("#CheckFebruary").getValue()==1) || ($("#CheckFebruary").getValue()=='["1"]') || ($("#CheckFebruary").getValue()=="1"))
{
$("#gridVar001").hide();
//$("#cxodd01").hide();
//$("#datetime0000000001").hide();
//$("#dropdown0000000002").hide();
//$("#textarea0000000001").hide();
//$("#commentCCOJanuary").hide();
}
}
)
;
how can i solve this?
I have a grid. i want to hide this grid.
i tried this code but don't work.
$(document).ready ( function()
{
var gridLength = $("#gridVar001").getNumberRows();
var uid = $("#currentUser").getText();
var matchfound = false;
var gridval = $("#gridVar001").getValue();
//form[gridVar001][2][cxodd01]
$("#gridVar001").find("select").each ( function()
{
if($(this).attr('id').indexOf('cxodd') > 0)
{
alert("$(this).val() = " + $(this).val() + "; uid=" + uid);
if ($(this).val() == uid)
{
$(this).parent().parent().parent().parent().parent().show();
}
else if ($(this).val() != uid)
{
//alert('hiding');
$(this).parent().parent().parent().parent().parent().hide();
}
}
else
{
//alert("ddid="+$(this).attr('id'));
}
}
)
//}
//)
//( function() {
$("#checkJanuary").css("display", "none");
$("#CheckFebruary").css("display", "none");
if(($("#checkJanuary").getValue()==1) || ($("#checkJanuary").getValue()=='["1"]') || ($("#checkJanuary").getValue()=="1"))
{
$("gridVar002").hide();
//$("#cxodd02").hide();
//$("#datetime0000000001").hide();
//$("#dropdown0000000002").hide();
//$("#textarea0000000001").hide();
//$("#commentCOFebruary").hide();
}
else if(($("#CheckFebruary").getValue()==1) || ($("#CheckFebruary").getValue()=='["1"]') || ($("#CheckFebruary").getValue()=="1"))
{
$("#gridVar001").hide();
//$("#cxodd01").hide();
//$("#datetime0000000001").hide();
//$("#dropdown0000000002").hide();
//$("#textarea0000000001").hide();
//$("#commentCCOJanuary").hide();
}
}
)
;
how can i solve this?