I am using Infragistics Ultrawebgrid.
When the user press the delete key on a particular row on the grid, that particular row needs to be deleted. This is working fine.
I used DropDownList with an UltrawebGrid and binding the values using a stored procedure. The DropDownList contains list of items ( e. g. Item1, Item2, Item4, Item5, Item6...).
DropDownList
UltrawebGrid
Item1, Item2, Item4, Item5, Item6...
I used after cell updation ( Client side event in ultrawebgrid) to avoid to choose the same item. When the user chooses the same item it says 'this item already exist'.
ultrawebgrid
When the user chooses an item , the price and weight of the item will appear in that row.
It may be a situation that - after choosing items (say for example item1, item2, item3 ) - the user may delete any one of the selected items ( say for example item1).
item1, item2, item3
item1
So when user press delete on item1 , the item will be deleted.
My problem is after deletion of the item (item1) in Ultrawebgird, if I choose another row (item4) it says 'This item already Exist (but, in that grid there is no such item). .
Ultrawebgird
item4
What do I need to do?
I am using
Hello karthikeyan,
Thank you for the provided details.
I am still unable to determine what exactly is causing the issue, your code seems to be correct. Can you please provide a small isolated sample, reproducing the behavior you are experiencing, in order to be able to debug it on my side? Thanks.
Hi Maya,
Thanks for your reply, Please find my response below
Is the DropDownList nested inside the cell?
Ans : I have bound the dropdownlist to the cell at serverside code (column type to dropdownlist)
2. Could you share the logic in the cell updating event that checks whether the item is already selected?
function uw_Exp_AfterCellUpdateHandler(gridName, cellId) { var cell = igtbl_getCellById(cellId); var colkey = cell.Column.Key; var curRowIndex = cell.getRow().getIndex(); var rows = igtbl_getGridById(gridName).Rows; var curLine = rows.getRow(curRowIndex); var curGridName = "<%=uw_Exp.ClientID%>"; var curCellId = cellId.substring(cellId.lastIndexOf("_") + 1); var grd = igtbl_getGridById(curGridName); var actRow = igtbl_getActiveRow(curGridName); var rowIndex = actRow.Element.id; var curRowId = rowIndex.substring(rowIndex.lastIndexOf("_") + 1); var grdRws = grd.Rows; var rws = grdRws.length; actRow.getCell(0).setValue(eval(curRowId) + 1); if (colkey == "Item_Name") { if (actRow.getCellFromKey('Item_Name').getValue() != null) { for (i = 0; i <= rws - 1; i++) { if ((curRowId != i) && (actRow.getCellFromKey('Item_Name').getValue() == grdRws.getRow(i).getCellFromKey('Item_Name').getValue())) { alert('This Item already exists'); } } } } }
3. Which version of our control are you currently using?
11.1
Hello karthikeyan ,
Thank you for posting in our forum.
I have some additional questions regarding the exact scenario:
Could you share the logic in the cell updating event that checks whether the item is already selected?
Which version of our control are you currently using?
I’m looking forward to your reply.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support