Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 20th, 2005, 09:10 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default .net datagrid

Hi,
I have created a datagrid.
I would like to know how can I make the item area bigger even if the datasource it only has 2 rows of data.

Example, the are where the data is display is big as the number of rows exist on the datasource by I would like it bigger even if it only return 1 row.

Thanks
 
Old May 20th, 2005, 09:20 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You could place the grid inside of an asp:panel (<div> element) that has an explicitly set height. This will force it to take up whitespace on the page despite the contents. Keep in mind however that this will also cause the grid to be clipped if it exceeds the height of the asp:panel/<div>.

-Peter
 
Old May 20th, 2005, 09:23 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

but what I want is the are where the data is displayed bigger

Thanks

 
Old May 20th, 2005, 12:46 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

This is what my example will do. You need to provide explicit dimensions to an HTML element if you want it to take up more area than it would normally based on the size of the elements in its inner html.

-Peter
 
Old May 23rd, 2005, 08:59 AM
Authorized User
 
Join Date: Oct 2003
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes it works thanks.
Another think, when I select an item from the datagrid which is at the bottom of the div, the div it scroll back to the top, how can I keep the positionh of the DIV on the position of the item selected?

Thanks

 
Old May 24th, 2005, 06:53 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

http://p2p.wrox.com/topic.asp?TOPIC_ID=30903

Regards
Ganesh





Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET 2 DataGrid w/DataView batlou VS.NET 2002/2003 0 October 25th, 2006 11:40 AM
vb.net asp.net DataGrid krantips VS.NET 2002/2003 0 June 28th, 2006 01:22 AM
Datagrid in Vb.Net R_Ramya Pro VB Databases 0 January 21st, 2006 12:20 AM
DataGrid in VB.Net soccers_guy10 Pro VB.NET 2002/2003 0 September 8th, 2003 11:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.