Jump to content


Photo

Scroll in DBGrid


  • Please log in to reply
11 replies to this topic

#1 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 08:45 AM

Hi Farhad, I add the results in a grid, can make the results of the above scrolling?
Thank you.

 

 

Attached Files

  • Attached File  8888.png   25.91KB   105 downloads

  • 0

#2 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10265 posts

Posted 27 November 2014 - 09:11 AM

Scroll to right?


  • 0

#3 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 09:23 AM

Scroll to right?

 

Yes, I want to scrolling was at the bottom, after the itogs.


  • 0

#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 27 November 2014 - 10:24 AM

Hi Mediv07

 

I think it was made for vertical scrolling ...

 

Best regards.


  • 0

#5 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 10:49 AM

Apparently I'm not quite correctly explained my question.
I took the demo application and reduce the width of the form, appeared to scroll.
I want to scroll was under GrandTotal, this can be done?
Thank you.

 

Attached Files

  • Attached File  8989.png   28.64KB   78 downloads

  • 0

#6 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 27 November 2014 - 11:37 AM

Вы в начале правильно объяснили, я понял Вас, я просто подумал, что если "горизонтальную " прокрутку переместить под "grand total", то при появлении "вертикальной" полосы прокрутки "grand total" может "уйти", т.е. может остаться невидимым, Хотя не знаю, может быть можно это как-то реализовать... 
 
You correctly explained, I understand you, I just thought, if "horizontal" scroll to move under the "grand total", then when visible a "vertical" scroll bar "grand total" can "get away", ie may remain invisible, Though I do not know, maybe it is possible to somehow implement ...
 
Best regards.

  • 0

#7 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 01:05 PM

Here is a solution that can be useful to someone.
 
If there is another solution, share.
// Sync
UniSession.AddJS(AccOborotSvcDBGrid.JSName+'.body.dom.parentElement.getElementsByClassName("x-docked-summary")[0].addEventListener("scroll", function (e) {'
+AccOborotSvcDBGrid.JSName+'.body.dom.firstChild.scrollLeft = this.scrollLeft;}, false)');

// Hide Scroll
UniSession.AddJS(AccOborotSvcDBGrid.JSName + '.body.dom.firstChild.style.overflowX = "hidden"');

//
UniSession.AddJS(AccOborotSvcDBGrid.JSName + '.body.dom.parentElement.getElementsByClassName("x-docked-summary")[0].style.overflowX = "scroll"');

Attached Files

  • Attached File  7777.png   24.16KB   56 downloads

  • 0

#8 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 01:30 PM

Пример того, что скролл остался. 

Attached Files

  • Attached File  555.png   19.79KB   33 downloads

  • 0

#9 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 27 November 2014 - 01:37 PM

//
UniSession.AddJS(AccOborotSvcDBGrid.JSName + '.body.dom.parentElement.getElementsByClassName("x-docked-summary")[0].style.overflowX = "auto"');

  • 0

#10 Mediv07

Mediv07

    Advanced Member

  • Members
  • PipPipPipPip
  • 104 posts

Posted 27 November 2014 - 02:02 PM



 

//
UniSession.AddJS(AccOborotSvcDBGrid.JSName + '.body.dom.parentElement.getElementsByClassName("x-docked-summary")[0].style.overflowX = "auto"');

 

 

Add image with bug.

Attached Files

  • Attached File  444.png   29.02KB   51 downloads

  • 0

#11 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4782 posts

Posted 27 November 2014 - 03:33 PM

I think you need some event handlers in the grid to insert a about such code:
 
(I mean you need to use about such code, but this code is not optimal)
 
.......

 

function columnresize(ct, column, width, eOpts)
{
  Ext.get(this.id).down('.x-docked-summary').dom.scrollLeft = Ext.getCmp(this.id).body.dom.firstChild.scrollLeft
}
function resize(sender, width, height, oldWidth, oldHeight, eOpts)
{
  Ext.get(this.id).down('.x-docked-summary').dom.scrollLeft = Ext.getCmp(this.id).body.dom.firstChild.scrollLeft
}

......

 

 


  • 0

#12 nyy216

nyy216

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 14 July 2015 - 08:06 AM

hi everyone 

 

  can you tell me how to add summany panel to the bottom of the gird ?

  thank you 

 

141604350793197.png


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users