Force users to select a row in GridPanel

  1. #1

    Force users to select a row in GridPanel



    Hi,
    I would like to force users to select a row before clicking on update/delete/edit toolbar button.
    If they haven't select a row, I'd like to throw a message on the screen.
    How can I achieve this?

    Thanks,
    Kamal
  2. #2

    RE: Force users to select a row in GridPanel

    Hi,

    Just check selection in Before handler of ajax event. If selection is empty then show message and return false from Before handler

    1. Check selection
    grid.getSelectionModel().hasSelection()
    2. Show message
    Ext.Msg.alert('title','message');
  3. #3

    RE: Force users to select a row in GridPanel

    Hi,
    Thanks for your prompt reply.

    I open my grid inside a panel when I click on toolbarbutton menu. Can I still call your solution from toolbarbutton?

    Thanks,
    Kamal

Similar Threads

  1. [CLOSED] GridPanel. Force renderer function of column
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 25, 2012, 5:45 PM
  2. Replies: 1
    Last Post: Jan 24, 2012, 1:40 PM
  3. Gridpanel - Force Save - then Ajax/Direct event?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Nov 24, 2010, 11:04 AM
  4. GridPanel - Force Editor to display
    By Tbaseflug in forum 1.x Help
    Replies: 0
    Last Post: May 10, 2009, 8:21 PM
  5. [CLOSED] Current Users Online
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 19, 2008, 5:14 AM

Posting Permissions