我有一个 rad 树视图,如下所示:
<telerik:RadTreeView ID="rtreevwParvandehShakhsi" runat="server" CheckBoxes="true" TriStateCheckBoxes="False" DataSourceID="SqlDataSource1" EnableViewState="true"></telerik:RadTreeView>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString='<%$ ConnectionStrings:PigisConnectionString %>' SelectCommand="SELECT SCT_ParvandehShakhsi.*, ParvandehShakhsi_ID AS Expr1, ParvandehShakhsi_Code AS Expr2, ParvandehShakhsi_Desc AS Expr3, ParvandehShakhsi_ParentID AS Expr4, ParvandehShakhsi_Personel_ID AS Expr5 FROM SCT_ParvandehShakhsi WHERE (ParvandehShakhsi_Personel_ID = @personel_ID)">
<SelectParameters>
<asp:SessionParameter SessionField="user_personel_id" Name="personel_ID"></asp:SessionParameter>
</SelectParameters>
</asp:SqlDataSource>
<asp:Button ID="btnSubmitParvandehShakhsi" runat="server" Text="ثبت" OnClick="btnSubmitParvandehShakhsi_Click" CausesValidation="false" Font-Size="Medium" CssClass="btn green" Height="38px" Width="63px" />
我想在后面的代码中获取检查的节点。我使用下面的代码,但它没有为我得到检查的节点!问题出在哪里?
protected void btnSubmitParvandehShakhsi_Click(object sender, EventArgs e)
{
foreach (RadTreeNode tnode in rtreevwParvandehShakhsi.CheckedNodes)
{
RadWindowManager1.RadAlert("node value : " + tnode.Value, 330, 180, "پیام سیستم", null, null);
}
}