I am able to set minDecimals editor option on numeric type column in editorOptions. This value when set, is applicable to all cells in that column. However, for me, this value can be different for different cells in same column.
editorOptions : {
minDecimals : 4
}
Is there any way to set different minDecimals value for different cells?
editorOptions: {
minDecimals: 4,
Hello Kaustubh,
After investigating different minDecimals value for different cells and doing some research, different minDecimals value for different cells has been determined to be a new product idea. When we set min decimal option in the grid it is applicable to all cells in that column.
You can suggest new product ideas for future versions (or vote for existing ones) at
http://ideas.infragistics.com.
Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
Hi Divya,
Thanks for response. I have another question related to this. How can I set minDecimals using any jquery method?
In my use case, I get this value after initializing grid. Is there any way?
To get the cell value after grid initialize you should use editCellEnding event . editCellEnding event is raised before end cell editing.Use ui.columnKey property to get key of column.use getCellValue property get a cell value for the specified cell. It also creates a transaction and updates the UI.
Your code would like as below:
$("#grid").bind("iggridupdatingeditcellending", function (event, ui) {
if (ui.columnKey == "columnKeyName") {
var cellValue = $("#grid").igGrid("getCellValue", ui.rowID, "ColumnName");
});
For more informant you should refer the following API link:
http://www.igniteui.com/help/api/2015.2/ui.iggridupdating#events:editCellEnding
http://www.igniteui.com/help/api/2015.2/ui.iggrid#methods:getCellValue
Please let me know if I may assist you further.
You misunderstood my question. I will reframe it.
I want to set value for minDecimals property after grid initialization. I do not want value in a cell. How to set minDecimals using some jquery method?
In the jQuery to set or get minDecimals property after grid initialization you can use following syntax:
//Initialize
$(".selector").igNumericEditor({
maxDecimals: 10,
//Get
var maxDecimals = $(".selector").igNumericEditor("option", "maxDecimals");
//Set
$(".selector").igNumericEditor("option", "maxDecimals", 5);
You can refer the following AP document for more information:
http://www.igniteui.com/help/api/2016.1/ui.ignumericeditor#options:minDecimals
Please let me know if I may be further assistace.
Sincerely, Divya Jain Associate Software Developer