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

How to physically delete selected items from grid?

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Goran
Top achievements
Rank 1
Goran asked on 13 Jul 2012, 07:57 AM
Hi,

We use Telerik RadGrid in our ASP.NET application. The Oracle database is our main data source. But, we also use the application cache as another data source. The application cache is implemented as static class that use internal dictionary.

When we use the application cache as data source we have 2 grids: first one is master and second one is detail, which means when we select some item in master grid it reflects in detail grid below. It's regular scenario and it works fine.

We have 2 buttons in small toolbar above each grid, remove button and refresh button. Everything works fine in master grid, which means when we select item(s) they are removed and the content of grid is refreshed immediately by code.

The thing that is not working is refreshing the detail grid. We select item(s) and click delete button in small toolbar. The items actually were deleted from underlying cache, but the content of grid is not refreshed. When we click refresh button in master grid and select item in master grid that refers to detail grid we can see new content without deleted items in detail grid. In this way we know the items in detail grid have been deleted. But, we need to refresh the content immediately.

The code that is responsible for deleting and refreshing is fairly complex (I haven't written that code) and I want to delete the selected items in detail grid not only in underlying cache, but physically from the grid as well. How can I do that?

Thank you in advance.

Goran

1 Answer, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 13 Jul 2012, 12:19 PM
the grid should automatically refresh when an item is updated in any way
try adding a
my grid.MastertableView.Rebind(); after a successful delete to force a refresh
Tags
Grid
Asked by
Goran
Top achievements
Rank 1
Answers by
Elliott
Top achievements
Rank 2
Share this question
or