简体   繁体   English

asp.net MVC3剃须刀webgrid EditColumn

[英]asp.net MVC3 razor webgrid EditColumn

I have a Webgrid which is bounded and also has an edit "LinkButton" column. 我有一个限制的Webgrid ,也有一个编辑“ LinkBut​​ton”列。

I want it so that when the user clicks "LinkButton", it will fill a TextBox (below the WebGrid) with some value from the database. 我想要它,以便当用户单击“ LinkBut​​ton”时,它将用数据库中的某些值填充TextBox(在WebGrid下方)。

You can use jquery for this, on click of the link button call a jquery. 您可以为此使用jquery,单击链接按钮后将调用jquery。

From the jquery call an action and make that action do whatever work you want and return THAT value to the jquery and then use this value to fill the textbox. 从jquery调用一个动作,并使该动作执行所需的任何工作,然后将THAT值返回给jquery,然后使用该值填充文本框。

Here is a link, that shows how to call an action from jquery 这是一个链接,显示了如何从jquery调用操作

http://yassershaikh.com/how-to-call-an-action-from-javascript-or-jquery-in-mvc-3-razor/ http://yassershaikh.com/how-to-call-an-action-from-javascript-or-jquery-in-mvc-3-razor/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM