Hi,
1st: How can I bind a dropdown in rowedittemplate with different data for different row? For Example: For row 1, dropdown will bind some data. and for row 2 dropdown will bind different data. Its depend on some criteria. How can I do this? is there any event? I know that OnInitializeLayout dropdownlist can bind but i need it for each row because each time it will bind data dependng on some criteria from row.
2nd: How can i catch event of dropdownlist in rowedittemplate?
thanks in advance
Mamun
PsychoTeddy is correct. The reason is because, when you trigger a postback in trying to populate the dropdown on the template, you're essentially canceling the edit. It's not possible to open the row edit template, cause a postback to perform some server-side processing, then return with the same row edit template open again when the postback completes.
I don't think you could do the binding.. Instead i'm thinking you could try something a little bit more complex like handling the BeforeEnterEditMode client side event and then, if the cell is the one with drop down as editor, do an Ajax call and insert the data retrieved using javascript.
Not sure if the idea is well explained but hope you can figure something out with this guidance.