Rowscount and CheckedRows with Grouping column enabled

15 replies. Last post: November 17, 2009 8:34 PM by Handy Surya
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Madhavan GMember

Hi All,

Option 1:

I have a Webgrid with multi select enabled.

So based on the checkboxes clicked i have to do some operations from context menu.

So I am calling a javascript on contextmenu click.

I am checking the CheckedRows in the Serverside

ArrayList workitemIds = WebGrid1.RootTable.GetCheckedRows();

ArrayList workitemObj = new ArrayList();

int rowsCount = WebGrid1.RootTable.Rows.Count; 

Guid multiSelectQueueId = Guid.Empty;

for (int i = 0; i < workitemIds.Count; i++)

{

for (int j = 0; j < rowsCount; j++)

{

if (WebGrid1.RootTable.Rows[j].KeyValue.ToString() == WebGrid1.RootTable.GetCheckedRows()[i].ToString())

{

string workflow = WebGrid1.RootTable.Rows[j].Cells.GetNamedItem("Workflow").Text;

Guid WorkitemId = new Guid(WebGrid1.RootTable.GetCheckedRows()[i].ToString());

Skelta.HWS.WorkItem workitem = new Skelta.HWS.WorkItem(new Skelta.Core.WorkflowObject(workflow, new Skelta.Core.ApplicationObject(_ApplicationName)), WorkitemId);

if(multiSelectQueueId==Guid.Empty)

{

if (workitem.QueueId != Guid.Empty)

{

multiSelectQueueId = workitem.QueueId;

}

}

workitemObj.Add(workitem);

}

else

{

continue;

}

}

}

 If i don;t have grouping column in my webgrid WebGrid1.RootTable.Rows.Count is coming correctly.

Otherwise it is not coming correctly.

How can i achieve this?Because i need to loop through the Webgrid rows and check the keyvalue is matching and get the other details for the row to perform.

Please advice.

 

Regards,

Madhavan 

All times are GMT -5. The time now is 9:56 PM.
Previous Next