Hello,
is there a chance to apply a template (or at least a placeholder) to a column/cell during "inline" editing?
select2 has this feature. http://ivaynberg.github.io/select2/#templating
Hello max ,
Thank you for posting in our forum.
In order to achieve this you would need to add a mask editor for the specific column and set for the inputMask of the editor the format you would like the data to be inputted in.
For example:
columnSettings: [
{
columnKey: "Title",
editorType: "mask",
editorOptions: {
type:"mask",
inputMask : "CCCCCC h\\a"
}
}]
I’ve attached an example for your reference where for the “Title” column an input mask is set. In the upper example 6 literal flags are set that will allow you to input any keyboard character and the entry of them optional. Also at the end some literal characters are added (“ha”). That part of the input field cannot be modified and will always appear for the cells to which this editor is applied.
For details on what type of filter flags you can set in the mask you can check the following link from our API documentation:
http://help.infragistics.com/jQuery/2014.1/ui.igmaskeditor#options:inputMask
Let me know if you have any questions or concerns regarding this.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
hi,
thanks for your answer, I overlooked that.
is it possible to define an inputMask, which takes any number/decimal (with or without decimal separator, any number of digits) ? aligning it right for number input would also be nice.
is this compatible with templates? template: "${Title} ha" and your mask results in "12345 ha ha" instead of "12344 ha".
kind regards.
Unfortunately the input mask does not have an optional that would allow you to set an indefinite number of digits followed by your custom text.
For details on what the different input mask options are you can refer to the following article:
http://es.infragistics.com/community/blogs/taz_abdeali/archive/2011/05/18/understanding-mask-options-in-jquery-mask-editor.aspx
Also by default, since the mask editor is editing the value of the cell, if you modify the value for example “12342 ha” and exit edit mode that will be the new value of the cell.
When the template is applied for the column, since the new value for the cell (${Title}) is now “12342 ha” the result displayed in the cell will be “12342 ha ha” – the new value and the additional text from the template.
Due to this, to have the editor work as expected in this scenario you would need to manually handle the setting of the value, so that only the numeric part of the value gets set (without the additional text).
For example on editCellEnding you can get the value and remove the additional custom text from the mask in order to ensure that only the numeric part will be set as value.
editCellEnding: function(evt, ui){
if(ui.columnKey=="Number")
var value= ui.value;
ui.value=value.replace("ha","");
},
I’ve attached a sample for your reference. Let me know if you have any questions.
Hello Max,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Developer Support Engineer
http://www.infragistics.com/support
hello,
thanks for your answer. it would be a nice feature, if column templates work in editors too.
Hello maxschaf ,
If you’d like to see this feature implemented in future please log it as a new product idea. You can suggest new product ideas for future versions (or vote for existing ones) at <http://ideas.infragistics.com>.
Steps to create your idea:
1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible. Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. 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. Be convincing!
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the product idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas 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.