private Int32 FilterNodeState(String forNodeValue)
        {
            Telerik.Web.UI.RadTreeView filterTreeView = (Telerik.Web.UI.RadTreeView)BasicFiltersSelection.Items[0].FindControl("BasicFiltersTreeView");

            if (filterTreeView == null)
            {
                return(1);
            }


            Int32 filterState = 1;

            Telerik.Web.UI.RadTreeNode filterNode;

            filterNode = filterTreeView.FindNodeByValue(forNodeValue);


            if (filterNode.Nodes.Count == 2)
            {
                Telerik.Web.UI.RadTreeNode filterValue1 = filterNode.Nodes[0];

                Telerik.Web.UI.RadTreeNode filterValue2 = filterNode.Nodes[1];

                filterState = Convert.ToInt32(filterValue1.Checked) + Convert.ToInt32(filterValue2.Checked);
            }

            else
            {
                filterState = Convert.ToInt32(filterNode.Checked);
            }


            return(filterState);
        }
        protected void BasicFiltersTreeView_OnNodeCheck(Object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
            Telerik.Web.UI.RadTreeNode filterNode = e.Node;

            Telerik.Web.UI.RadTreeView filterTreeView = (Telerik.Web.UI.RadTreeView)BasicFiltersSelection.Items[0].FindControl("BasicFiltersTreeView");

            if (filterTreeView == null)
            {
                return;
            }

            if (filterNode.Value.Contains("Value"))
            {
                return;
            }


            if (filterNode.Nodes.Count == 2)
            {
                Telerik.Web.UI.RadTreeNode filterValue1 = filterNode.Nodes[0];

                Telerik.Web.UI.RadTreeNode filterValue2 = filterNode.Nodes[1];

                Int32 filterState = Convert.ToInt32(filterValue1.Checked) + Convert.ToInt32(filterValue2.Checked);


                switch ((filterState + 1))
                {
                case 1:      // MOVE FROM NO SELECTED TO INDETERMINATE

                    filterTreeView.FindNodeByValue(filterValue1.Value).Checked = true;

                    filterTreeView.FindNodeByValue(filterValue2.Value).Checked = false;

                    break;

                case 2:      // MOVE FROM INDETERMINATE TO SELECTED

                    filterTreeView.FindNodeByValue(filterValue1.Value).Checked = true;

                    filterTreeView.FindNodeByValue(filterValue2.Value).Checked = true;

                    break;

                case 3:      // MOVE FROM SELECTED TO UNSELECTED

                    filterTreeView.FindNodeByValue(filterValue1.Value).Checked = false;

                    filterTreeView.FindNodeByValue(filterValue2.Value).Checked = false;

                    break;
                }
            }

            WorkQueueItemsGrid.Rebind();

            return;
        }