I have an UltraWebGrid that merges cells in the first column and does not merge rows in any other columns. If Column 1 contains merged cells and I select a row in a different column corresponding to those merged cells, only selecting the top row corresponding to the merged cells will apply the selected row style to the Column 1. Selecting the next corresponding row down does not highlight the merged cells in the Column 1.
Is there any way to force Column 1 to use the selected row style when any row corresponding to the merged calls is selected? If not, can I force all rows corresponding to the merged cells set to show the selected style by clicking on my merged cells in Column 1?
Hello D.J.
Thank you for the clarification.
There is possible solution regarding this issue.
You can use AfterSelectChangeHandler client side event for the purpose.
<ClientSideEvents AfterSelectChangeHandler="UltraWebGrid1_AfterSelectChangeHandler" />
Please keep in mind that you should set the CellClickActionDefault property inside the DisplayLayout to be RowSelect:
<DisplayLayout CellClickActionDefault="RowSelect"
function UltraWebGrid1_AfterSelectChangeHandler(gridName, id){
//Add code to handle your event here.
var r = igtbl_getRowById(id);
var isMergedColumn = r.getCellFromKey("Region").Column.MergeCells;
if (isMergedColumn && (r.getCellFromKey("Region").getElement() != null)) {
var rowSpan = r.getCellFromKey("Region").getElement().rowSpan;
if (rowSpan > 1) {
while (rowSpan > 1) {
r = r.getNextRow();
r.setSelected(true);
rowSpan--;
}
This solution works if you click on the first row of the group. This is possible because the merged cell element can be accessed only by it.
If you want to implement the same when you click on the other rows you should search for the first one(with the element with rowspan > 1 )
Please let me know if you have further questions regarding this.
Hi Tsvetelina,
Your description is correct. If possible, I would like to be able to click on any cell in the Ana Trujilo or Antonio Moreno rows and have that select the entire Mexico set of rows as well. Thanks for your help,
D.J.
Hello droedger,
Can you please confirm if the below scenario responds to what you want to achieve?
http://samples.infragistics.com/2009.2/WebFeatureBrowser/contents.aspx?showCode=true&t=WebGrid/autocellmerge/AutoCellMerge.aspx~srcview.aspx?path=../WebFeatureBrowserVB/WebGrid/autocellmerge/AutoCellMerge.src~srcview.aspx?path=WebGrid/autocellmerge/AutoCellMerge.src
When you click on the first row from Mexico group , then you want both Ana Trujilo and Antonio Moreno to be selected.
Please let me know whether I have misunderstood your description before continuing the investigation of this issue.