I have a form with an ultrawebgrid on it. When the user moves from the grid to the next textbox, I want to reset grid a so you cant see what cell was the last active cell.
How can I do this?
Regards,
Willie
I have created a small sample that demonstrates the issue.
Steps to recreate:
1) click on overrings - type any number and press enter
2) click on sales in the second grid. - type a number Notice how the first grid' is keeping the last column
3) click back into the first grid overrings . type a number . use the cursor to move right one column. type a number. notice that the number goes in the bottom grid instead of the top. This only happens if I cause a postback on exiting the cell. In my case I must issue an postback because the calc manager doesnt recalc all of the cells until a postback occurs. The production app has formulas on each column so the user only enters data in the cells that matters.
Ignore the other message. I did not realize that I could add an attachment. I am attaching the sample. It is a single aspx that demonstrates the issue I am having.
<%
%>
="Infragistics35.WebUI.UltraWebGrid.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
="Infragistics35.WebUI.WebDataInput.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<!
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
="server">
</
>
="text/javascript">
OnUwgKeyDown(gn, cellId, KeyStroke) {
/*
// Tab Key
if (KeyStroke == 9) {
SelectNextCell(gn);
return true;
}
if (KeyStroke == 13) {
*/
afterEdit(gn, cellId) {
alert("made it top afterEdit edit");
var grid = igtbl_getGridById(gn);
var cell = grid.getActiveCell();
cell.setSelected(false);
OnUwgAfterCellUpdate(gn, cellId) {
// var grid = gn;
igtbl_needPostBack(gn);
// SelectNextCell(grid);
;
SelectNextCell(gridClientId) {
var grid = igtbl_getGridById(gridClientId);
if (cell != undefined && cell != null) {
var nextCell = cell.getNextTabCell();
while (nextCell != undefined && nextCell.isEditable() == false) {
nextCell = nextCell.getNextTabCell();
if (nextCell != undefined) {
nextCell.activate();
nextCell.setSelected(true);
grid.beginEdit();
OnCellClick(gn, cellId, mouseButton) {
var oldgrid = document.getElementById("oldGrid");
if (oldgrid.value == "1") {
oldgrid.value = gn;
var grid = igtbl_getGridById(oldgrid.value);
} else {
if (oldgrid != gn) {
// x = y; // this just to cause a runtime error so i can debug the javascript
cell.activated = false;
grid.AllowActivation = true;
="http://www.w3.org/1999/xhtml">
People Served:
="0"
="1">
/>
="2">
="">
="0.00">
="3">
="None"
="Yes">
="NotSet">
="No">
="Register #">
="System.Decimal">
="OverRings">
="Voids">
="Separate"
="Extended"
="Fixed"
="4.00">
="Solid"
="8.25pt">
="1px">
="0px">
="Left">
="1px"
="Window">
="False">
="Verdana,Arial,Helvetica,sans-serif"
="200px">
="White">
="11px">
="Sales">
="Deductions">
="Total">
Thanks for the reply. Unfortunately it made no differance. I still had the box highlighting the cell that was last selected in the grid.
Maybe use the AfterExitEditMode handler and use the setSelected function with parameter false
see: https://ko.infragistics.com/help/winforms/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.ultragrid~afterexiteditmode_ev
Let us know if it helped!
Good luck!