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

AutoGenerated column header problem

1 Answer 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
arijit
Top achievements
Rank 1
arijit asked on 26 Jun 2012, 12:05 PM
using 2012 Q1 trial
for AutoGenerated column, if I have column name UserName, header automatically converted to User Name. how can I stop that doing automatically. If I have IPManagement  as column name, it is converting to I P Management . very annoying.

Please help me to fix this.
Arijit Chatterjee

1 Answer, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 26 Jun 2012, 01:05 PM
Hello arijit,

protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
    {
        if (!string.IsNullOrEmpty(e.Column.UniqueName) && !string.IsNullOrEmpty(e.Column.HeaderText))
            e.Column.HeaderText = e.Column.UniqueName;
        //OR
        e.Column.HeaderText = e.Column.HeaderText.Replace(" ", "");
    }


Thanks,
Jayesh Goyani
Tags
Grid
Asked by
arijit
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or