User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 427,221 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,263 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 548 | Replies: 3
Reply
Join Date: Dec 2007
Posts: 3
Reputation: ljf118 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ljf118 ljf118 is offline Offline
Newbie Poster

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

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2007
Posts: 25
Reputation: swaters86 is an unknown quantity at this point 
Rep Power: 2
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

  #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>
  6.  


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. }
  6.  


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  
Join Date: Dec 2007
Posts: 3
Reputation: ljf118 is an unknown quantity at this point 
Rep Power: 0
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

  #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  
Join Date: Dec 2003
Location: Nashville, TN
Posts: 2,333
Reputation: alc6379 has a spectacular aura about alc6379 has a spectacular aura about alc6379 has a spectacular aura about 
Rep Power: 11
Solved Threads: 102
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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 11:25 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC