[Vue Grid] editing by default

1 Answer 73 Views
Grid Grid wrapper
Ian
Top achievements
Rank 1
Ian asked on 25 Mar 2022, 08:28 PM

Our use case is that we will have a grid, with a single row, that is in edit mode by default.

I can't seem to find any documentation on how to set edit mode by default. Is that possible with the Vue Grid?

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 28 Mar 2022, 11:04 AM

Hi Ian,

Based on the tags defined for the current thread, I would assume that you are working with the Wrapper Grid. To put the first row in a Grid, in 'edit' mode, we can programmatically click on the "Edit" button inside the desired row. 

The below code shows how we can programmatically click on the "edit" button of the first Grid row, once the Grid is initialized.

  mounted() {
    setTimeout(() => {
      console.log(
        $(
          'div.k-grid-content > table > tbody > tr:nth-child(1) > td > button.k-grid-edit.k-button'
        ).click()
      );
    }, 200);
  }

Here is a StackBlitz example demonstrating the usage of the above code.

I hope the provided example will help you achieve what you need in your application.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid Grid wrapper
Asked by
Ian
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or