Jump to content
Software FX Community

Hiding Columns in Grid.


KodgireVijay

Recommended Posts

Hi,

We are trying to hide columns (of type NumberField and TextField). The columns can also contain null. But there is a problem while rendering the grid. We are getting "'undefined' is null or not an object" error message.

 

Also we have three grids on the screen. We get this error only when we are trying to load the page and there is no data in the grid.

 

the error "'undefined' is null or not an object" is coming on the page "GridFxResource.axd". Following is the code where it shows error :

 

GridFX.$28.prototype={$0:null,$1:null,$2:null,$3:0,$4:null,$5:0,$7:null,$9:function(){var $0=this.$1.get_$E();var $1;var $2;var $3=$0.style.width;if(GridFX.$71.$1($3)){$1=GridFX.$76.get_$0();$2=1;}else{$1=GridFX.$76.$4($3);if(GridFX.$76.$1($1.$1)){$2=2;}else{$2=3;}}this.$2=$1;this.$3=$2;var $4;var $5;var $6=$0.style.height;if(GridFX.$71.$1($6)){$4=GridFX.$76.get_$0();$5=1;}else{$4=GridFX.$76.$4($6);if(GridFX.$76.$1($4.$1)){$5=2;}else{$5=3;}}this.$4=$4;this.$5=$5;this.$E=-1;this.$D=-1;this.$12(false,true);},$A:function(){if(this.$7){this.$7.$10();this.$7=null;}},$B:function($p0){var $0=$p0.length;for(var $1=0;$1<$0;$1++){var $2=$p0[$1];var $3=$2.getAttribute(GridFX.$28.$6);if(!GridFX.$71.$1($3)){if(GridFX.$76.$1(GridFX.$76.$4($3).$1)){return true;}}}return false;},$C:function(){var $0=false;var $1=this.$1;var $2=$1.get_$E().offsetWidth;var $3=this.$E;if($3!==$2){if($3>=0){$0=true;}this.$E=$2;}var $4=$1.get_$7().offsetWidth;$3=this.$D;if(this.$D!==$4){if($3>=0){$0=true;}this.$D=$4;}if(!$0){var $5=$1.get_$C().offsetWidth;if($5>$2){$0=true;}}if($0){this.$12(true,false);}},$F:function(){var $0=this.$1.get_$7();if(this.$5===1){var $1=$0.offsetHeight;var $2=this.$1.get_$5().offsetHeight;return($1>$2)?$1:$2;}else{var $3=this.$1.get_$E().offsetHeight;var $4=this.$1.get_$3();var $5=$4.offsetHeight-$4.clientHeight;if($5>0){$3-=$5;}var $6=$0.parentNode;var $7=$6.rowIndex;var $8=this.$1.get_$3().rows;var $9=$8.length;for(var $A=0;$A<$9;$A++){if($A!==$7){$3-=$8[$A].offsetHeight;}}if($3<0){$3=0;}return $3;}},$10:function(){var $0=this.$1.get_$7();if(this.$3===1){var $1=$0.offsetWidth;var $2=this.$1.get_$5().offsetWidth;return($1>$2)?$1:$2;}else{var $3=this.$1.get_$3();var $4=this.$1.get_$E().offsetWidth;var $5=$3.offsetWidth-$3.clientWidth;if($5>0){$4-=$5;}var $6=GridFX.$8.$4D(this.$1.get_$3());var $7=parseInt($0.getAttribute('col'));var $8=$6.length;for(var $9=0;$9<$8;$9++){if($9!==$7){$4-=$6[$9].offsetWidth;}}if($4<0){return 0;}else{return $4;}}},$11:function($p0){this.$12($p0,true);},$12:function($p0,$p1){var $0=this.$0;var $1=this.$5;var $2=this.$1.get_$5();var $3=GridFX.$8.$4D($2);var $4=$2.parentNode;var $5=$4.parentNode;var $6=GridFX.$28.$13($2);var $7=this.$B($3);var $8=this.$3===1;var $9=!$7&&$8;var $A=$1===1;var $B=(!this.$1.get_$9())?false:true;if($B){this.$18();}if($6&&$p0){$6=false;this.$1D($2,$3);}else if(!$6&&!$9){GridFX.$73.$17($2);}if(!GridFX.$71.$1($5.style.height)){if($A){$5.style.height='';}else{$5.style.height='99%';}}if($7&&!$6){this.$1C(true,$B);$6=true;}var $C=false;var $D;var $E=$2.offsetWidth;if($8){GridFX.$73.$17($4);$D=-1;}else{$4.style.width='1px';$D=this.$10();$4.style.overflowX='hidden';$4.style.width=$D.toString()+'px';if($E>$D){$C=true;var $12=$4.style.width;if(!$6){$4.style.width=this.$1.get_$E().parentNode.offsetWidth.toString()+'px';$E=$2.offsetWidth;$4.style.width=$12;}}}var $F;var $10;if($A){$10=-1;$F=false;}else{$10=this.$F();var $13=$2.offsetHeight;$F=$13>$10;if($F&&!$C){if(!$8&&$E>($D-GridFX.$28.get_$1F().width)){$C=true;}}else if($C&&!$F){if($13>($10-GridFX.$28.get_$1F().height)){$F=true;}}}if(!$9){if($C){$4.style.overflowX='scroll';if(!$6){$2.style.width=$E.toString()+'px';}}else{if(!GridFX.$71.$1($4.style.overflowX)){$4.style.overflowX='';}if($6){if($E<$D){var $14=GridFX.$8.$4D($2);var $15=$14.length;for(var $16=$15-1;$16>=0;$16--){var $17=$14[$16];var $18=$17.getAttribute(GridFX.$28.$6);if(GridFX.$71.$1($18)){var $19=$D-$E;var $1A=$17.style.width;if(GridFX.$71.$1($1A)){this.$12(true,true);return;}var $1B=parseInt($1A);$17.style.width=($1B+$19).toString()+'px';break;}}}}else{$2.style.width='100%';}}}if(!$A){var $1C;var $1D=$5.offsetHeight;if($1D!==$10){$5.style.height=$10.toString()+'px';}$1C=$F&&$0.get_headerRows()>0&&$0.get_enableHeaderFreezing();if($1C){if(!$6){this.$1C(false,$B);}this.$17($2,$C);}else{$4.style.height=$10.toString()+'px';if($F){$4.style.overflowY='scroll';}else{if($4.style.overflowY==='scroll'){$4.style.overflowY='';}}}}this.$19();if($p1){this.$E=this.$1.get_$E().offsetWidth;this.$D=$D;}$2.style.zIndex++;var $11=!$9;if($11){if(!this.$7){this.$7=GridFX.$36.$B(Function.createDelegate(this,this.$C),GridFX.$28.$8,-1);}}else{var $1E=this.$7;if($1E){$1E.$10();this.$7=null;}}},$14:function(){var $0=this.$1.get_$5();if(!GridFX.$28.$13($0)){this.$1C(false,false);}},$15:function(){var $0=this.$7;if($0&&$0.get_$A()){$0.$F();}},$16:function(){var $0=this.$7;if($0&&!$0.get_$A()){$0.$C();}},$17:function($p0,$p1){var $0=$p0.parentNode;var $1=$0.parentNode;var $2=$1.offsetWidth;var $3=$1.offsetHeight;var $4=this.$0;var $5=null;$5=$p0.cloneNode(false);this.$1.set_$9($5);var $6=GridFX.$8.$4C($p0);var $7=$6.cloneNode(true);$5.appendChild($7);var $8=GridFX.$60.$0();$8.style.display='none';$8.style.overflow='hidden';if($p1){var $12=document.createElement('COL');$12.style.width='30px';$7.appendChild($12);$8.style.width=$2.toString()+'px';}$8.style.whiteSpace='nowrap';$8.appendChild($5);$1.insertBefore($8,$0);var $9=$4.get_$1_3();var $A=$9.get_$3();var $B=$4.get_headerRows();for(var $13=0;$13<$B;$13++){var $14=$5.insertRow(-1);for(var $15=0;$15<$A;$15++){var $16=$9.$8($15,$13);if(!$16.get_$8()||$16.$D($15,$13)){var $17=$16.get_element();var $18=$17.cloneNode(true);$16.set_element($18);$14.appendChild($18);}}if($p1&&!$13){var $19=document.createElement('TD');if($B>1){$19.rowSpan=$B;}var $1A=$9.$8($A-1,0);$19.className=$1A.get_element().className;$14.appendChild($19);}$p0.deleteRow(0);}$8.style.display='';var $C=$9.$8($A-1,0).get_element();var $D=GridFX.FA.$23($C);$1.style.backgroundColor=$D.backgroundColor;$1.style.backgroundImage=$D.backgroundImage;var $E=GridFX.FA.$13($6);var $F=GridFX.FA.$13($7);var $10=$E.length;if(Sys.Browser.agent===Sys.Browser.InternetExplorer){for(var $1B=0;$1B<$10;$1B++){var $1C=$F[$1B];var $1D=$E[$1B];var $1E=$1C.offsetWidth;var $1F=$1D.offsetWidth;var $20=parseInt($1D.style.width);if($1E>$1F){var $21=$1E-$1F;var $22=$20+$21;if($22<0){$22=0;}$1D.style.width=$22.toString()+'px';}else if($1E<$1F){var $23=$1F-$1E;var $24=$20-$23;if($24<0){$24=0;}$1D.style.width=$24.toString()+'px';}}}var $11=$5.offsetHeight;$0.style.height=($3-$11).toString()+'px';$0.style.overflowY='scroll';if($p1){$addHandler($0,'scroll',this.get_$1A());}},$18:function(){var $0=this.$1.get_$5();var $1=this.$1.get_$9();for(var $3=0;$3<$1.rows.length;$3++){var $4=$1.rows[$3];var $5=$0.insertRow($3);var $6=$4.cells;var $7=$6.length;if(!$3){$7--;}for(var $8=0;$8<$7;$8++){var $9=$6[0];$5.appendChild($9);}}var $2=$1.parentNode;$2.parentNode.removeChild($2);this.$1.set_$9(null);},$19:function(){var $0=this.$0;var $1=$0.get_headerRows();if(!$1){return;}var $2=$0.get_$1_3();var $3=$2.get_$3();for(var $4=0;$4<$1;$4++){for(var $5=0;$5<$3;$5++){var $6=$2.$8($5,$4);if(!$6.get_$8()||$6.$D($5,$4)){var $7=$6.get_element();var $8=GridFX.FA.$13($7);if($8.length===1){var $9=$8[0];if(GridFX.$60.$10($9)&&GridFX.$60.$3($9,'h')){var $A=GridFX.FA.$12((($9).rows[0]).cells[0]);$A.title='';if(!GridFX.$71.$1($A.style.width)){$A.style.width='';}if($9.offsetWidth>$7.clientWidth){var $B=$9.offsetWidth-$7.clientWidth+6;var $C=$A.parentNode.clientWidth-$B;if($C<0){$C=0;}$A.style.width=$C.toString()+'px';var $D=GridFX.FA.$18($A);$A.title=$D;}}}}}}},get_$1A:function(){if(!this.$1B){this.$1B=Function.createDelegate(this,function($p1_0){if(GridFX.$8.get_$13()){$p1_0.preventDefault();$p1_0.stopPropagation();return;}var $0=this.$1.get_$5().parentNode;var $1=this.$1.get_$9().parentNode;if($1.scrollLeft!==$0.scrollLeft){$1.scrollLeft=$0.scrollLeft;}});}return this.$1B;},$1B:null,$1C:function($p0,$p1){var $0=this.$1.get_$5();var $1=GridFX.$8.$4D($0);var $2=this.$1E($p1);var $3=$2.length;for(var $4=0;$4<$3;$4++){var $5=$1[$4];if($p0){var $6=$5.getAttribute(GridFX.$28.$6);if(!GridFX.$71.$1($6)){if(GridFX.$76.$1(GridFX.$76.$4($6).$1)){$5.style.width=$6;continue;}}}$5.style.width=$2[$4].toString()+'px';}$0.style.tableLayout='fixed';$0.style.width='1px';},$1D:function($p0,$p1){$p0.style.tableLayout='';$p0.style.width='';var $0=$p1.length;for(var $1=0;$1<$0;$1++){var $2=$p1[$1];var $3=$2.getAttribute(GridFX.$28.$6);if(!$3){$2.style.width='';}else{$2.style.width=$3;}}},$1E:function($p0){var $0=this.$0;var $1=this.$1.get_$5();var $2=GridFX.$8.$4D($1);var $3=$2.length;var $4;if($p0){$4=Function.createDelegate(this,function($p1_0){return $p1_0.get_$6()===1&&$p1_0.get_$2()===4;});}else{$4=Function.createDelegate(this,function($p1_0){return $p1_0.get_$6()===1;});}var $5=GridFX.$70.$A($0.get_$1_3(),$4);var $6=[];for(var $7=0;$7<$3;$7++){var $8=$5[$7];if(!$8){$6[$7]=0;}else{var $9=GridFX.FA.$9($8.get_element());if($9<0){$9=0;}$6[$7]=$9;}}return $6;}}<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

It gets the value of $6 as null. Also, the value of $5 = 1 and $4=0.

 

Initially we had kept fixed height and width of the grid. Now we have removed that too. But still we are facing the same problem. Please let us know if we need to change any setting.

 

Thanks for your help.

  

 

Link to comment
Share on other sites

Have you updated to the latest service pack?  In the latest update we did lots of empty data fixes, which is what this looks like.  You can update through "Check for Updates" in the grid's smart tag wizard in visual studio or at http://support.softwarefx.com/ShowInteractive.aspx?Product=GridFX10&option=0.  Let me know if you still experience the problem with the latest version.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...