Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flow layout panel - Datagrids

Status
Not open for further replies.

mkohl

Programmer
Feb 22, 2005
82
US
Hello,

I have a few datagrids in a html flow layout panel (7 datagrids to be exact) and the problem is the lower datagrids are not flowing to the top of the flow layout control when the top datagrids are set to visable = false. In return the user has to scroll down to the midle of the page to see the datagrid.

The problem is I have to have all 7 datagrids on the same asp.net page. When some of the datagrids are set to visable = false then I need to have the lower grids pushed up to the top.

My question is, is there a setting that I am overlooking? or should I use multiple flow controls? or is there another way I should do this?

Any advice would be helpful.

-Mike
 
The easiest way is to simply use FlowLayout on each page (this is by far the best solution anyway, as your page layout should be controlled by CSS). However, if you are not doing that (and I would strongly recommmend that you do), using Flow Layout panels should "push" your other datagrids up to the top as when the first datagrids are set to Visible=False then they will not be rendered. I suggest you check the page source of what is rendered and see what it shows.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Question:

How will using flowlayout solve my problem for the entire page. I have several different datagrids being populated depending on users choice. If I use flowlayout combined with css to position these datagrids. Then the grids would not flow to the position that I would want them to flow too. Using css would change the postion from flowstyle, to absolute.

I tried using css, but I still do not get the desired results I am looking for, because the datagrids are user driven. So, sometimes a datagrid may have 10 rows, and some times it may have 2 rows. Some times, the second datagrid may be populated and some times it won't. So if I use css to position the datagrids, when the second datagrid is not set to visiable = true, then there will be a gap between the first and third datagrid.

If you would like to look at it, here is the web page I am referring to: A good example of my problem is "wipers", "Mazda", "O". I believe on this vehicle only one datagrid will populate for the "rear wiper". The user has to scroll down the page to see information on the product, when it should have been scrolling up. I am using css, but this example basically demenstrated what I see whe I use the flow control, and css.

-Mike
 
The reason that I suggested using CSS for your page layout, is so that everything is in FlowLayout. If certain datagrids don't exist (or anything else for that matter), then the page simply "flows" and shows all of your datagrids in the order that they appear in the HTML.

You can use CSS to set absolute positions but in most cases, it's not recommended (which is what I think you maybe thought I meant as your second paragraph says that there "will be a gap between the first and third datagrid"). I didn't mean that you should use CSS to position the grids with absolute positioning - I meant that you should use CSS to determine how the page would be layed out.

It doesn't matter that the datagrids have 10 or 100 rows, as whatever comes after them is simply displayed as soon as that datagrid ends so there would be no scrolling for the user.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top