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

Something wrong on Add Button

0 Answers 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Duan
Top achievements
Rank 1
Duan asked on 07 Aug 2012, 08:01 PM
Hi everybody

I have a problem with the Add button in the grid.
I'm doing some tests and something strange happened.
By clicking the Add button, a popup appears with the fields, an ok button and cancel the other. Sometimes when I click the cancel button, a row is inserted with all null values ​​and add button stops working. The code is this:

    .Columns(columns =>
    {
        columns.Bound(p => p.Isn);
        columns.Bound(p => p.EventoIsn);
        columns.Bound(p => p.UsuarioEdicao);
        columns.Bound(p => p.ValorCaptacao);
        columns.Bound(p => p.Processado);
    })
    .ToolBar(toolbar => {
        toolbar.Create().Text("");
    })
    .DataSource(dataSource => dataSource
        .Ajax()
        //.Server()
        .Model(model => model.Id(p => p.Isn))
        .Create(update => update.Action("Create", "CaptacaoItem"))
    )
    .Editable(editable => editable.Mode(GridEditMode.PopUp)
        .Window(w => w.Title("Captação Item")
            .HtmlAttributes(new { @id = "fLogin" })
            .Height(700)
            .Width(700)
            .Resizable())))

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Duan
Top achievements
Rank 1
Share this question
or