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
Grid as a subgrid problem
18/08/2009
10:45
Avatar
krisreddy
Member
Members
Forum Posts: 37
Member Since:
24/02/2009
sp_UserOfflineSmall Offline

Hello,

I  have hierarchical 2-level grid setup using grid as a subgrid. If the subgrid is open and I delete the top level item, the related subgrid are not removed even though my database action has removed it. I don't know if this is a bug or if I have write to check and see if the subgrid is open then remove it?

Please let me know,

Kris

19/08/2009
06:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

How do you delete this? Do you use delGridRow? If this is the case - yes this is expected behavior.

Also you should check if the next row is a subgrid. Below is the code (not tested) which can do this

before deleting row with id=rowid with delGridRow do

var delrow = $("#mygrid").getInd(rowid); // get the index of the row

if(delrow) {

// check to see if the next row has class ui-subgrid

var rtodelete = $("#mygrid")[0].rows[delrow+1];

if( rtodelete.className == "ui-subgrid" )

$(rtodelete).remove()

}

and the delete the parent.

Little complicated, but will do the job

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.

19/08/2009
11:50
Avatar
krisreddy
Member
Members
Forum Posts: 37
Member Since:
24/02/2009
sp_UserOfflineSmall Offline

Hi Tony,

Thanks I will try your solution out.

I am using navGrid (del:true) to delete the row and its deletes the record from the server side 

I guess I can check to see if subgrid is open and remove the row accordingly.

Thanks,

Kris

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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