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

command buttons disappear

2 Answers 325 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rick
Top achievements
Rank 1
Veteran
Rick asked on 21 Jun 2019, 05:30 PM

Clicking a command button on my grid and running the code the handler contains causes all command buttons in that row to disappear. Refreshing the page makes them reappear.

Perhaps I am not using it correctly.

     <TelerikGridCommandButton Command="Edit" OnClick="@OpenRequestEditWindow" Icon="edit">Edit</TelerikGridCommandButton>
     <TelerikGridCommandButton Command="Delete" OnClick="@DeleteRequestItem" Icon="delete">Delete</TelerikGridCommandButton>

 

Clicking the "Edit" button opens a window with controls on it. User edits the values in the controls and has a save button 

  <TelerikButton Icon="save" OnClick="@UpdateRequest">Save Purchase Request</TelerikButton><br /><br />

This event simply writes to the database and then rebinds the grid data.

 var grid = await service.GetRequests();
 RequestAddGrid = grid.ToList();

2 Answers, 1 is accepted

Sort by
0
Accepted
Rick
Top achievements
Rank 1
Veteran
answered on 21 Jun 2019, 07:47 PM
It looks like this was because of what i was naming the command, "Edit". Changed the command name and it's fine.
0
Marin Bratanov
Telerik team
answered on 24 Jun 2019, 11:24 AM
Hi Rick,

If you have those buttons in a command column, then firing the Edit or Delete commands have definitive meaning of their own in the grid, and you must, indeed, use different names for custom commands.


Regards,
Marin Bratanov
Progress Telerik UI for Blazor
Tags
Grid
Asked by
Rick
Top achievements
Rank 1
Veteran
Answers by
Rick
Top achievements
Rank 1
Veteran
Marin Bratanov
Telerik team
Share this question
or