Hi Stephen,
You can try the following code to fire the treeNodeCheckChanged event. this
onlt fires when you change the checkbox and then click on the Item.
Dim tv As New TreeView
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
End Sub
Protected Sub tv_TreeNodeCheckChanged(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.TreeNodeEventArgs)
Response.Write(e.Node.Text)
End Sub
Protected Sub GridView1_RowCreated(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowCreated
If e.Row.RowType = DataControlRowType.DataRow Then
tv = e.Row.FindControl("TreeView1")
AddHandler tv.TreeNodeCheckChanged, AddressOf
tv_TreeNodeCheckChanged
End If
End Sub
Regards,
Manish
www.ComponentOne.com
"stephen" wrote:
>
Hi All,
I have a TreeView with CheckBoxes in one of the cells of a GridView and
OnTreeNodeCheckChanged event it does nothing (basically does not postback)
but if I have a button on the page then the OnTreeNodeCheckChanged get
triggered on PostBack. Can some please help me understand why? and how to
get it to postback from GridView itself? any sample articles would be
helpful....
Thanks again,
Stephen