NextRow Selection APi not working with multiple Grouping is there in grid.

2 replies. Last post: January 4, 2010 5:24 AM by Andi Santoso
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Madhavan GMember

Hi ALL,

We are having a functionality of Move Next Previous record.

SO we are using the grid API GetNextRow() and GetPreviousRow().

This is working fine in normal scenarios and also within a group.

Suppose say there are three groups created based on priority.

Low,Medium and High.

Low Group has say one record.

Medium Group has say two records.

High Group has say three records.

Now I am in First Group Say "Low" 

I selected the first record in that group and if i click next record button it is going to third record of other group record and not the first  record in other group.

And also if the next group is not expanded.then it is not selecting any row.

 

Same issue applies for Previous row functionality also.

Please advice and do the needful.

Regards,

Madhavan

 

var
detailsGrid = ISGetObject("WebGrid1"); var cnt=detailsGrid.RootTable.GetRowsCount(); var selectedObject = detailsGrid.GetSelectedObject(); if (selectedObject != null)

{

var selectedRow = selectedObject.ToRowObject(); var selectedRow=selectedObject.GetRowObject(); var nextRow = selectedRow.GetNextRow();

nextRow.Select();

}

 

var grid = ISGetObject("WebGrid1"); var selectedObject = grid.GetSelectedObject(); if (selectedObject != null)

{

var selectedRow=selectedObject.GetRowObject(); var previousRow = selectedRow.GetPreviousRow(); // get previous row object if(previousRow !=null)

previousRow.Select();

 

}

else

{

alert (
"Please select a row first.");

}

All times are GMT -5. The time now is 2:11 PM.
Previous Next