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

How do I change HeaderText in Javascript?

1 Answer 81 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 06 Apr 2012, 04:59 PM
I am working a simple scenario, when the user changes a control, I would like to conditionally change a couple of Column HeaderText properties in a RadGrid.  I can get the HeaderText this way:

alert($find('<%=myGrid.ClientID %>').get_masterTableView().getColumnByUniqueName('Estimated_Qty').get_element().innerHTML);


But if I change the value like this:

$find('<%=myGrid.ClientID %>').get_masterTableView().getColumnByUniqueName('Estimated_Qty').get_element().innerHTML = 'Billed Qty';


The change does not show in the grid.

Is there another way of doing this?  a set_headerText() or something similar?  I can't find anything in the documentation.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 07 Apr 2012, 07:14 AM
Hello Dan,

var tableView = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
               tableView.get_columns()[0]._element.innerText = "jayesh";


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