Hi,
I am using templates for row editing.The mark-up is something like this. The question is how can I get access to shiftsTemplate control on server side.
<ig:RowEditingTemplate Enabled="true"> <Template > <controls:ShiftTemplate ID="shiftsTemplate" runat="server"/> </Template> </ig:RowEditingTemplate>
I've tried following:
var mycontrol = (ShiftTemplate)m_grid.Behaviors.EditingCore.Behaviors.RowEditTemplate.Template ;
but that doesn't work.
Please help.
I've tried following this recomendation, but they doesn't work either:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.1/CLR3.5/html/WebDataGrid_Binding_Controls_in_Row_Editing_Template.html
Hello Alexander;
I was able to see that the code I have suggested finds the user control. I am working with development on this functionality. I will update you further by the end of the day tomorrow with more details on this.
Hi, Bhadresh!
I've tried the suggested approach, but it doesn't work.
This property this.WebHierarchicalDataGrid1.GridView.TemplateControl for some reasons returns me the UserControl where my WebHierarchicalDataGrid is located.
Are you sure your approach is working? If yes I'll prepare a small sample for you that demonstrates the problem.
Alexander
Template is simply the ITemplate which defines what appears in edit template. In order to get template you need to find it off of GridView. The below line of code will finds template:
TemplateControl templ = (TemplateControl)this.WebHierarchicalDataGrid1.GridView.TemplateControl;
I hope this helps.