This is a migrated thread and some comments may be shown as answers.

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

1 Answer 56 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Cuneyt
Top achievements
Rank 1
Cuneyt asked on 23 Jan 2014, 11:45 AM
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.


1 Answer, 1 is accepted

Sort by
0
Cuneyt
Top achievements
Rank 1
answered on 24 Jan 2014, 06:30 AM
the problem solve thanks.
Tags
TreeView
Asked by
Cuneyt
Top achievements
Rank 1
Answers by
Cuneyt
Top achievements
Rank 1
Share this question
or