This question is locked. New answers and comments are not allowed.
Hi everyone,
First, sorry for my "not that great" english, i'm french.
I have a grid, a dropdownlist and a submit button on a page. (see capture 1)
When we click on "Add", it add the selected item of the dropdownlist to a List<string> which the grid is bound to.
Easy enough. Actually, it owrk weel.
BUT.
I need to put a "delete" column so the user can delete rows.
This is where the problem punch my face.
When we click on Add, strange things is happening. (see capture 2)
the problem might be because my controls are in a table in a div but I don't know why it would be a problem.
This is my code in my view:
When I dont put the "columns.Command(commands => commands.Delete()).Width(50); " , every thing works fine.
WHAT THE F... IS HAPPENING
it seems like a new div is created, an other delete button and the"add" button is no more bound to any action.
Thank you for the help! :)
First, sorry for my "not that great" english, i'm french.
I have a grid, a dropdownlist and a submit button on a page. (see capture 1)
When we click on "Add", it add the selected item of the dropdownlist to a List<string> which the grid is bound to.
Easy enough. Actually, it owrk weel.
BUT.
I need to put a "delete" column so the user can delete rows.
This is where the problem punch my face.
When we click on Add, strange things is happening. (see capture 2)
the problem might be because my controls are in a table in a div but I don't know why it would be a problem.
This is my code in my view:
<div class="panel"> <table> <tr> <td> @(Html.Telerik().Grid(Model.getFPYOperation()) .Name("FPYOp") .DataKeys(keys => keys.Add(c => c.OpDesc).RouteKey("opDesc")) .DataBinding(binding => binding.Ajax() .Delete("_DeleteFPYRow", "Production")) .Columns(columns => { columns.Bound(o => o.OpDesc).Title("FPY Operation").Width(500); columns.Command(commands => commands.Delete()).Width(50); }) .Footer(false)) </td> <td> @(Html.Telerik().DropDownListFor(x => x.OperationToAdd) .BindTo(new SelectList(Model.getListOperation(), "OpDesc", "OpDesc")) .HtmlAttributes(new { style = string.Format("width:200px;") }) .SelectedIndex(0)) </td> <td> <input type="submit" value="add" /> </td> </tr> </table> </div>When I dont put the "columns.Command(commands => commands.Delete()).Width(50); " , every thing works fine.
WHAT THE F... IS HAPPENING
it seems like a new div is created, an other delete button and the"add" button is no more bound to any action.
Thank you for the help! :)