How to disable/enable button based on a value in the grid cell ?

  1. #1

    How to disable/enable button based on a value in the grid cell ?

    I use iIn my Index.cshtml page.
    I have a grid and a button called BtnEdit in my page.
    One of the columns in the grid is called "Match".
    I would like to disable BtnEdit when "Match" = "N", and enable it when "Match" = "Y" .
    How can I do that ?
    Thank you.

    This is a snippet of my code:
                X.GridPanel().ID("GridPanel1").MarginSpec("1 1 1 1").Cls("cust-grid")
                .Listeners(ls => ls.Select.Handler = @"var store=App.Store1; var combo=App.NoItem; store.pageSize=combo.getValue(); store.reload();")
                                .Handler("var rec=App.GridPanel1.selModel.getSelection()[0]; if(rec) { App.Form1.getForm().loadRecord(rec);;} else alert('Please select row first!')")
    Last edited by faujong; May 02, 2018 at 4:14 PM.

Similar Threads

  1. Replies: 0
    Last Post: Oct 10, 2016, 6:03 PM
  2. [CLOSED] Disable cell editor based on row value
    By susanz in forum 2.x Premium Help
    Replies: 2
    Last Post: Jan 08, 2015, 4:52 PM
  3. [CLOSED] Enable/Disable cell or row of a GridPanel
    By timiteh in forum 2.x Premium Help
    Replies: 12
    Last Post: Mar 21, 2014, 3:56 PM
  4. Replies: 7
    Last Post: Jun 21, 2013, 2:44 PM
  5. Replies: 3
    Last Post: Apr 18, 2013, 2:42 PM

Tags for this Thread

Posting Permissions