We have noticed as we are testing our Silverlight/Telerik admin app along with our back-end product that whenever pages that use a large number of Telerik RadGridView controls are viewed during our testing, the controls put locks on the database tables or groups of pages and cause deadlocks in the application. This causes the back-end application to fail.
We can tell it is the Telerik controls that do this because there is enough information in the SQL profile trace to link it back to the specific page that has the controls on it and we can see the statements behind the controls running.
When this deadlock is occurring, all of the RadGridView controls on that page have IsReadOnly="True". It is safe to assume that the SL application doesn't need to lock anything because it is only viewing a queue - an independent back-end application is making all changes to the database - this SL application should not be interfering with its operation.
Here is an example of the beginning of one of these grids:
We use the RadDomainDataSource, but I didn't see that it had a read-only option or anything to do with database locking there.
My first guess would be to set "CanUserAdd" to False, "CanUserDelete" to "False", IsReadOnly" = "True", then create a new function in the server-side domain services file that does the same SELECT, but with "NOLOCK". I am unsettled in this approach because I am guessing that either:
Thanks,
Rob
We can tell it is the Telerik controls that do this because there is enough information in the SQL profile trace to link it back to the specific page that has the controls on it and we can see the statements behind the controls running.
When this deadlock is occurring, all of the RadGridView controls on that page have IsReadOnly="True". It is safe to assume that the SL application doesn't need to lock anything because it is only viewing a queue - an independent back-end application is making all changes to the database - this SL application should not be interfering with its operation.
Here is an example of the beginning of one of these grids:
<
telerikGridView:RadGridView
Name
=
"ViewWaitingMessages_AllRadGridView"
Height
=
"250"
AutoExpandGroups
=
"True"
AutoGenerateColumns
=
"False"
HorizontalGridLinesBrush
=
"DarkOliveGreen"
IsBusy="{Binding IsBusy,
ElementName
=
ViewWaitingMessages_AllDomainDataSource
}"
IsReadOnly
=
"True"
IsSynchronizedWithCurrentItem
=
"False"
ItemsSource="{Binding
ElementName
=
ViewWaitingMessages_AllDomainDataSource
,
Path
=
Data
}"
RowHeight
=
"20"
RowIndicatorVisibility
=
"Visible"
SelectionMode
=
"Extended"
VerticalGridLinesBrush
=
"DarkOliveGreen"
>
<
telerikGridView:RadGridView.Columns
>
...
We use the RadDomainDataSource, but I didn't see that it had a read-only option or anything to do with database locking there.
My first guess would be to set "CanUserAdd" to False, "CanUserDelete" to "False", IsReadOnly" = "True", then create a new function in the server-side domain services file that does the same SELECT, but with "NOLOCK". I am unsettled in this approach because I am guessing that either:
- there is already a standard way to do this (I would assume that this is a pretty common thing that people need to do)
- there is something inside the control that is going establish locks anyway and this would be a waste of time
Thanks,
Rob