Can't Add Columns at Design

8 posts, 0 answers
  1. David Kemp
    David Kemp avatar
    4 posts
    Member since:
    Feb 2008

    Posted 04 Nov 2008 Link to this post

    Ok, so, what is happening right now, is for some reason when I try to add columns to the RadGrid in the designer, I can see them in the designer, but the source is not changing. So if I right-click on the control and hit refresh, the columns are gone. Its as though the designer is working but its not actually chaning the Source Code. The only way I can get it to work is to remove it and add a new RadGrid Control. Then it works for awhile, and stops working again.

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="leftPowerPAD.ascx.vb" Inherits="controls_leftPowerPAD" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <telerik:RadAjaxPanel ID="RAPPowPad" runat="server">  
     
    <div id="areaPwrPadLists">  
        <table cellpadding="0" cellspacing="0">  
            <tr> 
                <td> 
                    <asp:DropDownList ID="DropDownList1" runat="server" CssClass="dropListA">  
                        <asp:ListItem Selected="True" Value="0">-- Select List--</asp:ListItem> 
                    </asp:DropDownList> 
                </td> 
                <td>&nbsp;</td> 
                <td valign="middle">  
                    <asp:ImageButton ID="ImageButton13" runat="server"   
                    ImageUrl="~/images/buttonPPGo.gif" /> 
                </td> 
            </tr> 
        </table> 
    </div> 
     
    <table border="0" cellpadding="0" cellspacing="0" class="tblPowerPad">  
        <tr> 
            <td class="cellPowerPadHead">JS Order #</td> 
            <td class="cellPowerPadHead">Qty</td> 
            <td>&nbsp;</td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox1" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox2" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton3" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox3" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox4" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton4" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox5" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox6" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton5" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox7" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox8" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton9" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox9" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox10" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton6" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox11" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox12" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton7" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox13" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox14" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton8" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox15" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox16" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton10" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox17" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox18" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton11" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
        <tr> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox19" CssClass="inputA" Width="155px" runat="server" /> 
            </td> 
            <td class="cellPowerPadInput">  
                <asp:TextBox ID="TextBox20" CssClass="inputA" Width="25px" runat="server" /> 
            </td> 
            <td> 
                <asp:ImageButton ID="ImageButton12" runat="server"   
                ImageUrl="~/images/buttonDelete.gif" T  
                oolTip="Delete This Item" /> 
            </td> 
        </tr> 
    </table> 
        <telerik:RadGrid ID="RadGrid1" runat="server"   
            AllowMultiRowEdit="True" AutoGenerateDeleteColumn="True"   
            AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1" GridLines="None"   
            Skin="Default2006" AutoGenerateColumns="False">  
            <MasterTableView DataSourceID="SqlDataSource1">  
                <RowIndicatorColumn> 
                    <HeaderStyle Width="20px" /> 
                </RowIndicatorColumn> 
                <ExpandCollapseColumn> 
                    <HeaderStyle Width="20px" /> 
                </ExpandCollapseColumn> 
            </MasterTableView> 
            <ClientSettings AllowColumnsReorder="True">  
            </ClientSettings> 
            <FilterMenu EnableTheming="True">  
                <CollapseAnimation Duration="200" Type="OutQuint" /> 
            </FilterMenu> 
        </telerik:RadGrid> 
    <div> 
        <asp:HyperLink ID="HyperLink1" runat="server" CssClass="lnkClose"   
        Text="Clear All" NavigateUrl="#" /> 
          
    </div> 
     
    <div class="padButtons">  
        <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/images/buttonPPAddList.gif" /> 
        &nbsp;  
        <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/images/buttonPPAddCart.gif" /> 
    </div> 
        <asp:Panel ID="Panel1" runat="server">  
        </asp:Panel> 
    </telerik:RadAjaxPanel> 
  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 04 Nov 2008 Link to this post

    Hey David,

    Hmm, only problem I'm running into with debugging this is I don't see any columns defined at all in your grid, which means they're all going to be coming from the data source.  I think if you wanted to override this you would need to do something like...

    <Columns> 
        <telerik:GridTemplateColumn HeaderText="Activity Type" UniqueName="posttype" SortExpression="posttype">  
        <ItemStyle Width="150px" /> 
        <ItemTemplate> 
        <asp:Label id="label678" runat="server" Text='<%# Eval("posttype") %>'></asp:Label><br /><br /> 
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridTemplateColumn HeaderText="Activities in Category" UniqueName="posttext" SortExpression="posttext">  
        <ItemStyle Width="450px" /> 
        <ItemTemplate> 
        <asp:Literal ID="label987" runat="server" Text='<%# Bind("posttext") %>' OnDataBinding="DecodeText" Mode="Transform"></asp:Literal>      
        </ItemTemplate> 
        </telerik:GridTemplateColumn> 
    </Columns> 

    So these grab the values from the datasource, but I can define how I want the columns to work.  I can even add a third in that isn't bound to the datasource but is used for some other nefarious purpose. :)

    Would something like this work for you?  Also, out of curiosity, what version of the controls are you using?  I'm still demo'ing Q2 2008 latest SP, and this works fine for my columns.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. David Kemp
    David Kemp avatar
    4 posts
    Member since:
    Feb 2008

    Posted 04 Nov 2008 Link to this post

    Yeah, I can add them in the source code manually like you are saying, but it will not let me add them in via the designer. It acts like its working fine, but the code itself doesn't actually reflect the changes. I can even see the columns in the design view, but if I refresh it, they disappear. Tried it on two different computers.
  5. David Kemp
    David Kemp avatar
    4 posts
    Member since:
    Feb 2008

    Posted 04 Nov 2008 Link to this post

    I am using 2008.02.1001.35
  6. Jeff Sager
    Jeff Sager avatar
    26 posts
    Member since:
    Aug 2006

    Posted 14 Nov 2008 Link to this post

    I am having the same problem.  I've been trying to diagnose it and with me it seems that if I create a new RadGrid and work on it exclusively via the designer the changes I make seem to stick in the source, but if I manually change something in the source and then change something via the designer (in my case I typed into the source the <GroupingSettings CaseSensitive="false" />) and now when I change the properties (or even add columns) they show in the design widow but are not created in the source.  It almost seems like when you manually change something in the source the designer can no longer update the source.  I'm using Q3 2008 with Visual Studio 2008 Pro with 3.5 SP1.

    Jeff
  7. Jeff Sager
    Jeff Sager avatar
    26 posts
    Member since:
    Aug 2006

    Posted 14 Nov 2008 Link to this post

    Sorry for quick reply, but I think I figured out more of the problem.
    If I put the RadGrid on the page and edit in either design or source it is fine.  If I then put an AjaxPanel on the page and put the RadGrid in it, the designer changes no longer transfer to the source.  If I remove the AjaxPanel, it works again.
    Not sure if this will help or not.

    Jeff
  8. Mark
    Mark avatar
    35 posts
    Member since:
    Nov 2008

    Posted 24 Nov 2008 Link to this post

    Ugh, I'm having this problem too, and it's driving me nuts. I make changes in the designer, and they're never reflected in the markup. It was working fine previously, and suddenly stopped working - restarting Visual Studio does not help.

    I'm not using a RadAjaxPanel on my page.

    I'm running VS2008 with the .NET 2.0 version of the controls. ASP.NET AJAX version is the latest at the time of this writing - Q3 2008.
  9. Gavin Howlett-Foster
    Gavin Howlett-Foster avatar
    9 posts
    Member since:
    May 2005

    Posted 15 Dec 2008 Link to this post

    I've been having this problem for a while and now a colleague is also experiencing it. I did report it via a support ticket when it first started happening but Telerik couldn't re-create it.

    I have discovered that if you use the grid's smart tag to change the skin to anything else and then change it back to the one that you were originally using then the grids properties are updated in the source.

    Hope tht helps.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017