jQWidgets Forums

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts

  • dmesabar
    Participant

    Hi Hristo,
    I think that now works perfectly.
    I did two modifications.
    On handleKeys function and initeditor function, I added the condition else because when you edit the cell and you go to another and press enter key, the value will be the last key or last value of the last cell edited.

    Thanks.


    dmesabar
    Participant

    Hi Hristo,
    You can see the image to reproduce the problem.
    On this case, I need press two times the number on keyboard to edit the cell.

    However, on cell of Unit Price works perfectly because don’t have createeditor

    Thanks.


    dmesabar
    Participant

    Hi Hristo,
    The problem persist in your example.
    If you start to write on cell of quantity, before the jqxinput was visible, the first number that you write are not put into the jqxinput. Only will start to write when you type two times the number.
    I know that i can use decimals with the property decimalDigits.
    If I use for example 2 decimals on jqxinput, when is execute cellvaluechanged or cellendedit, independently of if I change or not the original value, the value that will put, only will be with two decimals.
    I edited your exemple. On cell of total, if you enter with enter key and finish one more time with enter, you will edit the cell, but really you didn’t edit the number, only you executed to see the jqxinput
    Thanks.


    dmesabar
    Participant

    Hi Hristo,
    You can see the example
    When i have columntype: "numberinput" and I opend the cell to edit, the number is not the same.
    I will have this types of number with 10 decimals to edit.
    I cant use cellsformat: "D2" because i will lost all number and when is execute cellvaluechanged or cellendedit, the value will have only 2 decimals.
    Thanks

    in reply to: jqxgrid cell width jqxgrid cell width #112123

    dmesabar
    Participant

    Hi Hristo,
    Is it possible define min-width of column on jqxgrid?

    Can i reset the width for the first width (default or first time that was defined)?
    For example:
    My jqxgrid have about 20 columns and a few cells are editable and some cells are little.
    So, I did:
    1) Save the width of cell with getcolumnproperty when it was runcellbeginedit
    2) Set the width of cell with setcolumnproperty with a fixed width
    3) Set the width of cell with setcolumnproperty with a width saved on 1)
    Sometime this dont work perfectly and not execute the 3) step and the width was set forever …
    Can I reset the all widths of jqxgrid or do this more simplified?

    in reply to: jqxinput validation jqxinput validation #112117

    dmesabar
    Participant

    Hi Peter,
    I don’t tried the validator and form widget because my input are into the jqxgrid to edit any cell with values.
    I would like have something like this on the editor of jqxgrid

    rule: function (value) { // rule or validate or validation function into jqxinput
    	var d1 = 10; // can be any value. Its varible by row
    	var d2 = 5; // can be any value. Its varible by row
       
    	var disc = 0;
    	if(d1 > 0 && d2 >0){
    		var tmp = (value) * (d1 / 100);
    		disc = tmp + (((value) - tmp) * (d2 / 100));
    	}else if(d1 > 0){
    		disc = value * (d1 / 100);
    	}else if(d2 > 0){
    		disc = value * (d2 / 100);
    	}
    	
    	var unit_price = (value) - (desc_total);
    	if (last_cost > unit_price){ // last_cost is another value of row and its variable
    		return false; // cant edit the value of jqxinput and cant execute cellendedit
    	}else{
    		return true;
    	}
    }

    Thanks


    dmesabar
    Participant

    Hi Hristo,
    I know that I can use the setcellvalue on the cells that I need.
    I simplified the exemple to see that the margin-top is not calculate when the cell have the function cellsrenderer
    In my grid I will have more cellsrenderer, for example, to put buttons and/or icons and depends of more options to show this buttons.
    Thanks for create a work.
    I will wait for news.


    dmesabar
    Participant

    Hi Hristo,
    I think that use beforeLoadComplete isn’t solution for this purpose.
    My jqxGrid have the cells quantity and price editables. When one of cell is edit, automaticly will be calculate the total.
    For this reason, I think that the best solution is use cellsrenderer.
    Thanks.


    dmesabar
    Participant

    Hi Hristo,
    My grid have a few cell with calculations.
    I will have the columns, among others, Quantity, Price, Total…
    Total = Quantity * Price
    Some cells, I need to calculate the value and only I can set the value with cellsrenderer
    Thanks.


    dmesabar
    Participant

    Hi Hristo,

    You can see the example
    I add on quantity cell the function cellsrenderer
    On grid result, you can see how the values not change the margin-top to stay center.

    Thanks.

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