Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

invisible control leaves space behind

Hi Experts,
I have a grid where I have a hidden panel inside one column in every row. I am switching the visibity of panel on/off on a click of a button in each row. It's going fine, but when I switch the visibility of panel to false.......it leaves blank space where panel was displayed.... is there any way using which I can remove the panel as well as the space utilized by that panel.

thanks!
0
tech1guy
Asked:
tech1guy
1 Solution
 
RamuncikasCommented:
To solve this problem we will need:
 - code where you show/hide your panel
 - aspx page's code (part with your template column with panel and other controls if any)
 - HTML code from a browser (page source) (part where space is reflected)

I walkaround could be trimming cell's text if panel is not visible using ItemDatabound event. Like:
If Not CType(MyGrid.Rows(e.RowIndex).Cells(MyColumnIndex).FindControl("myPanel"), Panel).Visible Then
   MyGrid.Rows(e.RowIndex).Cells(MyColumnIndex).Text = String.Empty
End If
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now