In a C#.NET web page, I'm using the GridView control bound to a
ObjectDataSource and the binding and data reading works fine. It auto
generates the columns from the SelectMethod and makes the drid wide enough
to show them all.
The problem comes when I have an asp:Panel control around the grid (to
generate scrollbars if the GridView is larger than the screen size).
It always make the encompassing control as wide as the GridView.
Now, I was under the assumption that if a Table element has a width of
"100%", that applies to the browser size, not the size of the content of the
table... Maybe that is my mistake.
If I set the Panel width explicitly, it all works OK, but then when I resize
the browser window, the panel doesn't resize (of course).
Does anyone know of a simple way to size an asp:Panel element so that it is
sized to the browser size, while the contents of the panel retain their own
fixed size (thereby forcing the creation of the scrollbars)?
TIA 3 4921
I'm afraid there is no way how to use proportional size (%) and scrollbars
together:( I have tried a lot and i wasn't a bit succesfull so i have
written javascript code which recalculate the size and set fixed width of
panel
Lukas
"Andrew Hayes" <An*********@discussions.microsoft.comwrote in message
news:O4**************@TK2MSFTNGP03.phx.gbl...
In a C#.NET web page, I'm using the GridView control bound to a
ObjectDataSource and the binding and data reading works fine. It auto
generates the columns from the SelectMethod and makes the drid wide enough
to show them all.
The problem comes when I have an asp:Panel control around the grid (to
generate scrollbars if the GridView is larger than the screen size).
It always make the encompassing control as wide as the GridView.
Now, I was under the assumption that if a Table element has a width of
"100%", that applies to the browser size, not the size of the content of
the table... Maybe that is my mistake.
If I set the Panel width explicitly, it all works OK, but then when I
resize the browser window, the panel doesn't resize (of course).
Does anyone know of a simple way to size an asp:Panel element so that it
is sized to the browser size, while the contents of the panel retain their
own fixed size (thereby forcing the creation of the scrollbars)?
TIA
Being a C# developer, I know next to nothing about Javascript, so could you post the js code you used to determine what width to set the Panel to? TIA http://msdn.microsoft.com/workshop/a...lientWidth.asp
<Andrew Hayeswrote in message
news:eT**************@TK2MSFTNGP02.phx.gbl...
Being a C# developer, I know next to nothing about Javascript, so could
you post the js code you used to determine what width to set the Panel to?
TIA
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Terry Andersen |
last post by:
If I have:
struct one_{
unsigned int one_1;
unsigned short one_2;
unsigned short one_3;
};
struct two_{
unsigned int two_1;
|
by: Steve Bugden |
last post by:
Hi,
I would like to set the column widths in the ASP.NET GridView control at
runtime
I have tried the following:
http://msdn2.microsoft.com/en-us/library/ms178296.aspx
Which uses the...
|
by: Chuck |
last post by:
I'm setting the column with for a gridview (25+- columns) and have
paging turned on.
When the gridview is first displayed, the column widths are all set to
the default. But after paging to...
|
by: Jacksm |
last post by:
How can I align an asp:table columns with gridview columns (the
widths)? I have tried setting table.column(0).width =
gridview.column(0).width at page_load but it doesn't work.
Thanks in advance
|
by: Jeff |
last post by:
ASP.NET 2.0
I have a webpage which contains a GridView. I want this GridView's
HeaderTemplate to display the text "Inbox" or "Outbox"... So I think I need
to set the value in the code behind...
|
by: savajx1 |
last post by:
I need to dynamically create a set of bound fields contained in a
GridView control. I also have a single static CommandField that I can
declare in the Columns <tagof the GridView control. I have...
|
by: =?Utf-8?B?ZG1idXNv?= |
last post by:
How do I increase the default width of a gridview column (just one column,
the 10th column, named "Notes")?
In design mode, I changed the width properties of the HeaderStyle,
ControlStyle, and...
|
by: =?Utf-8?B?ZG1idXNv?= |
last post by:
How do I increase the default width of a gridview column (just one column,
the 10th column, named "Notes")?
In design mode, I changed the width properties of the HeaderStyle,
ControlStyle, and...
|
by: David C |
last post by:
I am emailing a GridView and setting its Width property to 900 before
rendering and it works great. However, when the rendering is done, I want to
reset the Width back to 95% like it was. When I...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
| |