function myFunction(args)
{
return /\b\d{4}\.\d{2}\.\d{4}\b/.test(args['value']);
}
function load(args) {
this.columns[0].validationRules = { required: true, length: [customFn, 'should be 12 number only'], format: [myFunction, 'follow the format ####.##.####'] };
}
|
hi syncfusion team ,
how about regex ? how to use it in for a cloumn
requirement is expect < and > symbol all other symbols are allowed
Hi Gowtham,
You can format the string as you want and display the value in the Grid column by using valueAccessor feature of Grid. The valueAccessor is used to access/manipulate the value of display data. You can achieve custom value formatting by using the valueAccessor. We have already discussed about your requirement in our documentation which can be accessed from the below link,
Documentation: https://ej2.syncfusion.com/aspnetcore/documentation/grid/columns/columns#valueaccessor
Note: The Value Accessor feature is used only for modifying the display data in UI level and it does not affect the grid’s data source. The Grid actions was performed based on the grid datasource.
Regards,
Rajapandi R