I have designed a collapsible nested gridview project using this article as a reference Collapsible Nested GridView with Paging using ASP.Net. I am trying to modify the code to collapse a gridview when another gridview is expanded so that only one nested gridview will be open at a time.
Therefore, it is true that a set of rows in a nested gridview is tied to a specific row in its master gridview, the question is does the child gridview know which set it's connected to or does it's master know if a childset has been selected?
Anyway, on the inner grid I am allowing the user to delete rows.However when the page posts back I am unable to reopen the row that was opened. I have tried the RegisterStartupScript, etc. in the code behind but am unable to trigger the event. I have tried the code behind to find the row that is expanded but that was unsuccessful also.How can I have the row expanded when the page posts back?
In Nested Grid, we get a '+' sign. The problem is that '+' sign appears all times, even if there are no child records for that row. 1. Can we enable/disable OR Hide/Unhide '+' sign. depending on if child rows exits.2. OR alteast we can put some bgcolor indicating to user that this record do have child rows. Without any indicator user may feel quite annoying to click on '+' sign and nothing happens.
I want to populate the search results in grid. The results should be grouped based on condition. I mean if i am searching for name called Osama laden, all the names containing Osama be grouped(+) and Laden as well. I should get the count side to the (+) button. When i click on + button the results should expand and when i click on(-) the results should collapse.
I am looking for a expand/collapse script for a grid view. But after searching around, seems like all sample code are for datagrid instead of grid view. And because there are differences between properties of gridview and datagrid, I can just implement it. Does anyone has any reference for grid view?
I have a nested gridview dynamically added. It seems I resolved all issues with the loading this control on a parent page along with other controls and I can trigger the edit of the first level - the master part of the gridview. However, I cannot trigger the edit on a child gridview.
The master and the child gridviews have objectdatasources in a markup but I have to do the additional data binding after the loading the control on the parent page (see the code below). I'm doing that additional data binding only for the master gridview that is working fine and shows the data for the master and the child gridviews. When I click the Edit button on the master gridview it shows text boxes for the editing but when I click the Edit button on the child gridview it's doing nothing and moreover the editing mode for the master gridview is going back to the initial stage (labels).
I was trying to trigger it throughuse the registering the event:
I have a Master/Slave GrisViews or some say Parent/Child GridViews.
i want to set my button visible=false in the child gridview if data is not exist.
i try this:
Protected Sub gv_child_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) If e.Row.RowType = DataControlRowType.DataRow Then e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#FFC080';") e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='';") Dim lblitemid As Label = CType(e.Row.Cells(1).Controls(1), Label) Dim lblphoto As Label = CType(e.Row.Cells(11).Controls(1), Label)
but it does not working. the button is still there.