1) can any one guide me that i have placed grid on my webform and when i enter data in it and press tab it moves to next cell and at the last cell pressing tab it creates new row but page is post back and focus is lost what is the solution of this???
2) i want to get those inserted values and want to enter in database which event will be used and how ???
Hello,You can use the KeyDownHandler of ClientSideEvents and use the JS function to add new row and get focus on cell with methods scrollToView and activate. Plase taka e look at the code below:<ClientSideEvents KeyDownHandler="Action" /> <script type="text/javascript"> function Action(gridID, cellID, key) { if (key == 9) { // 9==TAB key number var grid = igtbl_getGridById(gridID); igtbl_addNew(gridID, 0) var getNewCell = "UltraWebGrid1_rc_" + (grid.Rows.length - 1) + "_0"; var cell = igtbl_getCellById(getNewCell); cell.activate(true); cell.scrollToView(true); //to do some manipulation with the cell } return true; } </script>
Also you can take a look at the link below:
http://samples.infragistics.com/2008.2/webfeaturebrowser/default.htmGrid -> Database Updating
Hope this helps.