jQWidgets Forums

jQuery UI Widgets Forums Grid Replace function not working

This topic contains 1 reply, has 1 voice, and was last updated by  Akshar AK 10 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Replace function not working #56704

    Akshar AK
    Participant

    Hi,
    am using the following code for the columns display and it was working fine in version 2.7.0 but now i upgraded to version 3.3.0. Since then Replace function is not working. the purpose of replace was even though i enter ‘,’ it should replace the value to ‘.’ in the grid. so i was using a replace method to achieve it. but latest version doesnt support this? if not how to achieve this ? below is the code i have used.

    {
          		futureBudgetColumns.push(colStr);
          	 gridColumns.push({ text: colNamesArray[i], dataField:colStr , align : 'center' , cellsalign:'right', width: 60, filterable: false , cellsformat: 'F2',cellsrenderer: cellrender,rendered: function (element) {
                 $(element).parent().jqxTooltip({ position: 'mouse', content: $(element).text()+' P HC' });
             }
          	 ,aggregates : [ 'sum' ],
    			aggregatesrenderer: function (aggregates, column, element, summaryData) {     
           		 var renderstring = "<div class='jqx-widget-content jqx-widget-content-" + 'theme' + "' style='float: left; width: 100%; height: 100%;background-color:#E5E5E5'>";  
           		 $.each(aggregates, function (key, value) {                      
           			 renderstring += '<div style="position: relative; margin:3px;  text-align: right;font-family: Arial;font-size: 12px;"> ' + value + '</div>';  
           			 });        
           		 renderstring += "</div>";         
           		 return renderstring;     
           		 
           	 },cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) {//Used to convert (,) to (.)
                          <strong><strong> var result = newvalue.replace("," , ".");
                          return result; </strong></strong>
                      }
    Replace function not working #56706

    Akshar AK
    Participant

    I just removed cellsformat: ‘F2’ and its working fine now. Thanks.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.