RadGrid- getting dropdownlist index using javascript

I have another issue with using RadGrid control from telerik.

I am trying to get/set the value of a GridDropDowncolumn in RadGrid using javascript (in edit mode). Could anyone suggest the appropriate javascript method to do this?

So I have the following RadGrid GridDropDownColumn:

                <telerik:GridDropDownColumn DataField="ProjectileTypeId" HeaderText="Projectile Type"
                 DataSourceID="ProjectileTypesDataSource" 
                 UniqueName="ProjectileType"
                 ListTextField="Name" ListValueField="Id" />

Now I am tring to get the current dropdown's selected index in javascript (during edit mode)

What I have at the moment is:

    var radGrid = $get("RadGrid1");
    var griddropdownlistElement = $telerik.findElement(radGrid, "ProjectileType");

However not sure of the appropriate javascript method to set/get the value.

Answers:

Answer

you have to provide a index to each dropdown in the grid and based on that index you can get the selected index, to do this you can see the following example: http://www.telerik.com/community/forums/aspnet/grid/get-dropdownlist-value-from-rad-grid.aspx

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.