Hi,
I have comma seperated values in iggrid cell,and need to show the values
one after the other in new line.is there any feature in iggrid to do?
Regards
Raghu
Hi , How to implement masking in Ignite UI Ig grid cell value, please provide a example.
Hello Raghu,
Please feel free to contact me if you have any additional questions regarding this matter.
Thank you for posting in our community.
What I can suggest for achieving your requirement is using formatter for the column that you would like to style. Formatter is a reference to a function which will be used for formatting cell values. The function should accept a value and return new formatted value. In you scenario you could get reference to the string value of the cell, replace all the commas with new lines and return the newly formatted string. For example:
$("#grid").igGrid({ dataSource: data, columns: [ { headerText: "ID", key: "ID", dataType: "number" }, { headerText: "Name", key: "Name", dataType: "string" }, { headerText: "Values", key: "Values", dataType: "string", formatter: function (val) { var newVal = val.replace(/ *, */g, '<br>'); return newVal; } } ] }); });
$("#grid").igGrid({ dataSource: data, columns: [ { headerText: "ID", key: "ID", dataType: "number" }, { headerText: "Name", key: "Name", dataType: "string" }, { headerText: "Values", key: "Values", dataType: "string", formatter: function (val) {
var newVal = val.replace(/ *, */g, '<br>'); return newVal; } } ] }); });
I am also attaching a small sample illustrating my suggestion for your reference.
Please have a look at this sample and let me know if you need any further assistance.