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

Passing the id of selected node to sqldatasource

1 Answer 68 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Canis Lupus
Top achievements
Rank 1
Canis Lupus asked on 10 Jan 2011, 01:48 PM
I have a simple category TreeView control with recID, parentID, categoryNames as datafieldID, dataFieldParentID, dataTextField respectively.

I also have a gridview control, whose datasource control gets recID value from TreeView control in order to populate the GridView control.

Datasource is as follow:

<asp:SqlDataSource ID="DS_catAttribute" runat="server"
        ConnectionString="<%$ ConnectionStrings:myCS %>"
        SelectCommand="sp_paramCatAttributeSelectGV"
        SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="categoryTV" Name="catID"
                PropertyName="SelectedValue" Type="String" />
        </SelectParameters>
</asp:SqlDataSource>

SelectedValue property for categoryTV (treeview control) returns categoryName instead of recID.

How can I get recID to pass it my store procedure?

Thank you

1 Answer, 1 is accepted

Sort by
0
Canis Lupus
Top achievements
Rank 1
answered on 10 Jan 2011, 02:13 PM
solved ty
Tags
TreeView
Asked by
Canis Lupus
Top achievements
Rank 1
Answers by
Canis Lupus
Top achievements
Rank 1
Share this question
or