PHP Builder Forum IndexPHP Builder
free solutions for web developers
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in            Calendar

NEWS:
Prioritys Rows

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PHP Builder Forum Index -> PHP DataGrid {future features}
View previous topic :: View next topic  
Author Message
Laufwerk
Senior
Senior


Joined: 27 Mar 2008
Posts: 53
:


Items

PostPosted: Mon Jun 02, 2008 10:16 am    Post subject: Prioritys Rows Reply with quote

Hi !!

I think that this is a very well option, that the user can dragging a row to up or down, and automacatly the grid save this position in a colum proirity

Bye!!!
Back to top
View user's profile Send private message MSN Messenger
zewa666
Site Moderator
Site Moderator


Joined: 01 Feb 2007
Posts: 606
:


Items

PostPosted: Tue Jun 03, 2008 11:23 am    Post subject: Reply with quote

you could do this by your own very easily...

Create a table with a column lets say called "Priority" which is unsigned int and indexed.

now you could build for Datagrid either 2 multifunctions which are beneath the grid and to be accessed for the choosen rows, or you insert virtual fields, which will do a function UP or DOWN.

Catching the move event you know what to do ... reindex the Priority column should be all.

Greetings
Zewa
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laufwerk
Senior
Senior


Joined: 27 Mar 2008
Posts: 53
:


Items

PostPosted: Wed Jun 04, 2008 7:35 am    Post subject: Reply with quote

I don't know to do it, sorry.

Please help me!!!
Back to top
View user's profile Send private message MSN Messenger
zewa666
Site Moderator
Site Moderator


Joined: 01 Feb 2007
Posts: 606
:


Items

PostPosted: Wed Jun 04, 2008 11:56 am    Post subject: Reply with quote

ill try doing such a small example this weekend...

Greetings
Zewa
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laufwerk
Senior
Senior


Joined: 27 Mar 2008
Posts: 53
:


Items

PostPosted: Wed Jun 04, 2008 12:26 pm    Post subject: Reply with quote

perfect!!! Thanks!!!
Back to top
View user's profile Send private message MSN Messenger
zewa666
Site Moderator
Site Moderator


Joined: 01 Feb 2007
Posts: 606
:


Items

PostPosted: Thu Jun 05, 2008 3:27 pm    Post subject: Reply with quote

ok the first part for preparing the things in Datagrid is done ...

as you can see down in the example at the End i prepared a function called resort, which will be used to reindex the field colindex of each row.
Right now Im still searching for the proper algorithm, which I had ones, but due to my chaos I cant find right now Smile

here is a code_template which you could use for it:
http://zewa.ze.funpic.de/datagrid/code_template.rar



I made a database called test, with a table called test and some testing values ...

Code:

CREATE TABLE IF NOT EXISTS `test` (
  `id` int(11) NOT NULL auto_increment,
  `colindex` int(11) NOT NULL,
  `test` varchar(200) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `colindex` (`colindex`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;

--
-- Daten für Tabelle `test`
--

INSERT INTO `test` (`id`, `colindex`, `test`) VALUES
(1, 1, '1998'),
(2, 2, 'datagrid'),
(3, 3, 'zewa'),
(4, 4, 'leumas'),
(5, 5, 'php');


Greetings
Zewa
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Laufwerk
Senior
Senior


Joined: 27 Mar 2008
Posts: 53
:


Items

PostPosted: Mon Jun 09, 2008 9:42 am    Post subject: Reply with quote

hi zewa666
It's is possible to insert this function in a new column?
on the left of delete header_name = priority (For example) and the content [image up][imagedown] for every cell ?

I believe that like this people see much clearer
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PHP Builder Forum Index -> PHP DataGrid {future features} All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
PHP Builder topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group
FREE FORUM HOSTING by AtFreeForum. Terms of Service - Privacy Policy
FASHION ACCESSORIES - BLING BLING - LADIES WATCHES - KOREAN CHILDREN CLOTHING - ONLINE BARGAIN STORE - FASHION JEWELLERIES