Problem Using TextBox to display values from Grid

4 posts, 0 answers
  1. Suzan
    Suzan avatar
    17 posts
    Member since:
    Feb 2011

    Posted 15 Apr 2011 Link to this post


    <
    telerik:RadPageView ID="RadPageView4" runat="server">
                    <div style="padding-right: 10px; padding-left: 10px;">
                        <br />
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BorderStyle="Solid">
                            <asp:Label ID="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
                            <br />
                            <asp:Image ID="Image1" runat="server" ImageUrl="WebBlue\Ajax\WebBlue.gif" />
                        </telerik:RadAjaxLoadingPanel>
                       <asp:Panel ID="Panel1" runat="server">
                            <table cellspacing="2px" cellpadding="0px">
                                <tr>
                                    <td colspan="2">
                                   <asp:Label ID="lblGrade" runat="server"> Grade:</asp:Label>
                                         
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="txtComment1">
                                           Comment 1:</label>
                                        <br />
                                        <telerik:RadTextBox ID="txtComment1" runat="server" TextMode="MultiLine" Rows="5"
                                            Columns="6" Height="50px" ReadOnly="true" Width="320px" Skin="WebBlue"/>
                                        <br />
                                    </td>
                                    <td>
                                        <label for="txtTarget1">
                                            Target 1:</label>
                                        <br />
                                        <telerik:RadTextBox ID="txtTarget1" runat="server" TextMode="MultiLine" Rows="5"
                                            Columns="6" Height="50px" ReadOnly="true" Width="320px" Skin="WebBlue"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <label for="txtComment2">
                                            Comment 2:</label>
                                        <br />
                                        <telerik:RadTextBox ID="txtComment2" runat="server" TextMode="MultiLine" Rows="5"
                                            Columns="6" Height="50px" Width="320px" Skin="WebBlue">
      
                                     </telerik:RadTextBox>
                                    </td>
                                    <td>
                                        <label for="txtTarget2">
                                            Target 2:</label>
                                        <br />
                                        <telerik:RadTextBox ID="txtTarget2" runat="server" TextMode="MultiLine" Rows="5"
                                            Columns="6" Height="50px" Width="320px" Skin="WebBlue" />
                                    </td>
                                </tr>
                                <tr>
                                </tr>
                            </table>
                        </asp:Panel>
                        <br />
                        <telerik:RadGrid ID="RadGridReviews" runat="server" AutoGenerateColumns="False" Skin="WebBlue"
                            OnItemCommand="OnSelectRecords" Width="400px">
                            <MasterTableView ShowFooter="true" DataKeyNames="qualcode">
                                <RowIndicatorColumn Visible="true" UniqueName="RowIndicator">
                                    <HeaderStyle Width="20px" BackColor="LightSkyBlue" />
                                </RowIndicatorColumn>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="reference" Visible="False" UniqueName="ColumnRef">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="qualcode" HeaderText="Qualification" ItemStyle-Width="100">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="classcode" HeaderText="Class" ItemStyle-Width="150" UniqueName="ColumnClass">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="review" HeaderText="Review" UniqueName="ColumnReview"
                                        ItemStyle-Width="100">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="attainment_grade" Visible="False" UniqueName="ColumnGrade">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="comment1" Visible="False" UniqueName="ColumnComment1">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="comment2" Visible="False" UniqueName="ColumnComment2">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="target1" Visible="False" UniqueName="ColumnTarget1">
                                    </telerik:GridBoundColumn>
                                      <telerik:GridBoundColumn DataField="target2" Visible="False" UniqueName="ColumnTarget2">
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </MasterTableView>
                            <ClientSettings EnableRowHoverStyle="true"
                                EnablePostBackOnRowClick="true">
                                <Selecting AllowRowSelect="true" />
                                 
                            </ClientSettings>
    I am using one page of a multi page to display a grid, a label and four text boxes
    As you can see from the code above the Grid has five invisible columns. When a row of the grid is selected the data in the invisible columns is displayed in the label and the text boxes. When the data fields only contain a single space "nbsp;" is displayed in the text boxes(see attached screenshot) instead of leaving them blank. Is there an easy way of making sure the text box is displayed as an empty box?
    Also is there a style of text box or a way of changing the style sheet so that the label is displayed above the text box rather than on the left hand side?
  2. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 21 Apr 2011 Link to this post

    Hello Suzan,

    I recommend that you examine the forum thread below which elaborates on this matter and see if it helps:
    http://www.telerik.com/community/forums/aspnet/grid/radgrid-edit-mode-displaying-quot-amp-nbsp-quot-in-text-box.aspx

    Regards,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Suzan
    Suzan avatar
    17 posts
    Member since:
    Feb 2011

    Posted 21 Apr 2011 Link to this post

    Thanks for the advice. I have worked out how to solve the problem using javascript and client-side events, but this advice will be useful
    if I need to post back to the server to get the required values.
  4. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 26 Apr 2011 Link to this post

    Hi Suzan,

    Go through the following link and see if it helps:
    http://www.google.bg/#hl=bg&source=hp&biw=1676&bih=837&q=Replace+%26nbsp&aq=f&aqi=&aql=&oq=&fp=a355cd77dc8f3e48

    Kind regards,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top