[CLOSED] GridPanel enable or disable at page load

  1. #1

    [CLOSED] GridPanel enable or disable at page load

    I have a gridpanel with a column whose values are true and false.

    I want to enable or disable grid records on the basis of true and false values respectively at the time of page load.

    Please guide me how can I do that?

    Thanks
    Last edited by Daniil; Dec 17, 2014 at 12:22 PM. Reason: [CLOSED]
  2. #2
    Hi @sharmav1,

    Please clarify what exactly you mean under "disable a record".
  3. #3
    Hi @Daniil,

    sorry for creating confusion.

    Let's say I have five columns in a gridpanel: col1, col2, col3, col4, col5

    now, col4 is having values of true and false based on which all other columns should be disabled or enabled for editing.

    again, let's say, I have 10 rows of data, out of which, 2nd, 3rd and 6th rows of col4 are false then 2nd, 3rd, and 6th rows should appear as disabled(means non editable) when the page loads and rest of the rows(1st, 4th, 5th, 7th, 8th, 9th and 10th) should be enabled for editing.

    I hope I am clear this time, if not then please tell me and I will provide a test case.
  4. #4
    To prevent editing of a specific row, you should return false from an editing plugin's BeforeEdit handler.

    Example
    <ext:CellEditing runat="server">
        <Listeners>
            <BeforeEdit Handler="return e.record.get('editable');" />
        </Listeners>
    </ext:CellEditing>
    Where "editable" is a boolean ModelField.
  5. #5
    Hi @Daniil,

    It works, thanks very much.

    Just one more thing, I am looking for help on the below thread from long time, but no one has replied till date. If you or any one from the support team could help me on it then I would be highly grateful to you guys.
    http://forums.ext.net/showthread.php...921#post217921

    thanks

Similar Threads

  1. [CLOSED] Enable/Disable cell or row of a GridPanel
    By timiteh in forum 2.x Legacy Premium Help
    Replies: 12
    Last Post: Mar 21, 2014, 2:56 PM
  2. [CLOSED] Enable Buttons on Page Load
    By blueworld in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 26, 2014, 2:37 PM
  3. disable gridpanel grouping on page load...
    By drakaan in forum 1.x Help
    Replies: 0
    Last Post: Jul 09, 2010, 5:51 PM
  4. disable gridpanel grouping on page load
    By drakaan in forum 1.x Help
    Replies: 0
    Last Post: Jun 03, 2010, 11:40 PM
  5. How enable/disable buttons in CommandColumn og gridpanel
    By Satyanarayana murthy in forum 1.x Help
    Replies: 1
    Last Post: Feb 06, 2010, 10:00 AM

Tags for this Thread

Posting Permissions