See Trademarks for appropriate markings. With the public forums, you can edit your original post to add/change information to have a coherent description of the problem that won't get scattered if the thread is sorted by date, or upvote on posts change the order. Progress is the leading provider of application development and digital experience technologies. When you click on a row or the checkbox the row will be highlighted . Telerik and Kendo UI are part of Progress product portfolio. There doesn't seem to be a way to deselect the selected row either by clicking on a selected row again or by two-way-binding and setting it to an empty list. This would be pretty handy as currently the only way that makes sense for me is to make no use of selection mode at all. : Have you tried this approach? Copyright 2022 Progress Software Corporation and/or its subsidiaries or affiliates. The Examples section showcases how you can use the grid features together. It already contains the selected items and I think (as you have also found) that the only thing you need to do is to ensure an Equals comparison works for that scenario, see more here:https://docs.telerik.com/blazor-ui/components/grid/selection/overview#selecteditems-equals-comparison. Progress Telerik, "There is no built-in feature for scrolling to a specific selected row, however. To observe the behavior of the different selection modes use the dropdown list on the top left side of the demo. See Trademarks for appropriate markings. Let me know if you have any comments on all of the above. Grid (simplified) look like this. The row selection can be: To select a row, click on it. Progress Telerik. The Telerik Grid for Blazor allows you to select an item or a multitude of items. This is a migrated thread and some comments may be shown as answers. See Trademarks for appropriate markings. That being said, I am marking this thread as "Completed" because such behavior can already be achieved using the existing events. Check checkbox -> All items from the previous data set will be selected (printed in ul bellow grid)I have inspected the grid and i does not contain any item in its Data collection so I'm unsure from where does it get the selection. Progress is the leading provider of application development and digital experience technologies. This can be found here in this feature branch:https://github.com/adrianwright109/blazor-ui/tree/feature/persisted-state-not-updated-in-grid. What is not working is that those rows in the grid should also be highlighted and ticked as selected. I can store the selected tickbox state to hold a list of all the selected items. Progress Telerik. Marin Bratanov Can you elaborate about how to do this? Love the Telerik and Kendo UI products and believe more people should try them? Now enhanced with: I have a Telerik Blazor Grid which has selection tickboxes that allow multiple tickboxes to be selected at any one time. Copyright 2022 Progress Software Corporation and/or its subsidiaries or affiliates. Progress, Telerik, Ipswitch, Chef, Kemp, Flowmon and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. With the keyboard support that we introduced in our latest release, the user can also use the up/down arrows to move around the rows, and that will also scroll the grid. I would go back to 2.22.0 but its no longer in the nuget package source. This solves half of my problem; in addition to being able to select the row and scroll it into view I need to select the correct page that the row appears on. Max total file size - 20MB. I combined all your posts into a single one so there is a clear flow in the order you found and tried things. Here's a sample JS function that expects a CSS selector to find the correct grid, then finds the first selected row and calls its .scrollIntoView() method: and here is a sample way of calling it (see the SelectItem method from the button click): Thanks for the prompt reply and sample code. // select item 11 which would be hidden initially, //rougly one rendering frame so this has the chance to render in the browser. Progress is here for your business, like always. The selection itself can be done in different ways: This Blazor Grid - Selection demo is part of a unique collection of hundreds of Blazor demos, with which you can see all. Clear data set. I have followed the pattern in here: https://github.com/telerik/blazor-ui/blob/master/grid/persist-selection/Pages/Index.razorI am storing the SelectedItems in the SelectedItemsChanged event handler and storing them on a Cascading value component so they are available across pages.When returning back to the page that has the grid the SelectedItems are not highlighted.The grid's SelectedItems property points to the CascadingValue property of selected items.I can successfully print out the SelectedItems count from the same CascadingValue property above the grid, so there is definitely data there, but the grid doesn't seem to want to show those items as selected.I have also tried setting the SelectedItems property on SetState but that has same problem.FYIThe grid uses OnRead where the data is filled into the grid on initialization of the page and when ever paging or filtering, sorting is applied. You can set the Page parameter of the grid to make it go to a different page: You could start with the approach described here: https://docs.telerik.com/blazor-ui/knowledge-base/grid-get-index-of-grid-row. Progress, Telerik, Ipswitch, Chef, Kemp, Flowmon and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. All Rights Reserved. The Scheduler allows you to display events in different views with built-in support for editing. This is required because the SelectedItemsChanged event would fire after the OnRowClick. New to Telerik UI for Blazor? With the public forums, you can edit your original post to add/change information to have a coherent description of the problem that won't get scattered if the thread is sorted by date, or upvote on posts change the order. via Ctrl + Click (Windows) or Cmd + Click (Mac) If the user should be able to deselect a row via a simple click, this may create inconsistency with other well-known interfaces (such as Windows Explorer or Excel . To use single row selection, set the SelectionMode property to Telerik.Blazor.GridSelectionMode.Single. If I navigate away from the grid say to another page and then return back to the grid I would like to be able to render the grid with the rows that were selected so they are shown as still ticked - is this possible? Telerik and Kendo UI are part of Progress product portfolio. fyi, scrolling into view with a virtual grid worked fine in 2.22.0 but broke in 2.24. Uncheck chekcbox. Progress is the leading provider of application development and digital experience technologies. Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher. I am logging this for further research as there isn't further public API to control this. If you are using single selection you could use JS interop to find the row the has the selected state and call its .scrollIntoView() method.". Progress, Telerik, Ipswitch, Chef, Kemp, Flowmon and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. Progress is the leading provider of application development and digital experience technologies. Copyright 2022 Progress Software Corporation and/or its subsidiaries or affiliates. Great, thx for the quick reply that helps. The example shows how to get the index of a particular item, in a similar fashion you could get that index according to all the data you have, not just the current page (that logic is entirely up to the app, the grid cannot influence the way you obtain data, and especially how to do this in a performant manner). I know virtually nothing about JS (hence my enthusiasm for Blazor) so an actual example would be great. Thank you very much. (Total attached files size should be smaller than, Progress Telerik UI for Blazor Feedback Portal, https://docs.telerik.com/blazor-ui/components/grid/selection/overview, https://feedback.telerik.com/blazor/1444399-clearing-grid-data-does-not-clear-selecteditems. The DropDownList allows you to select an item from a list of predefined values . Basics. Supported file types: PNG, JPG, JPEG, ZIP, RAR, TXT. The user edits row 5 and as a consequence of the changes it will now be the 25th row of the grid-- so it's now on page 3. Not sure how or why this broke, but now you can scroll to the item, but the list will render as empty, just with the scrollbar visible. You can use the OnRowClick event to achieve the desired behavior. Copyright 2022 Progress Software Corporation and/or its subsidiaries or affiliates. There is no built-in feature for scrolling to a specific selected row, however. All Rights Reserved. I need to both select page 3, select the row and make sure it's visible. yes - I tried that, but it does not seem to work (the former selected row stays red - might be an issue on doing it in the rowClick event as it might overwrite the selected items later): . And if the active row is not visible allow scrolling the active row into view? One important thing that should be done is the cancellation of the SelectedItemsChanged event. I moved this report to the public Feedback portal so you can Follow its status: https://feedback.telerik.com/blazor/1444399-clearing-grid-data-does-not-clear-selecteditems. Select an item in the grid. Can you please provide an example of how to move to a different page of the grid? Regards, As an attached file you can see a demo application that showcases such an implementation. I checked in more detail and confirm that it is not possible to trigger deselection specifically in the row click event. This application may no longer respond until reloaded. This solves half of my problem; in addition to being able to select the row and scroll it into view I need to select the correct page that the row appears on. Regards, I thought I could set a reference to the grid component and select the page in code, but that only changes the page selector at the bottom of the grid, it doesn't advance the contents of the grid so that it's showing the rows on that page. To un-select the item, click its checkbox again, or hold the Ctrl key and click/tap the row. If you want to deselect all rows, you can assign an empty List, e.g. (at least when I do it). Loading the demo source codeplease wait. You can also use a checkbox column to select rows. On the other hand, programmatic selection and deselection is demonstrated in the online demo: https://demos.telerik.com/blazor-ui/grid/selection. Imagine a grid with 100 rows with 10 rows per page. All Rights Reserved. Scrolling to a Grid row in virtual mode should rely on the Skip property of the Grid state. public IEnumerable SelectedItems { get; set; } = Enumerable.Empty(); The Grid allows users to deselect rows in two ways: If the user should be able to deselect a row via a simple click, this may create inconsistency with other well-known interfaces (such as Windows Explorer or Excel), which don't behave that way. I think the issue could be that the grid is not seeing the selected items that have been persisted as the same as the ones when returning back to the grid.The data in the grid is re-populated from the database and the object references don't match.