Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
changing the color and more ...
09/11/2009
09:56
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

I discovered this jquery plugin. Please apologize me for my questions...

1) Which could be the best method for changing the color of field(s) according to diverses criteria ?

the color or the style (bold, italic, ...)

2) How to insert an hyperlink in a field ?

3) How to insert a checkbox or a radio box in a field ?

4) Is it possible to display a photo in a field ?

09/11/2009
11:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The answer of all of these quastions can be fiund into the documentation and/or in this forum.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

09/11/2009
12:42
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

The welcome is cold for a newbie ...

10/11/2009
09:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Sorry if this sound so, but you should understand that this is a open source software and before to make some question or post a problem you should first read the documentation and search the forum for such kind of solutuions. If you are "newbe" you should know these things that are common for the open source community.

Believ me I want to help of all users, but I shoud work - I have family and I must pay my bills.

Hope You understand waht I mean.

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

10/11/2009
12:35
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

I  found for the points 3 & 4

I didn't search for the point 2

I didn't find for the point 1

11/11/2009
03:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

1. You can use many option for this purpose.

1.1 use the new classes option in colModel to attach class to particular column.

1.2 use setCell method to change the apperianse and data to particular cell

1.3 use setRowData to set some classes to particular row

1.3 For dynamic changing during retrieving of data you can use afterInserRow event

2. You can use the formatter showLink maybe

http://www.trirand.com/jqgridw....._formatter

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/11/2009
08:36
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

Thank you. For me, even after a read of the documentation, it was not evident.

As I want to change the color when I populate the grid, I think the solution is the afterInserRow event and the setCell method.

afterInserRow: function (row,data) {

 if (data > value_1 && data < value_2) {

  jquery(”#myGrid”).setCell(row, …{color:'red'})

}

BUT

data is undefined for me ! probably because I populate by json.

I changed like this:

afterInserRow: function (row, data, rowelem) {

 if (??? > value_1 && ??? < value_2) {

  jquery(”#myGrid”).setCell(row, …{color:'red'})

}

rowelem is for me a string of values separated by comma: val1,val2,,val4

I can do rowelem[2] for extracting val2 but it's not elegant !

Is it possible to use the colModel name for extracting ?

12/11/2009
10:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Look depper here:

http://www.trirand.com/jqgridw.....iki:events

the data is array, and can not be used your way

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

12/11/2009
10:50
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

The extraction of data from rowelem is not explained for the afterInserRow event !

12/11/2009
10:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Here is the description:

"rowelem is the element from the response. If the data is xml this is the xml element of the row; if the data is json this is array containing all the data for the row"

Is something that is not clear?

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

12/11/2009
18:16
Avatar
phicarre
Member
Members
Forum Posts: 132
Member Since:
09/11/2009
sp_UserOfflineSmall Offline

Yes, it's not clear.

I repeat my question:

rowelem is for a string of values separated by comma: val1,val2,,val4

I can do rowelem[2] for extracting val2 but it's not elegant !

Is it possible to use the colModel name (or something other) for extracting ?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information