ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: cijojohn on March 30, 2017, 01:55:30 am

Title: Float datatype with limit on decimal places
Post by: cijojohn on March 30, 2017, 01:55:30 am
Hi Team,

I am currently facing below issue with PQ grid. How do i set the copy of cell values on change of some other cell value due to copy paste operation. PFA screenshot.
Let us know if you have any sample code or jsfiddle.

Regards,
Title: Re: Float datatype with limit on decimal places
Post by: paramvir on March 30, 2017, 07:25:19 pm
Please check this sample code: http://jsfiddle.net/eq4qge3b/

1. For different formatting in different rows of same column, column.render is used.

2. change event is used to detect changes in certain cells, and updateRow() is used to update value of any cells.
Title: Re: Float datatype with limit on decimal places
Post by: cijojohn on April 14, 2017, 12:27:57 am
Hi Team,

Formatting is working fine for the rows having float as dataType. But we are having diff types for each column in each row..In this case user is able to type the alphabets also. Is there way to avoid it like the case when dataType is float.
Title: Re: Float datatype with limit on decimal places
Post by: paramvir on April 14, 2017, 10:22:00 am
you can switch column.dataType in runtime for different cells/ rows to prevent alphabets in certain cells.

Use editorBegin event.

editorBegin: function(evt, ui){
   if(ui.rowData.rank < 10)            
      ui.column.dataType='float';
   else
      ui.column.dataType='string';               
},