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

Javascript error on postback

1 Answer 197 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 04 Nov 2010, 06:01 PM
I don't know I just feel that I get the weirdest errors.

I have a simple set-up, I have a radgrid with a MasterTableView and a DetailTableView.

In the DetailTableView I have radComboBoxes and the combo boxes are all set to AutoPostback="true" so when the selectedindexchanges the autopostback fires. To minimize the possibilities I even removed the code from the code behind and just kept the Sub, so at the moment it postbacks to an empty Sub.

When it fires I get a javascript error in Sys$WebForms$PageRequestManager$_endPostBack indicating a server error (500).

For testing purposes I put some radComboBoxes on the MasterTableView and put some code for the postback and I do not get a javascript error.

Thanks

1 Answer, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 2
answered on 04 Nov 2010, 08:29 PM
OK after digging I've found the issue.

All radComboBoxes are populated via a datasourse but all have 1 default item in them and that is <Select> so the user knows that's something needs to be selected.

When I use the radCombobox Item Builder to do the create the <Select> item, the code generated is:

 

 

<telerik:RadComboBoxItem runat="server" Text="&lt;Select&gt;" Value="0" />

 


This for whatever reason causes the Javascript error, if I go and change it for the following:

<

 

 

telerik:RadComboBoxItem runat="server" Text="<Select>" Value="0" />

 


Everything runs GREAT.

Only took me 3 hours to pin it down.
Tags
ComboBox
Asked by
Alex
Top achievements
Rank 2
Answers by
Alex
Top achievements
Rank 2
Share this question
or