command buttons disappear

3 posts, 1 answers
  1. Rick
    Rick avatar
    51 posts
    Member since:
    Sep 2017

    Posted 21 Jun 2019 Link to this post

    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. Answer
    Rick
    Rick avatar
    51 posts
    Member since:
    Sep 2017

    Posted 21 Jun 2019 Link to this post

    It looks like this was because of what i was naming the command, "Edit". Changed the command name and it's fine.
  3. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5704 posts

    Posted 24 Jun 2019 Link to this post

    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
Back to Top