Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 1 of 1

Thread: How to add NickName column to customer list in admin area?

  1. #1
    Drebbin is offline Junior Member
    Join Date
    Oct 2011
    Posts
    1

    Default How to add NickName column to customer list in admin area?

    Hi all,

    I need help with adding a NickName column to the customer list in the admin area.

    So far I've added NickName to admin/controls/customergrid.ascx line 99
    Code:
    ...atingItemStyle CssClass="config_alternating_item" />
    <Columns>
    
    <telerik:GridTemplateColumn HeaderText="Account Number" UniqueName="NickName">
    <ItemTemplate>
    <asp:Literal ID="ltNickName" runat="server" />
    </ItemTemplate>
    </telerik:GridTemplateColumn>
    
    <telerik:GridTemplateColumn UniqueName="IDColumn" HeaderText="ID" SortExpression="CustomerID">
    <ItemTemplate>
    <asp:LinkButton ID="lbtnID" runat="...
    ...and to admin/controls/customergrid.ascx.cs liine 328
    Code:
    ...r gc = gi.DataItem as GridCustomer;
    
    if (gc != null)
    {
    // account number (nick name) column
    Literal ltNickName = gi.FindControl<Literal>("ltNickName");
    ltNickName.Text = gc.BillingAddress.NickName;
    
    // Customer ID column
    LinkButton lbtnID = gi.FindControl<LinkButton>("lbtnID");
    lbtnID.Text = gc....
    Current code adds a column, but no NickName values display in it. From what I can make out, it's this little bugga that's causing all the problems:
    ltNickName.Text = gc.BillingAddress.NickName; Probably because I'm guessing it.

    Any help appreciated.
    Last edited by Drebbin; 11-06-2012 at 02:20 AM.