Sigma Php Ajax framework, Ajax Components, GUI Builder
May 17, 2012, 01:36:55 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Is it possible to make a editable cell "Read Only" after the first save?  (Read 201 times)
dannyjay
Newbie
*
Posts: 2


View Profile
« on: November 07, 2011, 10:11:10 AM »

Hello,

I am trying to create a sign up sheet using the sigma grid (which so far, seems to be exactly what I need). I want the user to be able to click on a row cell, and enter their name. This was easy enough to do(with the help of the Editable cell demo), BUT I need to have the specific cell change to non-editable (Read Only) once the users clicks on save after entering their name.

I basically want the user to have the ability to lock in an appointment with their name, once they click save. This way someone else can't come and change/delete the name that was entered once it has been saved.

I have figured out how to make an entire column read-only or editable; but I am scratching my head trying to figure out how to lock a specific cell once someone enters data and saves it.

Any assistance is greatly appreciated, and or any examples on how to accomplish this.

Thank you,
Danny
Logged
JLG
Jr. Member
**
Posts: 6


View Profile
« Reply #1 on: November 17, 2011, 06:00:58 PM »

Couldn't you define a hidden column such as "dontPermitNameEdits" that gets a value set upon load of the grid?

You could then use the beforeEdit() event of the grid to check whether the hidden dontPermitNameEdits column has a value defined. if it does, your beforeEdit() would return false to prevent editing.

In this way, records loaded to the grid (after having been saved) would not be editable while records recently added to the grid (but not yet saved) would be editable.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!