I had a page with come radcombos, radcalendar, and a grid. Everything was working just fine until I set the client-side row selection of the Grid to true. The calendar wouldn't pop up and there was a js error: Object required.
I attempted to isolate the error by creating a new test page with nothing on it but the RadScriptManager and the RadGrid. Loaded it up with the default settings just fine. Then I turned on the client-side row selection and I got a js error again:
Sys.ArgumentNullException: Value cannot be null. Parameter name: id.
Any ideas?
5 Answers, 1 is accepted
0
Michael
Top achievements
Rank 2
answered on 19 Feb 2008, 11:59 PM
The title for this should read "Selection" not "Reorder". I apologize for any confusion.
0
Hi Michael,
I followed you scenario, but when I enable Client-Side Row Selection of the Grid, the calendar pop-up is working as expected, and no errors are displayed. Please find attached a sample and tell us if you are doing something different.
All the best,
Iana
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
I followed you scenario, but when I enable Client-Side Row Selection of the Grid, the calendar pop-up is working as expected, and no errors are displayed. Please find attached a sample and tell us if you are doing something different.
All the best,
Iana
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Michael
Top achievements
Rank 2
answered on 20 Feb 2008, 07:21 PM
Hi Iana,
It seems that the problem with the client-side selection has to do with my objectdatasource in this instance. The RadGrid is not populated on load -- the user must first select several fields and then submit. What's going on here is that when the page loads, the objectdatasource is calling to my BLL, which checks to make sure the fields are filled out and if they're not, return nothing. So the first time it hits, the RadGrid gets nothing and it's not happy about it.
An easy way to replicate is to put a RadGrid on a WebForm, set it's client-side selection to true and bind it to nothing in the page load.
What would your suggestion be in this case? I'm guessing I should check one of the objectdatasource events and if there is data returned, set the RadGrid to visible and bind it that way to avoid the js error. You or someone else might have something better though.
0
Michael
Top achievements
Rank 2
answered on 20 Feb 2008, 08:10 PM
Ok, this is what I'm doing as a workaround.
Protected Sub rdgrdServiceDetails_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles rdgrdServiceDetails.DataBound
If rdgrdServiceDetails.MasterTableView.Items.Count > 0 Then
rdgrdServiceDetails.ClientSettings.Selecting.AllowRowSelect = True
Else
rdgrdServiceDetails.ClientSettings.Selecting.AllowRowSelect = False
End If
End Sub
0
Hello Michael,
Indeed this is an applicable solution for your case since you do not need client selection enabled when there is no data to be displayed in the grid. Feel free to use the approach for your grid configuration and let us know if we can be of a further help.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Indeed this is an applicable solution for your case since you do not need client selection enabled when there is no data to be displayed in the grid. Feel free to use the approach for your grid configuration and let us know if we can be of a further help.
Best regards,
Stephen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center