I am using a radGrid for Customer Orders. To each order I can attach uploaded files. Because I was having difficulties with radUpload and Ajax I decided to do the uploading using a radWindow.
Two pieces of information are required to attach the uploaded documents to the Order; CustomerID and OrderID.
I assign the CustomerID to a hidden field in the ItemDataBound event of the grid.
The grid uses GridTemplateColumn with teh "form fields" laid out in this single column. A second GridTemplateColum is used for the button to attach files:
<telerik:GridTemplateColumn UniqueName="GridTemplateColumn" HeaderText="GridTemplateColumn"> |
<ItemTemplate> |
<button id="btnShowDlg" onclick="showDialog();return false;" type="submit">Click here to attach files</button> |
</ItemTemplate> |
</telerik:GridTemplateColumn> |
RadWindow manager is used to open a window passing the CustomerID as an argument from the hidden field. This works fine.
Where I run into trouble is trying to get the OrderID from the grid row on which the button was clicked. I have tried various methods using Javascript found on this site without success.
Using OnClick on the button allows me open the window and pass the CustomerID as an argument but I just can't figure out how to get the OrderID from the row whose button was clicked.
All suggestions welcome.
Declan