Thursday, July 3, 2008

Parent grid Details into child on mouse hover



Hi,
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
gv.DataBind()
End If

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

Thanks

Parth

1 comment:

Unknown said...

Hi,Parth
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
Sachin