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

MultiColumn with TextBoxes

5 Answers 66 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Konrad
Top achievements
Rank 1
Konrad asked on 18 Feb 2013, 12:51 PM
Hi
I have ComboBox with multicolumns which is embeded in RadGrid ->Columns ->GridTemplateColumn -> EditItemTemplate.
Orginally it had one checkbox column and 3 databound coulmns from SqlDataSource. I had to add new column and it had to be TextBox. After that when I click 'Save' while inserting new item I get error:

Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 


Here's my code:
<telerik:RadComboBox ID="RadComboBox1" runat="server" Height="200px" Width="300px"
                            DropDownWidth="520px" EmptyMessage="Select Item" HighlightTemplatedItems="true"
                            EnableLoadOnDemand="True" RadComboBoxImagePosition="Right" AllowCustomText="true"
                            DataTextField="hardware_no" DataValueField="id_comp"
                            SelectedValue='<%# Eval("id_comp") %>'  
                            Text='<%# Eval("hardware_no") %>'
                            AutoPostBack="False" 
                            DataSourceID="SqlDataSource1" 
                            >
                            <HeaderTemplate>
                                <table style="width: 480px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 20px;">
                                            </td>
                                        <td style="width: 35px;">
                                            Amount</td>
                                        <td style="width: 100px;">
                                            Hardware Nr</td>
                                        <td style="width: 160px;">
                                            Department</td>
                                        <td style="width: 140px;">
                                            Person</td>
                                              
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ItemTemplate>
                                  
                                <table style="width: 480px" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td style="width: 20px;">
                                            <asp:CheckBox runat="server" ID="chk1" Checked="false" />
                                        </td>
                                        <td style="width: 35px;">
                                            <asp:TextBox ID="TextBoxAmount" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "amount") %>' Width="25" ></asp:TextBox>  
                                              
                                        </td>
                                        <td style="width: 100px;">
                                            <%# DataBinder.Eval(Container.DataItem, "no_h")%>
                                        </td>
                                        <td style="width: 160px;">
                                            <%# DataBinder.Eval(Container.DataItem, "dept")%>
                                        </td>
                                        <td style="width: 140px;">
                                            <%# DataBinder.Eval(Container.DataItem, "person")%>
                                        </td>
                                          
                                    </tr>
                                </table>
                                 
                            </ItemTemplate>
                        </telerik:RadComboBox>

All data fields from SqlDataSource are provided from strored procedure, including the TextBox one - 'amount'

Please help
Thx
Konrad

5 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 21 Feb 2013, 09:25 AM
Hi Konrad,

I have inspected the provided snippet of code and the configuration of the RadComboBox seems to be proper and it works correctly at my end. Here is a video, demonstrating the behavior of the control at my end.

As for the server error you had faced, please refer to this forum thread, where this topic is discussed in details.

Regards,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Konrad
Top achievements
Rank 1
answered on 21 Feb 2013, 11:18 AM
Hi Nencho.
Thanks for aswer.

I've seen your video, and at that stage my ComboBox is also working properly. It shows all columns, I can write in Text Boxes, choose items, etc. As I mentioned - the whole problem occurs when I'm clicking 'Save' button on my RadGrid's insert form.
I've read all posts from provided link - tried everything, but error still occurs. 

Maybe some other suggestions...
Thank u.
Konrad.
0
Nencho
Telerik team
answered on 26 Feb 2013, 10:05 AM
Hello Konrad,

I would like to ask you to open a support ticket, along with a runnable sample attached, demonstrating the faced issue. Thus we would be able to inspect the problem locally and provide you with the proper solution.

Greetings,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Konrad
Top achievements
Rank 1
answered on 27 Feb 2013, 09:27 AM

Hello again.

After another, looong search - problem is solved.
It seemed that my data I was loading into ComboBox was too large (over 1300 rows), and to managed it my web.config should include additional entry:

<appSettings>
  <add key="aspnet:MaxHttpCollectionKeys" value="5000" />
</appSettings>

Thanks for your time
Best regards.

Konrad
0
Nencho
Telerik team
answered on 27 Feb 2013, 03:44 PM
Hello Konrad,

Thank you for sharing your findings with the community.

All the best,
Nencho
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Konrad
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Konrad
Top achievements
Rank 1
Share this question
or