MultiColumn with TextBoxes

6 posts, 0 answers
  1. Konrad
    Konrad avatar
    3 posts
    Member since:
    Feb 2013

    Posted 18 Feb 2013 Link to this post

    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
  2. Nencho
    Admin
    Nencho avatar
    1822 posts

    Posted 21 Feb 2013 Link to this post

    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.
  3. Konrad
    Konrad avatar
    3 posts
    Member since:
    Feb 2013

    Posted 21 Feb 2013 Link to this post

    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.
  4. Nencho
    Admin
    Nencho avatar
    1822 posts

    Posted 26 Feb 2013 Link to this post

    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.
  5. Konrad
    Konrad avatar
    3 posts
    Member since:
    Feb 2013

    Posted 27 Feb 2013 Link to this post

    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
  6. Nencho
    Admin
    Nencho avatar
    1822 posts

    Posted 27 Feb 2013 Link to this post

    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.
Back to Top