Hi
I'm using GridCommandColumn for three different operations.
<GridColumn HeaderText="Ok" Width="40"> <GridCommandColumns> <GridCommandColumn Type="CommandButtonType.None" ID="Answer" ButtonOption="@(new CommandButtonOptions() {IconCss="e-icons e-check", CssClass="e-flat" })"></GridCommandColumn> </GridCommandColumns> </GridColumn> <GridColumn HeaderText="Edit" Width="40"> <GridCommandColumns> <GridCommandColumn Type="CommandButtonType.Edit" ID="Edit" ButtonOption="@(new CommandButtonOptions() {IconCss="e-icons e-edit", CssClass="e-flat" })"></GridCommandColumn> </GridCommandColumns> </GridColumn> <GridColumn HeaderText="Pdf" Width="40"> <GridCommandColumns> <GridCommandColumn Type="CommandButtonType.None" ID="Document" ButtonOption="@(new CommandButtonOptions() {IconCss="oi oi-list-rich", CssClass="e-flat" })"></GridCommandColumn> </GridCommandColumns> |
public async void CommandClickHandler(CommandClickEventArgs<Inspection> args) { if (args.CommandColumn.ID == "Answer") { args.RowData.Answer = "Uygun"; await InspectionServ.UpdateInspectionAsync(args.RowData); InspectionGrid.Refresh(); } else if (args.CommandColumn.ID == "Edit") { await InspectionGrid.StartEdit(); } else if (args.CommandColumn.ID == "Document") { DocumentPath = "wwwroot/Files/References/" + args.RowData.InspectionId + ".pdf"; Header = "Referans Dosyası - " + args.RowData.InspectionId; await pdfDialog.Show(); } } |
How can I make the edit column open the default dialog ? When I use "await InspectionGrid.StartEdit()" default dialog is opening but when i close it, it says " no records selected for edit operation".So i should close custom edit and open it default just like the toolbar does.
By the way, the reason why I put an edit button on gridcolumn too is for tablets and phones.So it shoud work with double click or edit button.
I have attached the sample video and code.