Hi,
I have loaded the hierarchial grid with single level band using 'Manual Load on Demand' method. I have created a checkbox template column in child band (server-side) using Interface. Now, I have to handle certain functions in the check-box's checked changed event.
How shall i handle the event for check-box which is in template column either from client-side or server-side ?
Note: I am using 2010.3 version.
Hi Georgia,
I am facing a new issue. While adding a new row (parent) in WHDG, the RowAdding event gets completed successfully. But since i have to refresh the grid after the New Row added, i have re-binded the grid again in the last line of WHDG_RowAdding event.
Now i am facing the attached error in the line
WHDG.DataBind()
Could you give any idea of why this error is thrown ?
Hi Georgieva,
Thanks a lot for your reply.
The trick you gave worked for me. It took me 4 days to solve the issues i faced after implementing your idea. Now i have achieved the task. I was breaking my head with this task for about 1-1.5 months, Georgia. Thanks a lot for your quick reply.
Hello,
Thank you for your update.
You can enable page methods of the ScriptManager
http://msdn.microsoft.com/en-us/library/system.web.ui.scriptmanager.enablepagemethods.aspx
and do an Ajax call to the server in the js function.
http://geekswithblogs.net/frankw/archive/2008/03/13/asp.net-ajax-callbacks-to-web-methods-in-aspx-pages.aspx
Let me know if you need further assistance
Thanks for your reply and I tried as you said.
In client-side code, i am able to retrieve the values but i have to call a SP in DB to update certain records based on this Template column value.
So, if i call a server-side function from client-side code, again the "Collection modified" error is thrown due to the Page Postback.
I couldn't still find any solution for this issue...still breaking out my head...Could you please tell any other possible solution...as soon as possible.
Hello ,
I strongly do not recommend you setting AutoPostBackFlags when using Manual Load On Demand in WebHierarchicalDataGrid.
If you want to use similar scenario I can suggest you upgrading to v11.1 and using UnBoundCheckBoxField for the purpose.
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1?page=WebDataGrid_Columns.html
If you are using CheckBox in Itemplate and you want imediately to do certain functions,you can handle the client click event
<script type="text/javascript">
function onClick() {
alert('checked');
}
</script>
public class CustomChildItemTemplate : ITemplate
{
#region ITemplate Member
public void InstantiateIn(Control container)
CheckBox chkBox = new CheckBox();
chkBox.ID = "CheckBox1";
chkBox.EnableViewState = true;
chkBox.AutoPostBack = true;
chkBox.Attributes.Add("onClick", "return onClick()");
container.Controls.Add(chkBox);
#endregion
Let me know if you have further questions