Konu: gridde solda 1 kolon sabit kalması
beceremedim:
LockColumns - LockcolumnsLeft - Partition - Panel kombinasyonlarını denedim
Giriş yapmadınız. Lütfen giriş yapın yada kayıt olun.
beceremedim:
LockColumns - LockcolumnsLeft - Partition - Panel kombinasyonlarını denedim
http://www.tek-tips.com/viewthread.cfm?
p;page=731 siteye baksana
içeriğini alta kopyaladım
The approach is based on a simple principle. LeftColumn property of the grid represents a column that is currently the leftmost visible column in the grid with current horizontal scrolling. As we scroll the grid horizontally, this property changes. We can assign this number to the ColumnOrder property of the column we want to hold and that’s all:
this.Columns(1).ColumnOrder = this.LeftColumn
You can use this in the Scrolled and AfterRowColChange events of the grid. However, there is a little problem with this: order of columns spoiled after few scrolling forward and back. This is because column order changes using principle "replace older column by newer on that place", so older column is placed on place of newer column. Column orders of all other columns are not changed. This causes the problem. This FAQ describes an approach that allows to organize freezing of the column and workaround most issues.
The code is a very basic and simple to give the basics of the approach. Code samples could be improved to work correctly in case user change order of columns, as well as improve the logic related to the focus change.
Description
Following is a code that updates columns in grid to make first column always leftmost. Use it in the Scrolled event when grid is scrolled horizontally and in the AfterRowColChange event when active column is changed in the grid.
local i
if this.columns(1).ColumnOrder < this.LeftColumn
&& we scroll forward
for i=this.columns(1).ColumnOrder to this.LeftColumn-1
this.columns(1).ColumnOrder = this.columns(1).ColumnOrder + 1
endfor
else
&& we scroll backward
for i=this.LeftColumn+1 to this.columns(1).ColumnOrder
this.columns(1).ColumnOrder = this.columns(1).ColumnOrder - 1
endfor
endif
bir de buraya bak
http://www.tek-tips.com/faqs.cfm?fid=3477
kolay gelsin
1 | Public oForm |
Çetin senin kodun gridi 2ye bölüyor, 2sinde de bütün sütunlar çıkıyor, birşeyler denedim ama başaramadım. Bir de galiba columncount=9 eksik .
http://www.tek-tips.com/faqs.cfm?fid=3477 istediğim gibi
yalnız nedense aftercolRowchangede lockscreen=.f. çalışmıyor - be de şimdilik locksuz yaptım.
teşekkürler
Ali Abi;
Galiba forum arşivinde istediğine benzer bir şey var:
http://www.fox4um.com/topic/1496/oledb-hatasi-hk/
![]()