Thursday, July 3, 2008

Parent grid Details into child on mouse hover

some days back i was wondering that how gmail has created detail of the sender where i am able to see his/her Pics and details with other options like sending mails ...etc

Thanks to AjaxToolkit, i was able to achive the same and code snippet is as follows:

and then simple "OnRowdatabound" event will do the whole trick for us......

If e.Row.RowType = DataControlRowType.DataRow Then
Dim gv As GridView = e.Row.FindControl("GridView2")
Dim dbSrc As New SqlDataSource
dbSrc.ConnectionString = ConfigurationManager.ConnectionStrings("ProjectServer_ReportingConnectionString3").ConnectionString
dbSrc.SelectCommand = "SELECT * FROM projectserver_reporting.dbo.customdetailsuserview WHERE projectname= '" & _
e.Row.DataItem("projectname").ToString & "'"
gv.DataSource = dbSrc
End If

so using above simple method i have achive the effect like gmail............



1 comment:

sachin said...

Your Post On Parent-Child GridView Control is Really very Helpful and SelfExplanatory,no need to more changes in it while implementing. I hope in future also, you'll post some more techie post like this..
Thanks A Lot