Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Programming > Javascript and Ajax
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

Javascript and Ajax Questions and information about working with Ajax and Javascript in Delphi for PHP.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 29th January 2010, 17:07
D4PHP Enthusiast
 
Join Date: Mar 2009
Posts: 134
kelinda is on a distinguished road
Default Dbgrid scroll

I put the image in dbgrid...but now i discovered that i can't scroll the grid...i have limitcount = -1 and limitstart=-1..

how can i do to resolve this problem?

thanks a lot

Last edited by kelinda; 29th January 2010 at 17:19.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2nd February 2010, 02:45
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,267
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

PM me a link to a website so I can look at it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 2nd February 2010, 09:42
D4PHP Enthusiast
 
Join Date: Mar 2009
Posts: 134
kelinda is on a distinguished road
Default Dbgrid scroll

Ok 405hp

thanks a lot

the link below...show you what i mean...

http://www.pratesi.it/ordini/uord.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 3rd February 2010, 04:31
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,267
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Your problem has to do with the image renderer. If I disable that on your page the grid scrolls.

I just tested my original code and that grid scrolls.

I don't see any error in your code for it so I am not sure what it could be - unless it has something to do with your containers.

To verify you need to create a new form with nothing on it but the grid and see if it works or not. No fancy stuff just the basics to make sure it works.


The attached is a html file that works on my machine. You may have to change the location of qx.js inside it but it should allow you to test.
Attached Files
File Type: html testpic.html (7.4 KB, 1 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 3rd February 2010, 11:50
D4PHP Enthusiast
 
Join Date: Mar 2009
Posts: 134
kelinda is on a distinguished road
Default

I make a simple example as you suggest me ....
that you can see on this link...

Unit1

but the scroll still doesnt work...
have you idea?



thanks a lot
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 6th February 2010, 17:42
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,267
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

I moved the
Code:
qx.OO.defineClass('ImageDataCellRenderer', qx.ui.table.IconDataCellRenderer,
function(wide, high) {
    qx.ui.table.IconDataCellRenderer.call(this);
    this._iconWidth = wide;
    this._iconHeight = high;
});
qx.Proto._identifyImage = function(cellInfo) {
    var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
    var image = {
        imageWidth: this._iconWidth,
        imageHeight: this._iconHeight,
        top: 0
    };
    image.url = 'http://www.pratesi.it/ordini/immaginiP/' + cellInfo.value;
    return image;
}
Down below the nfa declarations and it works ok. You broke the code by inserting into the other renderer.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 8th February 2010, 10:52
D4PHP Enthusiast
 
Join Date: Mar 2009
Posts: 134
kelinda is on a distinguished road
Default

thanks a lot...

sorry i make some try...whats "nfa declarations"?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 8th February 2010, 18:29
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,267
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

The number format object
Code:
var NFA=new qx.util.format.NumberFormat();
NFA.setMinimumFractionDigits(2);
NFA.setMaximumFractionDigits(2);
NFA.setGroupingUsed(false);
var NFL=new qx.util.format.NumberFormat();
NFL.setGroupingUsed(false);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10th February 2010, 10:15
D4PHP Enthusiast
 
Join Date: Mar 2009
Posts: 134
kelinda is on a distinguished road
Default moouse pointer

thanks 405


i change the code as you told me....but now the mouse doens't change in pointer....

Unit1

mycode:

var NFA = new qx.util.format.NumberFormat(); //there are options to locale like qx.util.format.NumberFormat('de')
NFA.setMinimumFractionDigits( 2 );
NFA.setMaximumFractionDigits( 2 );
NFA.setGroupingUsed(false);
var NFL = new qx.util.format.NumberFormat();
NFL.setGroupingUsed(false);


qx.OO.defineClass('ImageDataCellRenderer', qx.ui.table.IconDataCellRenderer,

function(wide,high)
{
qx.ui.table.IconDataCellRenderer.call(this);
this._iconWidth = wide;
this._iconHeight = high;
}
);

qx.Proto._identifyImage = function(cellInfo)
{
var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
var image = {imageWidth:this._iconWidth, imageHeight:this._iconHeight, top:0};

image.url ='http://www.pratesi.it/ordini/immaginiP/'+ cellInfo.value;
return image;
}

function ThisIsUseful(aaa)
{
document.body.style.cursor='pointer';

if (aaa.indexOf('/') > -1)
answer = aaa.substring(aaa.lastIndexOf('/')+1,aaa.length);
findObj('Image4').src='http://www.pratesi.it/ordini/immaginiG/'+ answer;
vcl.show('pnlfoto_outer');

}

function ThisIsUsefulOUT(bbb)
{
document.body.style.cursor='default';
vcl.hide('pnlfoto_outer');
}

qx.Proto._getContentHtml = function(cellInfo)
{
var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
var urlAndToolTip = this._getImageInfos(cellInfo);
var html = IconDataCellRenderer.IMG_START;

var mypathimage = new Object;
mypathimage.src = urlAndToolTip.url;

html += urlAndToolTip.url + '\"' + 'width=' + '\"' + urlAndToolTip.imageWidth + '\"' + 'height=' + '\"' +
urlAndToolTip.imageHeight + '\"' + 'onmouseover=' + '\" ThisIsUseful(this.src); ' +'\"' + 'onmouseout=' + '\" ThisIsUsefulOUT(1); ';
html += IconDataCellRenderer.IMG_END;
return html;
}


");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11th February 2010, 18:13
D4PHP Guru
 
Join Date: Nov 2007
Posts: 228
u.masotti is on a distinguished road
Default

Quote:
Originally Posted by kelinda View Post
i change the code as you told me....but now the mouse doens't change in pointer....
As said in another code sample, the best thing to do is to have in functions called by events the first parameters passed as a pointer to the calling object.
In that way you can operate directly on it and not try to overuse all document.
In your situation you have a pointer property set in a inner element than all document body overriding setting in the body.

Try to understand next code... comments in-line
Code:
        function ThisIsUseful(xxx) // changed line
         {
            var aaa = xxx.src;  // added line
            xxx.style.cursor='pointer'; // changed line

          if (aaa.src.indexOf('/') > -1)
             answer = aaa.substring(aaa.lastIndexOf('/')+1,aaa.length);
            findObj('Image4').src='http://www.pratesi.it/ordini/immaginiG/'+ answer;
            vcl.show('pnlfoto_outer');
         }

          function ThisIsUsefulOUT(xxx)  // changed line
         {
            xxx.style.cursor='default'; // changed line
            vcl.hide('pnlfoto_outer');
          }

       qx.Proto._getContentHtml = function(cellInfo)
          {
           var IconDataCellRenderer = qx.ui.table.IconDataCellRenderer;
           var urlAndToolTip = this._getImageInfos(cellInfo);
           var html = IconDataCellRenderer.IMG_START;

           var mypathimage = new Object;
           mypathimage.src = urlAndToolTip.url;

           html += urlAndToolTip.url +  '\"' 
+  'width=' + '\"' 
+ urlAndToolTip.imageWidth 
+ '\"' + 'height=' +  '\"' 
+ urlAndToolTip.imageHeight + '\"' 
// changed parameters to ThisIsUseful() and ThisIsUsefulOUT()
+ 'onmouseover=' + '\" ThisIsUseful(this); ' +'\"' 
+ 'onmouseout=' + '\" ThisIsUsefulOUT(this); ';
           html += IconDataCellRenderer.IMG_END;
           return html;
         }
__________________
Ciao.
Mimmo.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 12:16.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use