0
votes

enter image description hereIn my Kendo grid I want to find the row number where i am making selection in dropdown. So that I cauld change the datepicker editable and focused.

Attaching pic for reference.

enter image description here

This is the code for kendo field

  {
                          field: "md_of_iss",
                          title: "Mode of issue",
                          template: "#= modeName(md_of_iss) #",
                          editor: function (container) {              
                       var input = $('<input id="md_of_iss" name="md_of_iss">');
                              input.appendTo(container);
                              input.kendoDropDownList({
                                  dataTextField: "rsrc_Description",
                                  dataValueField: "md_of_iss",
                                  dataSource: array,
                                  change: function (e) {

                                  }

                              }).appendTo(container);
                          },

                      },
1
The mode of issue column in white background is a dropdown, it becomes dropdown when hovered, see this answer for reference stackoverflow.com/questions/36840905/…Rajdeep
Ok, and when you want to get the row number, in which event? Change of the dropdown, hover...?DontVoteMeDown
yes, on change event of dropdownRajdeep
And your dropdown is created with the function categoryDropDownEditor as you posted on the other question ?DontVoteMeDown
this function CategoryDropDownEditor is being used in another page, i have just a similar functionRajdeep

1 Answers

1
votes

Try this:

change: function (e) {
    var rowIndex = $(this).closest("tr").index();
}.bind(input)

Working demo

Just bind the input to the change event context to use it to find the current tr index with index().