Setting a panel's height to the height of it's parent control

How do I go about getting a panel to be the same height and width of the cell of the GridView or table that it is in?  I was under the impression that if you set the height of the panel to be 100%, then it would become 100% of the parent control.  In this case, I would assume that the parent control would be the cell that it is housed in.

When I do this, it makes my entire GridView or table (I've tried both) grow in heighth by a dramatic amount.  I just want the panel to be the same height as the cell when they are each at their minimum height (based on the lines of text inside of the cell).

I also do not want to have to explicity declare the height of anything by pixels.  I'm trying to make it all appear dynamically based on the contents of a dataset that is returned.  Since I'm not declaring any heights, I can't say panel.height = cell.height because there is no value in cell.height.  I just want the panel to be same height as the "natural" height of the cell.

Any ideas?

0
msufreeman
10/20/2008 7:23:01 PM
asp.net.client-side 24353 articles. 1 followers. Follow

2 Replies
865 Views

Similar Articles

[PageSpeed] 45

 I belive that the child will only do 100% height if the parent has a height set. So set the parent height to 100% and see if it makes a difference.

Eric


Pascarello.com | Twitter epascarello | LinkedIn
0
A1ien51
10/20/2008 7:45:15 PM

A1ien51:

 I belive that the child will only do 100% height if the parent has a height set. So set the parent height to 100% and see if it makes a difference.

Eric

Thanks for the tip Eric. Unfortunately, this provides the same results as setting the panel by itself to 100%.

0
msufreeman
10/20/2008 8:48:47 PM
Reply:

Similar Artilces:

TabContainer's height doesn't respecting child GridView's height
Well, it's not that complex:I have a TabContainer with 4 tabs. In the first 2 I have different GridViews, but I'm actually only working with the first one.There's no UpdatePanel, no crazy situations, it's a simple GridView with an associated ObjectDataSource, wich will DataBind the GridView in every PostBack (yes, normal, simple, server-side PostBack) based on the value of a TextBox. And this value is only changed on the click of a ImageButton. All of this happens on the Server side.BUT, in the initial load of the page, the GridView is empty, as is the TabPanel. After the fir...

Setting a panel control's visibility and it's affect in nested controls.
I am trying to debug a page using the panel control.  The code in the final submission of the form has logic to get data from a dropdown based on the control's visibility.  If the control's visibility is set to true, the the data is retrieved and sent to the database.The problem appears to be the dropdown control's visibility is set to false when it should not.  The dropdown is nested in a panel control.  While doing a trace, it appears when a panel control's visibility is set to false, the visibility for all controls nested under this panel are set to false as well.You'r...

superreview granted: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293637] reflow captions with unconstrained height
Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> has granted Robert O'Callahan (:roc) <roc@ocallahan.org>'s request for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293637: reflow captions with unconstrained height https://bugzilla.mozilla.org/attachment.cgi?id=293637&action=edit ...

superreview requested: [Bug 408749] "ASSERTION: A block's child' s next in flow's parent must be a block" with -moz-column, table stuff : [ Attachment 293637] reflow captions with unconstrained height
Robert O'Callahan (:roc) <roc@ocallahan.org> has asked Boris Zbarsky (reviews very slow until spring) <bzbarsky@mit.edu> for superreview: Bug 408749: "ASSERTION: A block's child's next in flow's parent must be a block" with -moz-column, table stuff https://bugzilla.mozilla.org/show_bug.cgi?id=408749 Attachment 293637: reflow captions with unconstrained height https://bugzilla.mozilla.org/attachment.cgi?id=293637&action=edit ------- Additional Comments from Robert O'Callahan (:roc) <roc@ocallahan.org> Fixes the assertion independen...

Is there anyway to set Gridview's Header and cell's height?
Is there anyway to set Gridview's Header and cell's height? thanks yang Friend, probably this can be done like this 1) right click the GridView and choose the View CSS sample command.2) copy the css code from this file to your own CSS file3) change styles as shown below: .dxgvInlineEditRow,.dxgvDataRow{     height:30px;} .dxgvHeader {     cursor: pointer;     white-space: nowrap;     padding: 4px 6px 5px 6px;     border: Solid 1px #9F9F9F;  &n...

'Some character(s) could not be converted into client's character set....'
All-- Received this error from a PB 7.0.3 app running against Sybase 12. One of the suggested workarounds is to run sp_configure against Sybase to enable Unicode. (We are not at all in favor of doing that.) The other alternative is to translate our ANSI-codepage app into Powerbuilder for Unicode. What *is* PowerBuilder for Unicode, and how do we get our hands on it? Is it an add-on, or is it bundled with the ANSI version? TIA, Matt Seltzer IT Tech Analyst, EMI Recorded Music, NA Matt.Seltzer@emicap.com ...

Can a User Control's Page_Load retrieve a value set in the parent's Page_Load?
I want to use a control to perform a specific task, but I want it to vary based on the page it is on. I was hoping to set a value in the Page_Load event of the Parent, and have that value retrieved by the Page_Load event of the user control. I am not sure what order these events fire in, Can I be certain that the parent event will fire first?...

Setting the Client's character set to the Server's default
Is there a configuration setting within the server that would set the default character set for the client side? We are on NT4.0 using ASE v12.0. Right now the client seems to default to the locale.dat file settings. At this time we only use one character set (cp850) and I need to be able to eliminate the use of files on the client side and rely on the server setup. I have looked in the product manuals, but do not find much on the client side. TIA "Shawn Simmons" <ssimmons@meddatsys.com> wrote: > Is there a configuration setting within the server that wou...

Label control's text doesn't appear to be set (in the page which has a user control )when trying to update the text property in the FormView's ItemUpdated event
Hi There,I have a user control which hosts a formview control, gridview control and a label control. The grid view is usedto show rows in the DB and when clicked to edit each row, a form view opens up in edit mode with that particular row info. So I have nothing in the item template.My first question is..is it mandatory to have smth in the itemtemplate of the form view.I have controls in edititemtemplate and insertitemtemplate.When a particular row is edited, I would like to show a status msg showing that the row has been updated.For this, I use the ItemUpdated event of the formview and try ...

Can I hide a user control's control from the hosting page's client script?
Okay, my previous question was not unswered and I guess you can't hide a control's panel with server code then show it with client code. Now this is what I try to do: on the hosting page's onload event, call a function to hide the user control's penal. Here is the deal: the user control was looped as many times as data required. So the penals will be name mypanel1, my panel2, etc... that is not even a problem if I know if the following is true: * Do all server codes finish running before the page get sent back to the client? Say the database gave me 5 penals, I can then determine how...

OLE Control
I'm attempting to load a .bmp image into an OLE object using PowerBuilder 11.1. The OLE ActiveX is AddFlow5 and I am using it to graphically represent links between entities - people, organisations, addresses, vehicles, telephones, etc. Documentation for AddFlow5 gives an example in VB script to load the relevant 'picture' into a node, ie, SET node.picture = LOADPICTURE("C:\images\person.bmp"). I cannot find a suitable equivalent in PB 11 to either 'SET' or to 'LOADPICTURE' The developer of AddFlow suggested I try: OLEObject uo uo = C...

Replace 1's and 0's in a gridview column with Yes's and No's
Is it possible to change the display of a column in a gridview to show a Yes for all 1's and a No for 0's that display in a particular column of a gridview bound to a database?  If so, can someone share the way with me?  I am using ASP.NET 2.0 with VB Code Behind.  Thanks One way you can do is thrrough  CASE in your select statement: Select YesNoColumn= CASE yourColumn WHEN 1 THEN 'Yes' WHEN 0 THEN 'No' ELSE '' END FROM YourtableLimno <Columns>     <asp:TemplateField HeaderText="yourHeader" SortExpression="yourDataField"> ...

It's Linux !? No, it's BSD ! No, no, it's...
kFreeBSD http://wiki.debian.org/Debian_GNU/kFreeBSD a Debian distro using the FreeBSD kernel ! ObiWan wrote: > kFreeBSD > > http://wiki.debian.org/Debian_GNU/kFreeBSD > > a Debian distro using the FreeBSD kernel ! Why use a BSD kernel? I hope the reason is more than, just because they can. http://wiki.debian.org/Debian_GNU/kFreeBSD_why It's easy to understand why the would want to use Debian packages. :) -- Jimmy Johnson Registered Linux User #380263 >> kFreeBSD >> >> http://wiki.debian.org/Debian_GNU/kFreeBSD >> ...

how to control a RadioButtonList's Listitem's text show according database's field
Hi my page has a repeater control,in repeater has a RadioButtonList control now i want to let the RadioButtonList has four Listitem,every Listitem's text is a database's field so the listitem can show dynamic according every record how can i work out my problem thanks a lot  hello dearbound your RadioButtonList to database if i m not clear fell free 4 replySatyabrat SinghB.E.(C.Sc.)Web developer Livetek Solution Dont forget to click "Mark as Answer" on the post that helped you. yes.i bound the radiobuttonlist to a dataset but how to display the ...

Web resources about - Setting a panel's height to the height of it's parent control - asp.net.client-side

Resources last updated: 12/30/2015 12:15:02 PM