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

Radgrid column header click event on server side

1 Answer 242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
raja
Top achievements
Rank 1
raja asked on 22 Jan 2015, 10:27 AM
Hi 

I have autogenerated columns showing dates as radgrid columns for a particular month 

eg 

                    01-Jan-15     02-Jan-15   03-Jan-15
xyz
abc
123

I should be able to click on the dates and refresh the data

Please help 

Thanks 
Raja

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Jan 2015, 09:49 AM
Hi Raja,

You can use the following approach to achieve this requirement:
<ClientEvents OnColumnClick="headerClick" />
JavaScript:
function headerClick(sender, args) {
    var cell = args.get_domEvent().target;
    if (cell && cell.tagName == "TH") {
        var value = (new Date()).toDateString();
        $(cell).text(value);
    }
}

Hope this helps. Please give it a try and let me know if it works for you.

Regards,
Eyup
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
raja
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or