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

How to hide colon

7 Answers 207 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 03 Mar 2009, 06:18 PM
I have RadGridView in my project. And one of GridTamplateColumns haven't HeaderText, but in a web site i see a colon in the place of HeaderText.
I'll be glad to hear any advise.

Thanks

7 Answers, 1 is accepted

Sort by
0
illumination
Top achievements
Rank 2
answered on 03 Mar 2009, 07:26 PM
These are my suggestion to hide the column in Radgrid:

 

            <asp:TemplateField HeaderText="DateUpdated" SortExpression="DateUpdated" visible="False">  
                <EditItemTemplate> 
                    <asp:TextBox ID="DateUpdatedEditOldTextBox" runat="server" AutoPostBack="True" ReadOnly="True" Text='<%# Bind("DateUpdated") %>' ></asp:TextBox>                      
                </EditItemTemplate> 
                <InsertItemTemplate> 
                    <asp:TextBox ID="DateUpdatedInsertTextBox" runat="server" Text='<%# Bind("DateUpdated") %>' ></asp:TextBox> 
                </InsertItemTemplate> 
                <ItemTemplate> 
                    <asp:TextBox ID="DateUpdatedEditTextBox" runat="server" AutoPostBack="True" ReadOnly="True" Text='<%# Bind("DateUpdated") %>' ></asp:TextBox> 
                </ItemTemplate> 
                <HeaderStyle Font-Bold="True" Font-Names="Arial Narrow" Font-Size="Small" ForeColor="White" /> 
            </asp:TemplateField> 
 or
                <telerik:GridBoundColumn DataField="updated_date" DataType="System.DateTime" HeaderText="updated_date" 
                    SortExpression="updated_date" UniqueName="updated_date" Visible="False">  
                </telerik:GridBoundColumn> 
I hope it helps.
0
Vladimir
Top achievements
Rank 1
answered on 03 Mar 2009, 07:30 PM
Thanks for the answer, but question in "How to hide a colon  ":"  ?", not column.
0
illumination
Top achievements
Rank 2
answered on 03 Mar 2009, 07:34 PM
Sorry about that. Would you please provide your aspx code?
0
Vladimir
Top achievements
Rank 1
answered on 03 Mar 2009, 07:47 PM
<telerik:RadGrid ID="RadGrid1" Skin="Gray" runat="server" GridLines="None" 
    AllowPaging="True" PageSize="10" Width="90%" AllowSorting="true" AutoGenerateColumns="false" 
    ShowStatusBar="true" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" 
    AllowAutomaticUpdates="true" AutoGenerateEditColumn="false" DataSourceID="ObjectDataSource1" 
    HorizontalAlign="NotSet">  
    <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle> 
    <ClientSettings> 
        <Selecting AllowRowSelect="true" /> 
    </ClientSettings> 
    <HierarchySettings ExpandTooltip="Expand" CollapseTooltip="Collapse" /> 
    <MasterTableView CommandItemDisplay="Bottom" GridLines="None" DataSourceID="ObjectDataSource1" 
        AllowCustomSorting="true" AllowPaging="true" DataKeyNames="Id,RowVersion" EditMode="EditForms">  
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="IsSocialSecurityNumberTemporary">  
                <EditItemTemplate> 
                    <dis:LocalizedCheckBox ID="CheckBox1" runat="server" Checked='<%#Eval("ChechBoxChackedValue") %>' /> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid> 

Thanks
0
illumination
Top achievements
Rank 2
answered on 03 Mar 2009, 08:33 PM
I am sorry I have tried to recreate the problem but I am unable to produce this colon as you described. I hope someone else can help. Thanks.
0
Mikael
Top achievements
Rank 1
answered on 04 May 2009, 01:18 PM
I have the same problem: In EditForms, a colon is added to the HeaderText (normally the column-name). If the HeaderText is empty, a single colon will appear.
So, the question (at least in my case) is: How do I get rid of that colon when the HeaderText is empty?

/Fredrik
0
Accepted
Sebastian
Telerik team
answered on 04 May 2009, 02:40 PM
Hi guys,

Merely set the EditFormHeaderTextFormat property of the respective column to an empty string. Thus the colon should not be rendered in the auto-generated edit form when the HeaderText property of the column is not set.

Best,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Vladimir
Top achievements
Rank 1
Answers by
illumination
Top achievements
Rank 2
Vladimir
Top achievements
Rank 1
Mikael
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or