コード例 #1
0
        protected void Label_PreRender(object sender, EventArgs e)
        {
            Label         label            = (Label)sender;
            DynamicFilter dynamicFilter    = (DynamicFilter)label.FindControl("DynamicFilter");
            QueryableFilterUserControl fuc = dynamicFilter.FilterTemplate as QueryableFilterUserControl;

            if (fuc != null && fuc.FilterControl != null)
            {
                label.AssociatedControlID = fuc.FilterControl.GetUniqueIDRelativeTo(label);
            }
        }
コード例 #2
0
ファイル: list.aspx.cs プロジェクト: yashbajra/samples
    // Set the filter controls.
    protected void Label_PreRender(object sender, EventArgs e)
    {
        Label label = (Label)sender;

        // Customize the filter label in case of custom enumerator.
        if (label.Text == "OrderQty")
        {
            label.Text = "Custom Enumeration " + label.Text;
        }

        // Get the current filter control from the ones contained by
        // the QueryableFilterRepeater control.
        DynamicFilter dynamicFilter = (DynamicFilter)label.FindControl("DynamicFilter");

        // Assign the label name for the current filter.
        QueryableFilterUserControl fuc = dynamicFilter.FilterTemplate as QueryableFilterUserControl;

        if (fuc != null && fuc.FilterControl != null)
        {
            label.AssociatedControlID = fuc.FilterControl.GetUniqueIDRelativeTo(label);
        }
    }