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

Column HeaderText

2 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rahul Khinvasara
Top achievements
Rank 1
Rahul Khinvasara asked on 08 Oct 2009, 07:35 AM
Hi

I am using Q2 2009 version of Telerik. I have a grid control. I want coulmn Header Text when i click on particular column  through JavaScript. i tried to get the value with  innerText and innerHTML.but  i think it is not supporting.

Please give me the solutions ASAP

Regards

Rahul

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Oct 2009, 09:00 AM
Hi Rahul,

I tried the following code to access the header text  in the ColumnClick client event as shown below and it worked. Check out this code:
aspx:
<ClientSettings>                 
     <ClientEvents OnColumnClick="ColumnClick"/>                     
</ClientSettings>      

js:
 function ColumnClick(sender,args) 
    { 
      var headertext = args.get_gridColumn().get_element().innerText; 
      alert(headertext); 
    } 

Thanks
Shinu.
0
Rahul Khinvasara
Top achievements
Rank 1
answered on 09 Oct 2009, 11:05 AM
Hi,

Thanks its working.

Regards

Rahul
Tags
Grid
Asked by
Rahul Khinvasara
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rahul Khinvasara
Top achievements
Rank 1
Share this question
or