This is a migrated thread and some comments may be shown as answers.

[Solved] Edit vs Select Commands

2 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Samuel
Top achievements
Rank 1
Samuel asked on 06 Aug 2010, 12:22 AM
Greetings,

I have two commands, Edit and Select on a grid. If clicking at either one, how does the binding method know which command has been clicked?

     .Columns(c =>
      {
               c.Command(action =>
               {
                   action.Edit();
                   action.Select();
                }  
       }

.DataBinding(binding => binding.Server()
                .Update("GridUpdate", "Home")
                .Select("GridEdit", "Home")
            )

Both Edit and Select command are bound to the same method.

public ActionResult GridEdit(int id)
{
      // if Edit is clicked, perform inline edit
      // if Select is clicked, perform detailed edit in another view
}

Could anyone help?

Thanks,

Sam


2 Answers, 1 is accepted

Sort by
0
Lee
Top achievements
Rank 1
answered on 30 Mar 2011, 05:40 PM
Did you ever figure this out, as I have the same problem.
0
Evangelos Gatzonis
Top achievements
Rank 1
answered on 18 Jun 2012, 07:16 AM
Have the same problem. Anybody that has figure this out?Thanks.
Tags
Grid
Asked by
Samuel
Top achievements
Rank 1
Answers by
Lee
Top achievements
Rank 1
Evangelos Gatzonis
Top achievements
Rank 1
Share this question
or