سؤال

I have a webgrid, what I want to do is to edit the selected row, but I want this action to be performed when the user press a button and not only when the user select the row. How can I do this??

هل كانت مفيدة؟

المحلول 2

I implemented something similar recently, the following article helped me: http://stick2basic.wordpress.com/2013/04/23/inline-editing-with-the-webgrid-in-asp-net-mvc-4/

نصائح أخرى

grid.Column("Action", format: @<text>
                <button class="edit-user display-mode" >Edit</button>
                <button class="save-user edit-mode"  >Save</button>
                <button class="cancel-user edit-mode" >Cancel</button>
                </text>,  style: "col3Width" , canSort: false)

Delete these lines and put into seperate div in coding part

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top