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

[Solved] get grid's name client side

0 Answers 26 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gerard
Top achievements
Rank 1
Gerard asked on 06 Oct 2011, 11:31 AM
Hello,

I want to dynamically display grid's (based on user's choices). My grid's are binded in Ajax mode to the same action. They are dynamically named and a want to retrieve the grid's name on the client event (ondatabinding).
Something like that :


@(Html.Telerik().Grid<MemberManager.Areas.Members.Models.EditableMemberData>()
        .Name("MembersGrid" + id)
         //The content...
        .ClientEvents(events => events
                                .OnDataBound("dataBinding")
                                 )

<script type="text/javascript">
function dataBinding(args) {
        var grid = $(this).data('tGrid');
         //Something to get the grid's name
    }
</script>

Is there a simple way to do that?
Thanks.




    
Tags
Grid
Asked by
Gerard
Top achievements
Rank 1
Share this question
or