I've got a textbox in the template column. And how do I get the value of the text box by clicking the button. This is my code.Here I add a new value based on the text box value.
<tr> <td> <Template> @{ var ctx = (context as sampleData);} <input type="text" @bind-value="@CurrentValue" @onclick:stopPropagation="true" /> @{ if (ctx.Name !=null) { <input type="button" OnClick="((e) => NewItem(e))">Add new</input> } } </Template> </td> </tr> public void newItem(Microsoft.AspNetCore.Components.Web.MouseEventArgs args) { /// based on textbox value i will add new value }
1.4m articles
1.4m replys
5 comments
57.0k users