473,406 Members | 2,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

treegrid row height problem

Hi,

I want the rows in the treegrid to have the same height, and if there's a cell with a lot of content, to be able to click on that cell or row, and the row height will increase - so that all the cell content is visible.

By default if the MaxHeight is not set and VarHeight is set to 1, the rows height adjust so that all the cells content is visible, but I want this to happen only after clicking the cell or row.

Any idea how to do that?

Thanks in advance.
Aug 10 '08 #1
12 2462
acoder
16,027 Expert Mod 8TB
Post your code or a link. Are you using a third party treegrid?
Aug 11 '08 #2
Hi,

I've downloaded treegrid zip file from :

http://www.treegrid.com/TreeGrid5_6/...STreeGrid.html

my files:

the htnl file:

[HTML]<html>
<head>
<script src="../../Grid/GridE.js"> </script>

</head>
<body>

<div style="WIDTH:100%;HEIGHT:90%">
<bdo Layout_Url="myFirstDef.xml" Data_Url="myFirstData.xml"></bdo>
</div>

</body>
</html>
[/HTML]

The data file:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <Grid>
  3.    <Body>
  4.       <B>
  5.         <I id="c" Def="Node" A="Order 003" C="aaaaaaaa bbbbbbbb ccccccccccc dddddddddd">
  6.  
  7.  
  8.   </I>
  9.  
  10.  
  11.       </B>
  12.    </Body>
  13. </Grid>
  14.  
The layout file:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <Grid>
  3.    <Cfg id='First'
  4.     VarHeight="1"
  5.  
  6.  
  7.     />
  8.  
  9.    <Cols>
  10.  
  11.       <C Name='C' Type="Lines" CanEdit="2" Width="100"/>
  12.  
  13.    </Cols>
  14.  
  15.  
  16.   <Def>
  17.  
  18.         <D Name="R" MaxHeight="17" />
  19.     </Def>
  20.     <Header 
  21.         C="Date" 
  22.  
  23.     />
  24.  
  25. </Grid>

Hope that helps you to help me :)
Aug 11 '08 #3
acoder
16,027 Expert Mod 8TB
Have you been through the tutorials first?
Aug 11 '08 #4
yes I have, and I couldn't find an example, nor documentation of what I need :( though it's seems like basic functionality...
Aug 11 '08 #5
acoder
16,027 Expert Mod 8TB
Have a look at the API and see if you can extend it. If not, post your attempt.
Aug 11 '08 #6
I've looked at this API, I only see expand or extend attributes that concrens expanding or collapsing of tree children. If I set the MaxHeight to one line - I don't see how I can expand the row onClick.
I have an example of a a very simple tree with one column and one row. The column is non editable (CanEdit="2"), MaxHeight=17.

The html file:

[HTML]<html>
<head>
<script src="../../Grid/GridE.js"> </script>

</head>
<body>

<div style="WIDTH:100%;HEIGHT:90%">
<bdo Layout_Url="myFirstDef.xml" Data_Url="myFirstData.xml"></bdo>
</div>

</body>
</html>
[/HTML]

The configuration (layout) file:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <Grid>
  3.    <Cfg id='First'
  4.     VarHeight="1"
  5.  
  6.  
  7.     />
  8.  
  9.    <Cols>
  10.  
  11.       <C Name='C' Type="Lines" CanEdit="2" Width="150"/>
  12.  
  13.    </Cols>
  14.  
  15.  
  16.   <Def>
  17.  
  18.         <D Name="R" MaxHeight="17"/>
  19.     </Def>
  20.     <Header 
  21.         C="Date" 
  22.  
  23.     />
  24.  
  25. </Grid>
  26.  
Data file:

Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0"?>
  2. <Grid>
  3.    <Body>
  4.       <B>
  5.         <I id="c" C="aaaaaaaa bbbbbbbb ccccccccccc dddddddddd">
  6.  
  7.  
  8.   </I>
  9.  
  10.  
  11.       </B>
  12.    </Body>
  13. </Grid>

It would be great if you could help me with that.
Aug 12 '08 #7
acoder
16,027 Expert Mod 8TB
What about the UpdateRowHeight() method?

PS. please use code tags when posting code.
Aug 12 '08 #8
I have a temporary problem with my computer and I don't have access to the html I've created, but I added these lines to the head section of it:

[HTML] <script type="text/javascript">Grids.OnClick = function(grid, row, col, x, y, handled, event) {grid.UpdateRowHeight(row);}</script>[/HTML]

I see that I catch the event (when I put alert in the function I see it), but the row is not expanded..... :(
Aug 12 '08 #9
better use of code tags:

[HTML]<script type="text/javascript">
Grids.OnClick = function(grid, row, col, x, y, handled, event)
{
grid.UpdateRowHeight(row);
}
</script>
[/HTML]
Aug 13 '08 #10
This works :)

[HTML]<script type="text/javascript">
Grids.OnClick = function(grid, row, col, x, y, handled, event)
{
row.MaxHeight="200";
grid.RefreshRow(row);
}
</script>[/HTML]
Aug 13 '08 #11
acoder
16,027 Expert Mod 8TB
Glad you got it working. Thanks for posting the solution :)
Aug 13 '08 #12
you welcome :) and thanks for your time.
Aug 16 '08 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Paul | last post by:
Hi, I'm wondering if someone out there can help me overcome this quandary. I need to be able to calculate the height of the current page. I need to calculate the height of the page in pixels after...
12
by: Kepler | last post by:
How do you get the height of the client browser in IE? Both document.body.clientHeight and document.body.offsetHeight return the height of the document. If the page is long and there's a vertical...
0
by: Lee | last post by:
The debug window "auto" in .Net is a TreeGrid control(i checked it by spy++),any one know where can i get that control? Thanks in advance!!!
4
by: reycri | last post by:
I have a page that works as I intend in IE but not in Firefox: <html> <head> <title>Overflow Test</title> </head> <body style='overflow:hidden; margin:0; padding:0;'> <table border='0'...
1
by: phoenix19845 | last post by:
I've found a control in the local panel in vs2005 when debugging, with the name of "treeGrid" using spy++.But I couldn't use this control in my program. Could anyone help me?Thanks.
5
by: creative1 | last post by:
hi everyone, I am struck in layout of my site. Im using 1024 fixed width layout. I have a site layout designed in psd files. Bisically I have to stick with that design tightly and I am asked not to...
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
10
by: Constantine AI | last post by:
Hi i am having a little problem with an equation function that was created from all your help previously. The function works fine itself but with a small glitch within it. Here is the function...
2
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.