Please help. I am iterating my UltraWebGrid in the BeforeRowTemplateOpenHandler to determine if the row I am on has the value "Other" in the text of the 3rd cell. If it has Other in it, I want to display DivB of my RowEditTemplate, otherwise I want to display DivA. I am doing something wrong, because it always displays DivB, no mater what row I select. Can anyone tell me what I need to do to fix this, because I'm not seeing it.
function igMyGrid_BeforeRowTemplateOpenHandler(gridName, rowId, templateId) { var grid = igtbl_getGridById(gridName); var len = grid.Rows.length; for (var x = 0; x < len; x++) { var name = grid.Rows.getRow(x).getCell(3).getValue(); if (name.substring(0,5)=="Other" || name.substring(0,5)=="other") { igtbl_getElementById(templateId).children["divControls_A"].style.setAttribute('display', 'none'); igtbl_getElementById(templateId).children["divControls_B"].style.setAttribute('display', ''); } else { igtbl_getElementById(templateId).children["divControls_A"].style.setAttribute('display', ''); igtbl_getElementById(templateId).children["divControls_B"].style.setAttribute('display', 'none'); } }
}
I have ultrawebgrid , I want to store last sorting session with paging using javascript and reload the last sorting in ultrawebgrid and maintain paging also .......................
Please help
Thanks & Regards
Subhash Sharma
No Maya, thanks. Nikifor pointed out what I was doing wrong.
Hello dbishop9 ,
I'm just following up to see if you might need further assistance with this issue.
If you have any questions or concerns let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Of couse. Thanks so much. Sometimes I just get so far down in the weeds I make it more complicated than it really is.
Hello Daryl,
Please let me check if I understand your goals correctly. You want to open the Template with condition regarding the currently selected row. If so you don’t need to cycle through all rows. If you cycle the result will be always the result of the last row of the grid. Here you have only to get the current selected (active) row and to *.getCell(3) of this row and check its content.