Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-11-08 : 09:27:06
|
When I click "Edit" on a row in a 1.1 datagrid, is there a way to set all the other rows to Visible=False or something along those lines. I'd like to hide all other rows. I don't want to post to another page for the edit since there are multiple filters on this page.In the edit command for the datagrid I'm trying to do following, but no luck:DataGrid1.EditItemIndex = e.Item.ItemIndexIf DataGrid1.EditItemIndex <> e.Item.ItemIndex Then DataGrid1.ItemStyle.....somethingEnd IfI've tried setting the font or height, but it's not making a difference. |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-11-08 : 09:43:49
|
No luck with this either.I have this in the datagrid's ItemCommand handler:DataGrid1.EditItemIndex = e.Item.ItemIndexIf e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.Item ThenIf DataGrid1.EditItemIndex <> e.Item.ItemIndex Thene.Item.Visible = FalseEnd IfEnd If'...code that builds datgridCall BuildDG() |
 |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-11-08 : 10:08:28
|
Tried this in Itemdatabound, but no luck still:If e.Item.ItemType = ListItemType.EditItem Then If DataGrid1.EditItemIndex <> e.Item.ItemIndex Then e.Item.Visible = False End IfEnd IF |
 |
|
elwoos
Master Smack Fu Yak Hacker
2052 Posts |
Posted - 2006-11-09 : 03:16:19
|
Off the top of my head could you just set a filter to the edited row and then rebind and set the edititem. Think you would need to do it in the edititem commandsteve-----------Don't worry head. The computer will do all the thinking from now on. |
 |
|
|
|
|