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.
Hello tct_rani_1106 ,
Thank you for posting in our forums.
I recommend you handling the InitializeRow event of the WebHierarchicalDataGrid.
You can check the Level of the row and if it is in the child band you can find the CheckBox control
and subscribe it for CheckedChanged event.
Do you have claims if it should be handled on the server or the client side?
Hope hearing from you.
Hi Georgieva,
As you said, i tried to include addHandler in the Webhierarchialdatagrid's InitializeRow event. Even then the event is not triggered.
If i give the AutoPostBack= true for the checkbox,
ERROR: "PageRequestManager: Collection was modified" is displayed.
This is because i have binded the Grid in each postback.
I couldn't find any solution still....could you provide a 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
Hi Georgia,
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,
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
I have to provide a download option in Webdatagrid to download the files from Azure Blob. How shall i create image column in WebDataGrid ?
Does it should be created as template column as i did for Checkbox ? if so, the function that is called using pagemethods will not allow me to access the azure blob.
How shall i proceed in this case ?
By default EnableAjax= true, and it should enable it if you want to implement manual load on demand.
I recommend you installing the latest SR and if you still experience the issue , I will appreciate an isolated sample reproducing the issue.
After a long time struggle i think i found out the cause for the above reason.
If I set EnableAjax="true" for the WHDG i am facing the following error while adding new row
If I remove the Tag EnableAjax="true", I am facing the folowing error while expanding the parent rows.
How shall i solve out and achieve both the cases ?
any suggestions please ?
The code was working fine.
All of a sudden this error comes and after that i couldn't execute the solution. And now in addition, I am facing the following error while i expand the parent row. I didn't make any change in the Grid Column structure. I couldn't even trace out the reason of this error because the entire WHDG_RowIslandsPopulating code block executes completely without any issues. After the End-Sub line i am getting this JScript error message.
Note: I am using 2010.3 Version controls. The WHDG_RowIslandsPopulating event is triggered twice for a same record when i expand a row. Is this is right ?
Do you think this may be due to Service Release 2010.3 ?
Do you have the latest service releaseof version 11.1 installed ?
http://forums.infragistics.com/forums/p/58403/297249.aspx#297249
If you still experience the issue after that could you please provide us with an isolated sample reproducing the issue?