Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
585
WebDataTree - NodeTemplates and Template event handling
posted

Hi everyone,

I am using a WebDataTree to provide filtering options for a WebDataGrid on the same page. Therefore I need a couple of templates for the various types of filters that I've got (by text, DatePicker, DropDown etc).

I have created a few templates, but the controls inside the template are always shown in the second line of the node (screenshot and code snippet attached below). How can I achieve the controls being displayed in the same row as my expansion indicator.

Furthermore, in another template I have got a CheckBox included. I have read dozens of posts on the issue but none of them helped me in any way. The CheckedChanged-Event just won't fire server side. Maybe i missed out on s,th.

Any help is much appreciated,

Regards

-----

<ig:WebDataTree ID="wdtFilterTree" runat="server" Height="99%" Width="99%" DataSourceID="whdsFilterTree" OnPreRender="wdtFilterTree_PreRender" SelectionType="None">
<Templates>
<ig:ItemTemplate ID="wdtFilterTreeTemplate1" runat="server" TemplateID="FilterItemTemplate">
<Template>
<asp:CheckBox ID="cbxFilterItem" runat="server" AutoPostBack="true" OnCheckedChanged="cbxFilterItem_CheckedChanged" />
<asp:Label ID="Label1" runat="server"
Text="<%# ((BDEManager.Web.Filter.FilterItemBase)((WebHierarchyData)Container.DataItem).Item).DisplayName %>" />
</Template>
</ig:ItemTemplate>
<ig:ItemTemplate ID="wdtFilterTreeTemplate2" runat="server" TemplateID="DatePickTemplate">
<Template>
<igsch:WebCalendarView ID="WebCalendarView1" runat="server" WebScheduleInfoID="wsiFilter" >
</igsch:WebCalendarView>
<igsch:WebScheduleInfo ID="wsiFilter" runat="server" />
</Template>
</ig:ItemTemplate>
</Templates>
<DataBindings>
<ig:DataTreeNodeBinding DataMember="odsAuthCaptionList_DefaultView" TextField="DisplayName" ValueField="Id" />
<ig:DataTreeNodeBinding DataMember="odsAuthItemList_DefaultView" TextField="DisplayName" ValueField="Id" />
<ig:DataTreeNodeBinding DataMember="odsDepartmentCaptionList_DefaultView" TextField="DisplayName" ValueField="Id" />
<ig:DataTreeNodeBinding DataMember="odsDepartmentItemList_DefaultView" TextField="DisplayName" ValueField="Id" />
<ig:DataTreeNodeBinding DataMember="odsStatusCaptionList_DefaultView" TextField="DisplayName" ValueField="Id" />
<ig:DataTreeNodeBinding DataMember="odsStatusItemList_DefaultView" TextField="DisplayName" ValueField="Id" />
</DataBindings>
</ig:WebDataTree>

-----

protected void wdtFilterTree_ItemCommand(object sender, EventArgs e)
{

}

protected void cbxFilterItem_CheckedChanged(object sender, EventArgs e)
{

}

Both of these events won't fire, although I am aware that CheckBox probably is not firing ItemCommand-Event.

Below you can see the surplus space in the first line of the templated nodes:

Parents
  • 585
    posted

    It seems that the broken events issue is being caused by some package update which has been applied in a recent changeset (Craig's Utility Library v3.2.0033). I'll have to see how I can get rid of that.

    Still, the empty extra line on the templates is still nagging me, so if anyone could give me a hint...

    Regards,

Reply Children
No Data