I am running into an issue and want to see if there is a standard way to do this.
I want to select a grid item on the client and keep the the styles defined in the grid. I have the following event called when a checkbox is clicked in the grid.
The rowControl.style.background gets set correctly but I really want to use what is defined in SelectedItemStyle. My main question is when the checkbox is unclicked I want to use what is set for the ItemStyle or the AlternateItemStyle.
How do I know what kind of item (regular or Alternate) I have?
Also, why doesn't the 'selectItem' method already already highlight the row using the SelectedItemStyle?
Thanks.
I want to select a grid item on the client and keep the the styles defined in the grid. I have the following event called when a checkbox is clicked in the grid.
| function selectRow(id, rowIndex) { |
| var grid = $find("<%= gvProperties.ClientID %>"); |
| var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); |
| //grid.get_masterTableView().selectItem(rowControl, true); |
| grid.get_masterTableView().selectItem(rowControl); |
| rowControl.style.backgroundColor='#c7c7c7'; |
| return true; |
The rowControl.style.background gets set correctly but I really want to use what is defined in SelectedItemStyle. My main question is when the checkbox is unclicked I want to use what is set for the ItemStyle or the AlternateItemStyle.
How do I know what kind of item (regular or Alternate) I have?
Also, why doesn't the 'selectItem' method already already highlight the row using the SelectedItemStyle?
Thanks.