Jump to content
Software FX Community

KodgireVijay

Members
  • Posts

    21
  • Joined

  • Last visited

KodgireVijay's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Thanks for the response. We implemented the OnPreRenderComplete event. With this event, on page load the grid was showing the first record as selected. But now if user sorts the data in grid or moves to next page, first record is not shown as highlighted. To show the first record as highlighted after sorting/ paging, we need to implement the OnRendering event for the Grid. If we implement the OnRendering event, first record is shown as highlighted, even after sorting/ Paging. However we face issue in this case too. If user selects any other record than the first one, grid shows two records as highlighted (the first record highlighted through the OnRendering event, second record selected by user). We are still having the issue. Please let us know if there is any way to fix this problem. Thanks
  2. <Columns> <GridFX:FieldColumn Title="Cov ID" Field="phys_cov_id" Visible="False"></GridFX:FieldColumn> <GridFX:FieldColumn Title="Start Date" Field="cov_start_date" Width="70px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> <GridFX:FieldColumn Title="End Date" Field="cov_end_date" Width="70px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> <GridFX:FieldColumn Title="Physician Status" Field="phys_status_desc" Width="70px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> <GridFX:FieldColumn Title="Specialty" Field="primary_splty_desc" Width="100px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> <GridFX:FieldColumn Title="Sponsor" Field="short_name" Width="200px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> <GridFX:FieldColumn Title="Employer" Field="employer_short_name" Width="100px" Style-CssClass="gridFx-cell" Style-Header-CssClass="gridFx-header" Style-Wrap="False" /> </Columns> <DataFields><GridFX:NumberField DataPath="phys_cov_id"></GridFX:NumberField> <GridFX:DateTimeField DataPath="cov_start_date"> <Sorting Direction="Descending" /> </GridFX:DateTimeField> <GridFX:DateTimeField DataPath="cov_end_date"></GridFX:DateTimeField> <GridFX:TextField DataPath="phys_status_desc"></GridFX:TextField> <GridFX:TextField DataPath="primary_splty_desc"></GridFX:TextField> <GridFX:TextField DataPath="short_name"></GridFX:TextField> <GridFX:TextField DataPath="employer_short_name"></GridFX:TextField> </DataFields>
  3. Thanks for the quick response. Here is the GridFX markup. < GridFX:grid id="PhysCovGrid" runat="server" CssClass="gridFx-non-modal" height="220px" width="550px" DataSourceInCode="true" OnDataSourceSelecting="PhysCovGrid_DataSourceSelecting" Motif="Elegant" Palette="Default" OnRendering="EnableDisableSelect">< Selection ChangeAction="ClientOnly" Style-CssClass="gridFx-selection"/>The EnableDisableSelect method code. protected void EnableDisableSelect(object sender, EventArgs e){int countItem = PhysCovGrid.Items.Count; if (countItem > 0) {PhysCovGrid.Items[0].Selected = true;} } }
  4. Hi, We are using the GridFX component from long time. We are facing with some tricky situation. Currently, as per the GridFX recommandations, we are binding the datasource using the OnDataSourceSelecting event. We are setting the first record as selected through the OnRendering event. For the Selection, we are using the ClientOnly as ChangeAction. Also we have enabled the Sorting/ Paging feature for the Grid. When user clicks on any record (before sorting/ paging), grid shows only that record as highlighted. When user Sorts the data on any column, first record is shown as highlighted, through the Rendering event. However the problem is if user clicks on any other row in the gird, Grid displays two record as highlighted. Earlier we were not facing this issue when we were using the other binding method/ Selection (through the Postback ChangeAction). Is there any issue with these events? If not kindly suggest the way to fix this behaviour. Thanks for the response.
  5. KodgireVijay

    Sorting

    Please ignore earlier message. Actually there are two columns in Grid: Data Type for one is DateTime & other is TextField. The First column is going to hold the value from Database which will be of Date type & second column will hold formatted value (Text Value). The Data Type for both the columns in database is DateTime. Since the second column can contain Null value, we need to convert that to blank, which will be Text data. The Date column is sorted correctly, but when user try to sort on the other column, it treats the column type as Text and sorts as per the Text values in the column. How we can handle this situation? Please share the code samples. Apart from this, User would like to see the Date column to be sorted in Descending order by defaut, when screen loads. I belive currently when Sorting is enabled, the data is sorted in Ascending order on the specified column. How to force descending sorting on page load.
  6. KodgireVijay

    Sorting

    The Data type for the column in Database is DateTime. While retrieving the data for populating the grid, we are coverting the DateTime to VarChar so as to truncate any time component. Also if the date column is null we are replacing that by blank value. The corresponding column in GridFX is of type DateTime, since the sorting will be done on Date & not on the Text type. We are able to display the Date value, formatted as Text, in the DateTimeField column of the Grid. But when we try to sort on this Date column, it treats the column type as Text as sorts as per the Text values in the column. User would like to see the data in Grid to be sorted according to the Date values & not as per Text values in the column. Please share the code samples. Thanks
  7. KodgireVijay

    Sorting

    Hi, We are using the GridFX for some time now. For one of screen on the application, we are facing sorting issue for Date column. When the data is displayed in the column, data is formatted (from Database) in Text format & displayed in Grid. The Column Type for that column is DateTimeField. Currently when user tries to sort the Date Column, data is treated as Text & is sorted accordingly, instead of Date Sorting. User would like to see the data in Grid to be sorted according to the Date datatype. Please share the code samples..
  8. Hi, I need to print the contents of a grid using PRINT button. Does GridFx provide Printing feature? If no, is there any easy way to print the contents of the grid? Thanks for your help.
  9. Yes it will be really helpful. Thanks for your reply.
  10. Hi, I already have latest service pack for GridFx. But I am still facing the same problem. Thanks.
  11. Hi, I have not received an email with the support incident details. Can you please send it to me again. Thanks.
  12. Thanks for your reply. I also have one more problem related to sorting the grid : I am able to select the first row after sorting the grid. I am doing that in the grid rendering event : public void grid_rendering(object sender, EventArgs e) { if (Grid1.SelectedItems.Count == 0) {Grid1.Items[0].Selected = true;} if (Grid1.Items[0].Selected) {btnButton.Enabled = true;} else{btnButton.Enabled = true;} } I am trying to enable disabled the buttons based on the selected row value. When the Selection ChangeAction="Postback" : When the screen loads first time, the first record gets selected by default and the btnButton also gets enabled. Then I select any other record from the grid, and the btnButton gets disabled. This is exactly what we want. But now when I sort the grid, the first row gets selected in the grid but the btnButton does not get enabled. When the Selection ChangeAction="ClientOnly" : Now I am doing the following steps : When the grid loads, assume that the fifth row contains value "A" in a column. Sort the grid Select the fifth row in the grid after sorting. (Assume the value of a column in that row contains "B") Click on a button to check the values of the selected row. The values of the selected row should the "B". But while accessing through code, it is showing "A". As a result enabling and disabling of buttons is not happening as expected (as actual values and displayed values in the row are different). Please let us know if we need to change any settings. Thanks for your help.
  13. Hi, When I make the columns invisible (ie. visible=false), I am not able to select any row in the grid. Also, I get the following error on the page : "'undefined' is null or not an object". Please let me know if I need to change any setting. Thanks for your help.
  14. 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(${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,$;$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,$;}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.
  15. Hi, now I am able to select the first row in the grid after sorting. I am doing it in the onrendering event of the grid. I am trying to enable the btnButton everytime the first record gets selected. Also, disable it when any other record (except first) is selected. public void grid_rendering(object sender, EventArgs e) { if (Grid1.SelectedItems.Count == 0) {Grid1.Items[0].Selected = true;} if (Grid1.Items[0].Selected){btnButton.Enabled = true;}else{btnButton.Enabled = true;} } When the screen loads first time, the first record gets selected by default and the btnButton also gets enabled. Then I select any other record from the grid, and the btnButton gets disabled. This is exactly what we want. But now when I sort the grid, the first row gets selected in the grid but the btnButton does not get enabled. The selection property is : < Selection ChangeAction="Postback">Please let me know if I am missing to set a property. Thanks.
×
×
  • Create New...