A
amazon otter via .NET 247
Hi,
I've been researching in how to do this for 3 days now. I'mdisplaying a datagrid, DATAGRID1, that has for instance 3columns and 5 rows. The column headers are Employee, Day1, andDay2. Each column may or may not have string data in them.
------DATAGRID1-----------------
Employee Day1 Day2
John S
Sam A
Joe D
Jen F
Nick T
--------------------------------
The row values are Linkbuttons. So when a user clicks on say,"S", for John under Day1, my datagrid does an OnItemCommandevent to a Sub called "Process_OnItemCommand".
I need for this Sub to give me the Cell index that it resides in.I know how to get the row index by using, e.item.itemindex, butI really need to know how to get the Cell(Column) index. Allthe examples I've seen so far have syntax like, LABELx.text =CType(e.Item.Cells(1).FindControl("LABELy"), label).text, whereCells(1) actually means something to them.
I do not have the luxury of knowing which cell was selected or doI? Am I missing something? Is their a way of finding theColumn Index. The reason I am trying to do this is so that Ican take the value that was selected and remove it from theDataset and eventually the re-painted datagrid.
Thanks
From: amazon otter
I've been researching in how to do this for 3 days now. I'mdisplaying a datagrid, DATAGRID1, that has for instance 3columns and 5 rows. The column headers are Employee, Day1, andDay2. Each column may or may not have string data in them.
------DATAGRID1-----------------
Employee Day1 Day2
John S
Sam A
Joe D
Jen F
Nick T
--------------------------------
The row values are Linkbuttons. So when a user clicks on say,"S", for John under Day1, my datagrid does an OnItemCommandevent to a Sub called "Process_OnItemCommand".
I need for this Sub to give me the Cell index that it resides in.I know how to get the row index by using, e.item.itemindex, butI really need to know how to get the Cell(Column) index. Allthe examples I've seen so far have syntax like, LABELx.text =CType(e.Item.Cells(1).FindControl("LABELy"), label).text, whereCells(1) actually means something to them.
I do not have the luxury of knowing which cell was selected or doI? Am I missing something? Is their a way of finding theColumn Index. The reason I am trying to do this is so that Ican take the value that was selected and remove it from theDataset and eventually the re-painted datagrid.
Thanks
From: amazon otter