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

[Solved] Javascript error when retrieving data when embedded in a grid

3 Answers 103 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Richard Murphy
Top achievements
Rank 1
Richard Murphy asked on 25 Sep 2009, 08:12 AM

Hi,

I am attempting to embed a RadCombo box in a grid for adding and updating items.

<WC:CustomDataGrid ID="dgDiscWorks" Runat="server" DataKeyField="disc_work_id" ClearNewOnCancel="true">  
                                                            <Columns> 
                                                                <asp:TemplateColumn HeaderText="">  
                                                                    <ItemTemplate>                    
                                                                    <%# Container.ItemIndex + 1 %>.  
                                                                    </ItemTemplate> 
                                                                </asp:TemplateColumn>                                                                 
                                                                <asp:TemplateColumn HeaderText="Composer">  
                                                                    <ItemTemplate><a href="ComposerDetail.aspx?composer_id=<%# DataBinder.Eval(Container.DataItem, "composer_id") %>" 
                                                                        ><%# ComposerName(DataBinder.Eval(Container.DataItem, "first_name"), DataBinder.Eval(Container.DataItem, "last_name")) %></a></ItemTemplate> 
                                                                    <EditItemTemplate><Combo:Composer id="dw_composer" runat="server" width="200px" FontSize="10px" /></EditItemTemplate>  
                                                                </asp:TemplateColumn> 
                                                                <asp:TemplateColumn HeaderText="Work">  
                                                                    <ItemTemplate><a href="WorkDetail.aspx?work_id=<%# DataBinder.Eval(Container.DataItem, "work_id") %>" 
                                                                        ><%# WorkTitle(DataBinder.Eval(Container.DataItem, "article"), DataBinder.Eval(Container.DataItem, "title")) %></a></ItemTemplate> 
                                                                    <EditItemTemplate><Combo:Work id="dw_work" runat="server" width="200px" FontSize="10px" /></EditItemTemplate>  
                                                                </asp:TemplateColumn> 
                                                            </Columns> 
                                                        </WC:CustomDataGrid> 

The problem is that everytime I attempt to click or type in the combo and it, consequently, attempts to retrieve the items from the database it throws a runtime javascript error. The combo's work fine retrieving the data outside the grid - it just happens on dynamic retrieval within the grid on edit/add.

Does any know why or have a solution please?

Many thanks, Richard

3 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 25 Sep 2009, 01:32 PM
Hi Richard Murphy,

Can you let me know what is the JavaScript error that you are receiving?

Regards,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Richard Murphy
Top achievements
Rank 1
answered on 29 Sep 2009, 05:37 AM
Hi,

Sorry for the delay in replying.

The part of the javascript it seems to break at is:

eval("\x76arcallBa\x63\x6bDat\x61\x20= "+od+"\x3b");

If you need the full javascript which is quite long please let me know.

Thanks,

Richard

0
Simon
Telerik team
answered on 29 Sep 2009, 12:32 PM
Hi Richard Murphy,

Yes, it will be more helpful if you provide more of the related JavaScript code (where it this eval(); call located?; where is this code used?).

Additionally, can you paste the RadComboBox's ItemsRequested event handler code as well?

Best wishes,
Simon
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
ComboBox
Asked by
Richard Murphy
Top achievements
Rank 1
Answers by
Simon
Telerik team
Richard Murphy
Top achievements
Rank 1
Share this question
or