In this scenario, i have many rows in the grid and data source for the gird is regular table. I want to disable few rows from the grid based on some value.
Is there any solution?
*This post is locked for comments
In this scenario, i have many rows in the grid and data source for the gird is regular table. I want to disable few rows from the grid based on some value.
Is there any solution?
*This post is locked for comments
Please don't forget to close the thread by marking the verified answer(s).
I got it thanks a lot.
It's set for the active line. So when you switch to another line, active() method is called again, your logic gets re-evaluated and you set the new active line as writable or read-only.
By the way, if you want to disable all fields, don't bother setting them up individually. Call allowEdit() method of the whole datasource.
You'll find plenty of examples in standard forms.
I tried this but it makes complete column read-only.
ABC_ds.object(fieldNum(Table, field)).allowEdit(fales);
What i want to do is make some the rows read-only, e.g. if i have 5 rows in the grid, i want to make 2 of 5 rows ready only.
Override active() method of your form datasource. There evaluate your logic and set AllowEdit property of the datasource to true or false (by calling its aloowEdit() method).
Making them read-only.
What do you mean by "to disable rows"? Hiding them? Making them read-only?
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,409
Most Valuable Professional
nmaenpaa
101,156