Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Delphi For PHP > VCL4PHP
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

VCL4PHP VCL for PHP. Questions or comments about the Visual Component Library for PHP, post them here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 4th February 2010, 19:46
dalyla's Avatar
D4PHP User
 
Join Date: Jul 2009
Location: Mexico
Posts: 65
dalyla is on a distinguished road
Red face DBGrid SortType property

Hello everybody,

Well I have a lot of dbgrids in several pages, and I need to set each one the first column Sorteable like numeric. If I can set the width with javascript, is there a way to do the same with SortType?

I can easily do this :
PHP Code:
grid.getTableColumnModel().setColumnWidth(0,80);  //col,width 
but I can't use this:
PHP Code:
grid.getTableColumnModel().setColumnSortType(0) ='stNumeric'
I can handle it with design time, but I might create always one by one each column in all of my grids. So it's better for me just add one or two more lines in javascript. Or in php, but i think the correct is javascript.

Thanks in advance
__________________
My world seems to be shinin'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 6th February 2010, 15:54
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
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

Look at easygrid there is a switch to make the column numeric.

The stock grid outputs your array as a string so you could also extract your array and convert the proper column to number and reassign the array to the grid and it will work.
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 16:28.




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