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
row select/ cell selecting
13/01/2010
05:35
Avatar
kikz4life
Philippines
Member
Members
Forum Posts: 14
Member Since:
15/10/2009
sp_UserOfflineSmall Offline

i formerly used flexgrid in my application but because of jqgrid easy data loading and manipulation, im really interested in using this to my my new site. In flexgrid i was able to select a row and if click it will hide my div then display the details of the user.  I want to explain something that flexgrid has and its about the process property.

in flexgrid

{name : 'a.user', width : 100, align : 'left', process:viewHeader, sortable:true}

the javascript function for viewHeader

function viewHeader(celDiv,id)
{
    $(celDiv).addClass("pointer");
    $(celDiv).click(function(){
        $('.toolbar a[title=Header]').trigger('click');               
        viewdb(id);       
    });

 
}

$('#Header').show().siblings('div.panel').hide();

the function of viewHeader was to hide my flexgrid and display an HTML file in the same page. 

Does jqgrid has this property or function?

13/01/2010
17:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can use custom formatter for this purpose and set onclick event something like this:

...

colModel :[

...

{name:'some' ... formatter: mycellformatter...},

...

],

...

function mycelformatter(value, options, rowobj)

{

// the rowid is

// rowobj.rowId.

return "<a href='#' onclick='viewHeader(...);return false;' >" +value+"</a>";

}

Hope this helps

You can hide the grid like this $("#gbox_mygrid").hide(), where mygrid is the id of your grid.

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.

18/01/2010
03:56
Avatar
kikz4life
Philippines
Member
Members
Forum Posts: 14
Member Since:
15/10/2009
sp_UserOfflineSmall Offline

hi tony,

actually its not a link. the viewHeader is a javascript function that will hide the divHeader or the grid to display its details. Right now i have 2 jqgrid master -details. Right now upon opening the page the 2 jqgrid (master, detail) both loads but what i want to do is not to automatically load the details jqgrid.  How can i accomplish this?

this is what i did: also tony is their a single click row? 🙂

 ondblClickRow: function(id){
                        $('.toolbar a[title=Header]').trigger('click');               
                        viewdb(id);       
                },

thanks

-Dean

22/01/2010
12:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I see some things that can be done easy. You concentrate on the grid structure, rather than to see if some method exists Wink

Also step by step.

1. There is a single click event onSelectRow

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

2. There is a method called: setGridState which maybe should replace your trigger

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

3. You can do it very easy

for the detail grid

$("#detail"). jqGrid({

...

datatype: 'local'

...

});

$("#detail"). jqGrid('setGridParam',{datatype:'json'});

With this code initially the detail does not load the data, but after that accept any request

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
80 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