A little help please for an old dog desperately trying to learn ne tricks

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2007
Posts: 3
Reputation: ljf118 is an unknown quantity at this point 
Solved Threads: 0
ljf118 ljf118 is offline Offline
Newbie Poster

A little help please for an old dog desperately trying to learn ne tricks

 
0
  #1
Dec 14th, 2007
Really having trouble with UI design using AJAX and Web Dev Express 2005. Designing systems for 25 years and finding the latest and greatest the biggest pain in the ass to figure out since JCL.

Anyway:

I have been trying to put controls such as the Gridview into a <DIV> instead it always positions itself all over the page in absolute placement. The control is bound and I cannot shrink the grid to fit the size of my <DIV> box either. I also had this problem with listbox and drop downs too. What am I missing?

Signed
The very dense developer
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 26
Reputation: swaters86 is an unknown quantity at this point 
Solved Threads: 0
swaters86 swaters86 is offline Offline
Light Poster

Re: A little help please for an old dog desperately trying to learn ne tricks

 
0
  #2
Dec 18th, 2007
Do you know any CSS?


I haven't had too much experience with Microsoft's AJAX framework, but if you're dealing with div tags then you could resize those via CSS.

All you have to do is give the div tag an id or class(if you're going to use the same one more than onece). Something like this should work:

  1.  
  2. <div id="gridview">
  3.  
  4. asp grid control here.
  5. </div>


Then create an external CSS file(either in vs or your editor of choice) and insert the following code into it:

  1.  
  2. #gridview{
  3. height:100px;/*change this to get the your ideal height in pixels*/
  4. width:100px;/*change this to get the your ideal width in pixels*/
  5. }


Save that as mainstyle.css into the directory your aspx page is in.

then in your aspx pages , insert this into the head tags:

  1. <link href="mainstyle.css" rel="stylesheet" type="text/css" media="all" />

You can change the href to match the location of your CSS file as if it was regular hypertext link.

The above code should change the size of your div tag which should influence the size of your grid control.

Or you can insert CssClass="gridview" into your grid view control asp tag.

then change the external style sheet that you just made from above to .gridview not #gridview

Alternatively you can also insert an inline style such as style="width:100px; height:100px;" into your div tag. l

For example:

<div style="width:100px; height:100px;"></div>

This changes the size of the div without using an external stylesheet that I just written above.


Also, the official site for Microsoft's AJAX framework offers excellent video tutorials on the same thing:

http://asp.net/learn/ajax-videos/
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 3
Reputation: ljf118 is an unknown quantity at this point 
Solved Threads: 0
ljf118 ljf118 is offline Offline
Newbie Poster

Re: A little help please for an old dog desperately trying to learn ne tricks

 
0
  #3
Dec 18th, 2007
Thank you very much. I was looking at third party controls but would prefer to stay within the framework and not introduce new dll's.
Reply With Quote Quick reply to this message  
Join Date: Dec 2003
Posts: 2,414
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Solved Threads: 123
Team Colleague
alc6379's Avatar
alc6379 alc6379 is offline Offline
Cookie... That's it

Re: A little help please for an old dog desperately trying to learn ne tricks

 
0
  #4
Dec 18th, 2007
Well... you're still within the .NET framework if you take this approach-- you're just customizing the HTML you're putting on the page. That's a pretty standard thing to do...
Alex Cavnar, aka alc6379
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC