You are viewing this site as a guest. You can still ask questions and help others! Join our Dev2Dev IT Community to receive your own blog, share your knowledge, and much more.

Want to set a field as display only (or gray) while inserting values in a grid

3 replies [Last post]
tejaspaiowns's picture
User offline. Last seen 2 years 4 weeks ago. Offline
Joined: 07/22/2011
Posts: 4

I want to set a particular field (employee id) as display only (or gray) , basically unedittable after it's selected in a Grid .. I applied the code on the Field Edit event of that field and I'm able to set the particular field (employee id) in the 1st row as display only (when I select it from the look-up list). However, as I add the next row in the grid and select the particular field (employee id) from my look-up list, it no longer becomes display only.

So, basically I am able to set the particular field (employee id) as display only only in the 1st row. I'm unable to set it as display only in the next rows I insert.

PS : I'm inserting rows in a grid (and NOT retrieving) .

Please help, it's a bit urgent.

Be Jealous!

Guest's picture
Guest (not verified)
Re: Want to set a field as display only (or gray) while ...

Is it resolved yet or are you still trying to figure out?

Rajendra Prasad's picture
User offline. Last seen 6 years 17 weeks ago. Offline
Joined: 08/08/2011
Posts: 7
Re: Want to set a field as display only (or gray) while ...

make it display only in the rowinsert event of particular field...so that when u add new rows on grid it will be display only field.....

Raj

Guest's picture
Guest (not verified)
Re: Want to set a field as display only (or gray) while ...

Use IsRecordnew keyword.
If IsRecordnew then
--dosomething-- for example graying the field
else
--dosomethingelse--
end-if;

Note:IsRecordNew is for inserting rows into the new lines.