Skip to content

Replies

0
LUIS LEDESMA
LUIS LEDESMA answered on Mar 12, 2015 1:25 PM

Well, maybe there is no better way 🙁

0
LUIS LEDESMA
LUIS LEDESMA answered on Feb 16, 2015 9:01 PM

Thanks Michael. Yes, I am using the grid to let user enter data. I found a way to clear grid's data and reuse the grid after posting:

$('#MyGrid').igGrid('commit');
var ds = $("#MyGrid").igGrid("option", "dataSource");
ds.Records.splice(0, ds.Records.length);
$("#MyGrid").igGrid('option', 'dataSource', ds);
$("#MyGrid").igGrid("dataBind");

But, is there a better way?

0
LUIS LEDESMA
LUIS LEDESMA answered on Feb 4, 2015 6:54 PM

Thank you Vasya. It works fine now. Basically you changed .igEditor("setFocus", true) to .igEditor("setFocus", -1) and .delegate to .on, I think the main change is in the parameter to delay set focus. 

0
LUIS LEDESMA
LUIS LEDESMA answered on Feb 2, 2015 4:26 PM

By the way, that happens in your code, in my code after getting focus on cell "ProductName" (with your code) focus is automatically set to first cell again, but I can move to other cells.

0
LUIS LEDESMA
LUIS LEDESMA answered on Feb 2, 2015 4:09 PM

Hi Vasya, this code doesn't allow to change focus manually, so users can't move to other cells and I see that igeditorfocus runs many times. 🙁

0
LUIS LEDESMA
LUIS LEDESMA answered on Nov 25, 2014 4:21 PM

OK Jason, thank you, now I understand why findRecordByKey is not good for that event. Thanks a lot!

0
LUIS LEDESMA
LUIS LEDESMA answered on Nov 23, 2014 1:58 PM

Ok, I solved this part of the mistery -still waiting for the answer about ui.values to access new child rows. By default, ui.values does not contains values for cells of new rows if they (the cells) are hidden, what we need to do is to set them. For example, if we have a cell called RowState that we don't want users to see it because it is for system use only, then we have to set its value in the iggridupdatingrowadding's event:

$(document).delegate("#Grid", "iggridupdatingrowadding", function (evt, ui) {
   ui.values["RowState"] = 0;
});

Am I right Jason?