Filtering problem at openaccesslinqdatasource with my treeview's Checkedvalues(multiple selection).

2 posts, 0 answers
  1. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 23 Jan 2014 Link to this post

    Hi. first i am sorry because of the this long message.
    there is a treeview,  button and listview. when i hit button listview's datasource should be filtered with treeview checked values.

     treeviewKat
    (
    CheckBoxes=true,
    CheckChildNodes=true,
    TriStateCheckBoxes=true
    )
    and  I am filtering an OpenAccessLinqDataSource with this treeviewKat's checked values.

    How can i filter to OpenAccessLinqDataSource with treeviewKat's CheckedValues (multiple values).
     
    I tried to add every node.value in the nodecollections of checked nodes to linqdatasource. but i cant get result.

    Taking node.value of treeview is correct. i can see true added OADLSSoruTV.whereparameters, but i cant see listview update (lvSoruTV).

    code-behind below:
    protected void RadButton2_Click(object sender, EventArgs e)
            {
                OADLSSoruTV.WhereParameters.Clear();
      
                IList<RadTreeNode> nodeCollection =
                      treeviewKat.CheckedNodes;

                foreach (RadTreeNode node in nodeCollection)
                {
                   
                    OADLSSoruTV.Where =
                            "KategoriId ==Int32?(@KategoriId)";

                    OADLSSoruTV.WhereParameters.Add
                            (
                              "KategoriId",

    TypeCode.Int32,
    node.Value.ToString()
                            );
         }
                    OADLSSoruTV.DataBind();
    }

    Adding parameter OADSSoruTV is correct because i tried same thing with dropdownlist instead of treeview and it is working good.


  2. Cuneyt
    Cuneyt avatar
    36 posts
    Member since:
    Dec 2011

    Posted 24 Jan 2014 Link to this post

    the problem solve thanks.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top