Data method acting like datasource field

Would it be possible to make a code change to allow old version of Axapta making data method acting on a grid like datasource field:[Modifiable,sorting,filtering]. Or this part of code is restricted from developers to change it?

You can overwrite control’s sort() method and implement some sorting there, but it still needs to be based on some database fields - you obviously can’t write a DB query that would use results of your X++ method. I don’t think there is such a straightforward workaround for filtering - maybe you could set the value to a field with SaveContents = No and overwrite control’s filter(), but then it’s probably better to save the calculated value to database.

About modifications, you can use edit methods.

Nevertheless if you need something that works exactly as a field, use a field.

The edit method should be use like the display method?

Could you give me a quick sample?

This link should help. [:)]