Hello!
I have a big problem with a very simple thing.
I have WebAsyncRefreshPanel, UltraWebGrid and EditRowTemplate. I need to set controls in template to some default values before open template window. (Now if user changes values in template and click Cancel this values will be there when user opens temlate again).
I will not describe all the way how I tried to do this. My solutions were comlicated and not perfect. May be you can offer simple way for this simple problem.
Thanks in advance.
Svetlana.
Dear Duc, I have fixed my problem with another way. Thanks for your answers. Good bye.
Ok, there seems to be some issues with the 8.2 release build. I cannot get a clientside event to trigger while the grid is inside the WARP. I don't know if you experienced this issue. However, I'ved tried this with an 8.3 release build and my events trigger correctly. I was able to get reference to the controls inside your user control everytime, using a hardcoded id, even after the grid updates:
}
I am not sure if your issue is caused by the 8.2 build but I cannot test it because of the issue I mentioned, which is most likely a bug. You should test this in the latest hotfix of 8.2 or upgrade to the 8.3 version. Further, you can contact developer support to verify that your issue is caused by a bug. I have searched the current known issues and did not find anything on this.
I use NetAdvantage for .NET 2008 vol. 2 CLR 3.5
Version: 8.2.20082.1000
My template control has such structure:
<asp:Panel > <table> <tr> <td> <Controls:TextBox ID="tbShiftTypeName" runat="server" columnKey="Name" Width="100%" /> </td> </tr> <tr> <td> <Controls:DropDownList ID="ddlColor" runat="server" columnKey="ColorName" /> </td> </tr> <tr> <td> <div id="divColor" style="width: 100%; height: 3px; padding: 0px;" runat="server" columnKey="Color"/> </td> </tr> </table> <div > <input id="OkBtn" /> <input id="CancelBtn"/> </div></asp:Panel> And I need ddlColor and divColor to be fill with some default values.
But problem is : they have another Ids after WARP postback.
I've tried this and I get the same Id everytime the grid posts back inside the WARP.
What version of NetAdvantage including the build number are you using? What version CLR?
And what exactly is the control you have inside the template? Make sure nothing is changing when you implement your code.
Hello.
First time I have such id - UltraWebGrid1$ctl00$Control1, but when I click OK in temlate it is the update panel post back. And after it I have such id - UltraWebGrid1$ctl04$Control1(Another id!). So I can not use hard coded ids. That's why I need to write beforeRowTemplateOpen() in the event handler - I need to put correct Ids in it. Could you please make an example for my problem - and you will see what I'm talking about.