Editable Datagrid: focus shifts to next row on click : Urgent

I have an editable datagrid and when I change the value of a cell and then instead of tab I click on the cell adjacent to it, the focus automatic shifts to the next row. I have no freaking idea why?
Any help is appreciated. Thanks a ton in advance.

Issue Resolved 
Need to set lead selection to next element in the node using MOVE_NEXT method of IF_WD_CONTEXT_NODE interface.
rest of the code remains same.

Similar Messages

  • Create row as next row on click of add another row button not on top of it

    My af:table is based on a transientVO (all the attributes are transient)
    This is just for data entry and not for data retrieval
    So i have placed add another row button on my af:table
    After i enter data in the first row and click add another row button the data is being moved to second row and the new row is created on top of that
    I want the row to be created as next row . not on top of my existing row
    How can we do this

    would this help you:
    http://lucbors.blogspot.com/2010/12/adf-11g-how-to-control-where-new-row-is.html

  • Focus shifted to next component after selecting item in combobox.....

    I have Table and a textfield as only two UI components.
    For the table i am using my custom editor(NewComboEditor.java), for this i am extending the "DefaultCellEditor" and applying this editor for my jTables first column. My custom editor simply prepares the editor by instantiating the jCombobox and sets the selected value and return it (in overwridden "getTableCellEditorComponent" method).
    I have made my combobox editable by setting "combobox.setEditable(true)" in constructor of editor while creating the instance of combobox.
    Now everything works fine except whenever i tried to select an item from the combobox , after the item selection, focus is assigned to textfield which is the nextfocusable component to jTable on which the comboboxes are rendered.
    If my jcomboboxes are not editable then selection remains on combobox only.
    The implemetation for the comboEditor and comboRenderer is as follows.
    =========================== Main frame having all compenents =================================
    public class CreateAndShowComboBoxes extends JFrame {
        protected JTable table;
         * Default constructor..
        public CreateAndShowComboBoxes() {
          Container pane = getContentPane();
          pane.setLayout(new BorderLayout());
          //create table model, this table model extends AbstractTableModel.
          MyTableModel tableModel = new MyTableModel();
          table = new JTable(tableModel);
          TableColumnModel tcm = table.getColumnModel();
          TableColumn tc = tcm.getColumn(MyTableModel.LAST_NAME);//set to column 1.
          //specify the renderer and editor.
          tc.setCellRenderer(new ComboRenderer());     
          tc.setCellEditor(new NewComboEditor());
          JScrollPane jsp = new JScrollPane(table);
          pane.add(jsp, BorderLayout.CENTER);
          JTextField textField = new JTextField();
          table.setNextFocusableComponent(textField);
          pane.add(textField, BorderLayout.SOUTH);
         * Create a frame and make it visible.
        public static void main(String[] args) {
            CreateAndShowComboBoxes stt = new CreateAndShowComboBoxes();
            stt.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            stt.setSize(400, 300);
            stt.setVisible(true);
    ============================================ComboEditor =========================================
    public class NewComboEditor extends DefaultCellEditor{
         *Default constructor.
        public NewComboEditor() {
            super(getComboBox());
            JComboBox combobox = (JComboBox)getComponent();
            combobox.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    //fireEditingStopped();
                    //stopCellEditing();
         * Override to invoke setValue on the formatted text field.
        public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected,
                                                        int row, int column) {
            JComboBox cb = (JComboBox)super.getTableCellEditorComponent
                                            ( table, value, isSelected, row, column);
            cb.setSelectedItem(value);
            return cb;
         * @return object
        public Object getCellEditorValue() {
            JComboBox cb = (JComboBox)getComponent();
            Object o = cb.getSelectedItem();
            return o;
         * @return true
        public boolean stopCellEditing(){
            JComboBox cb = (JComboBox)getComponent();
            cb.requestFocus(true);
            return super.stopCellEditing();
         * @return combobox instance
        public static JComboBox getComboBox(){
            JComboBox combobox = new JComboBox();
            combobox.setEditable(true);
            combobox.addItem("khan");
            combobox.addItem("rawal");
            combobox.addItem("shetti");
            combobox.addItem("more");
            combobox.addItem("sohel");
            combobox.addItem("kambli");
            combobox.addItem("warne");
            return combobox;
    ========================================= ComboRenderer ====================================
    public class ComboRenderer extends JComboBox implements TableCellRenderer {
         *Default constructor.
        public ComboRenderer(){
            super();
            addItem("khan");
            addItem("rawal");
            addItem("shetti");
            addItem("more");
            addItem("sohel");
            addItem("kambli");
            addItem("warne");
        public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
            boolean hasFocus, int row, int column) {
          setSelectedItem(value);
          return this;
    ======================================================================================Message was edited by:
    yuvi
    Message was edited by:
    yuvi

    Hi Pravin Ghadge,
    Please Use this code for focus.
    oMat.Columns.Item("Column_UID").Cells.Item(oMat.VisualRowCount).Click(SAPbouiCOM.BoCellClickType.ct_Regular)
    I hope it will work.
    Thanks,
    P.T.Sampath.

  • How  to set focus on next row inputfield in table

    Hello all,
    How  to set focus on next row input field in table
    Please help.
    Thanks in advance.
    CSP

    Hi,
    use the following code
    wdThis.wdGetAPI().requestFocus(nodeElement, attribute)
    Ex:
    Provide the attribute and replace the nodeElement with that of yours
    IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute("Your attribute");
           wdThis.wdGetAPI().requestFocus(wdContext.currentContextElement(), attributeInfo);
    Regards
    Ayyapparaj

  • How to set the current row in table automatically when tabout from one row to next row

    Hi
    I'm using jdev 11.1.2.0.0
    How can we set the  row(in which row focus is)  as current row in the table?
    If we create a table with single row selection, then whichever row we select, that row becomes current row because of the selection listener(#{bindings.xxvo.collectionModel.makeCurrent}).
    Then if we do tabout from one component to another component in table and moved to next row, then the focus would be on another row .
    when focus is shifted from one row to another row, then how can we make the focused row as current row or selected row.
    Any suggestion would we appreciated
    Thanks.

    Add clientListener inside table component and set client listener type to dblClick with method as a JavaScript method name.
    <af:clientListener method="dblclk" type="dblClick"/>

  • Vertical scroll in edit mode and Open a complete row in edit mode

    Any help would be greatly appreciated , if someone can share their knowledge/experience on the following two items ..
    1. Can you please help on how to implement vertical movement in  data grid (Using the up and down arrows to move from an editable cell in one row to the same column in the previous/next row) just like using tab to move in the same row, from one editable cell to the next? Please note we are able to implement the user navigation in editable mode in  one   single row and the user tabs from left to right and the cells  render in edit mode without issues.We are trying to implement this in a vertical fashion to have the  datagrid cell rendered in edit mode from one column  in one row to the same column in the next row ..We are tryinng to simulate the same user feel when a user navigates in Excel sheet.
    2.       Is there a way to open a cell in Flex datagrid edit mode by default? I understand that the itemrenderer for that column could be a text input but I don’t always want that cell to be in an edit mode. When the user comes to the screen, it needs to be in an edit mode just as a visual indicator that it can be edited. Once the user finishes editing, the cell can use the default itemrenderer. In other words, how do we fire an edit event on a cell when it is rendered for the first time by default? In nut shell how do you open all fields in the entire row  in edit mode  (rather opening one cell at a time it in edit mode as the user tabs from left to right ) 

    Can anyone help answering the question we have ? Any pointers would be greatly appreciated

  • Editable DataGrid won't sort correctly

    This is the weirdest behavior I've ever seen...
    I am working on a datagrid (editable="true"), and for some reason the thing does not want to sort correctly. It is a basic datagrid with itemrenderers for each column so that we can edit in the grid. Sorting should happen on a header-click, but if you click the header, it seems to simply select the first row, or another random row, and doesn't sort. It does fire the "itemEditEnd" event. However, if you click anywhere but the header, drag the mouse to header and then let go,  (mouseUp on the header), then it sorts perfectly fine (and doesn't fire that event). If I take the "editable=true" off the datagrid, it sorts fine on header-clicks, but then the datagrid won't save.
    Does anyone have any ideas? There isn't any custom behavior on the header, though I could add some if it would help. I've tried everything I can think of, but nothing seems to help.
    This seems to be somewhat related to this (unsolved) issue.
    http://bugs.adobe.com/jira/browse/SDK-18302
    Thanks,

    I have noticed in the livedocs under, "Working with item renderers" (currently as I type this post the livedocs is unavailable, so I am able to give you a URL) there is a Datagrid that functions incorrectly when the user clicks on header columns.  I am not sure why they haven't fixed this yet, but is this similar to what you are experiencing?  I believe on the same page, they mention about the differences with creationComplete and dataChange.  Are you listening to any of those events?  creationComplete is rarely used in an itemrenderer.   dataChange is used more often which I have noticed that a conditional statement is needed to prevent strange behavior (perhaps the same as you mentioned).

  • Formatting a field before committing from editable datagrid

    Hi,
    I have an editable DataGrid which displays two columns, date
    and value. Now, the date in the dataProvider is actually stored as
    an integer (yyyymmdd) so I format it using a labelFunction to
    display. I then have a custom itemEditor to set it to a date for
    calling into the DateField.
    The next step, and where I'm struggling, is to update the
    dataProvider with an integer (yyyymmdd) calculated from the
    selectedDate. Can someone please help me with how to do this?
    Thanks!

    See the docs for data grid editing events, such as, I think,
    itemEndEdit.

  • Get the next row in EL

    Hello all!
    Possibly the thread name isn't clear or is wrong, i'll just explain:
    there's a column, which contains Iterator (since it's point is to display collection data separated by ', '). I found it reasonable to add 2 outputText's inside Iterator: one for the value, and another for ', '. The second should have an EL value, which should contain a statement similar to #{<nextRowExists> ? ', ' : ''}.
    Hope You get my point, i just want to find out if there's a next row or not using EL to decide whether i need another ', ' or not. :-)
    Many thanks!
    Edited by: 866307 on Jun 29, 2011 6:57 AM

    Hi
    ADF Bindings shows all Iterators from that iterators select relevant one and,Then you can get estimatedRowCount that returns the number of rows in the collection defined by associated viewObject.Also you can get current row using currentRowIndexInRange.
    all records --> #{bindings.IteratorName.estimatedRowCount}
    current record -- >#{bindings.IteratorName.rangeStart+bindings.IteratorName.currentRowIndexInRange+1}
    see:
    Re: How to show row ranges on the table.
    I think these information will help you to resolve your problem.

  • Editable datagrid firefox problem

    I have created an application that contains an editable
    datagrid but experiences problems when using the firefox browser.
    If there are multiple tabs of firefox open and an item is selected
    in the grid, when switching between the firefox tabs, the datafield
    in the grid becomes selected for edit without clicking on it. It
    appears that some kind of event is being called to change an entry
    in the grid. Similar results occur when changing between different
    windows i.e. firefox and flex builder.
    However, I don't have this problem when using internet
    explorer.

    That should be true for any Flex component.  Focus is always on something, you have to move it to a new place otherwise it gets restored back to what last had foucs.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Editable Datagrid from programmaticaly built XmlListCollection help needed

    Hi, I am trying to build an editable datagrid with 20 empty
    rows in it. Users will fill out the cells, this then gets persisted
    to a DB, then later by making selections in a combobox, they can
    bring this data back for viewing and/or modification. I have been
    trying to create the XML dynamically and then addItem on the
    XmlListCollection to no avail. Can someone please point out where I
    am going wrong? Thanks!
    [Bindable] private var teamGridDataAsXml:XML;
    [Bindable] private var teamGridData:XMLListCollection;
    private function initEmptyTeamGrid():void {
    teamGridData = new XMLListCollection();
    var s:String = "<rows>";
    for(var i:int = 0; i < 20; i++) {
    s += "<row rowIndex=\'" + i + "\' agentId='' firstName=''
    lastName='' country='' />";
    s += "</rows>";
    teamGridDataAsXml = new XML(s);
    teamGridData.addItem(teamGridDataAsXml);
    <mx:DataGrid id="agentInfo" editable="true"
    dataProvider="{teamGridData}" width="100%" height="100%"
    rowCount="20">
    <mx:columns>
    <mx:DataGridColumn headerText="#" dataField="@rowIndex"
    editable="false"/>
    <mx:DataGridColumn headerText="Agent ID"
    dataField="@agentId" editable="true"/>
    <mx:DataGridColumn headerText="First Name"
    dataField="@firstName" editable="true"/>
    <mx:DataGridColumn headerText="Last Name"
    dataField="@lastName" editable="true"/>
    <mx:DataGridColumn headerText="Country"
    dataField="@country" editable="true"/>
    </mx:columns>
    </mx:DataGrid>

    teamGridDataAsXml = new XML(s);
    trace(teamGridDataAsXml.toXMLString() ); to be sure you have
    good xml
    var xlRows:XMLList = teamGridDataAsXml.row;
    trace(xlRows.length()); //what you expect?
    teamGridData =new XMLListCOllection(xlRows);
    You could skip the xml variable and go straignt into the
    XMLListCollection also. In the loop, build the XML node, using XML
    literal syntax, and then call addItem *inside the loop*.
    Tracy

  • Editable Datagrid

    Hi All,
    I have a editable datagrid using vertical scroll, every time i finish editing a top row the cursor jumps down and the scroll bar moves down also.
    This only happens when i use itemEditEnd event.
    Any ideas?
    Thanks
    (Using SDK 4.5.1)

    I see this behavior using itemEditEnd but only when I do refresh the arraycollection data of the grid. I am using:
    protected function laborRates_itemEditEndHandler(event:DataGridEvent):void
                 if (event.reason == DataGridEventReason.CANCELLED)
                        // Do not update cell.
                        return;
                    if (isNaN(event.currentTarget.itemEditorInstance.text) || event.currentTarget.itemEditorInstance.text == "" || Number(event.currentTarget.itemEditorInstance.text) < 0 ){
                        event.currentTarget.itemEditorInstance.text = 0;
                    event.currentTarget.dataProvider.refresh();  //Here is the issue
    Any ideas how can I control this scroll?
    Thanks

  • Random Focus Shift

    Hello,
    Recently, I'm not sure if it was after the 10.5.4 update or not, but regardless, still recently, I've a bunch of focus shifting issues. What I mean by that is that sometimes the focus of a window randomly changes, say I have two windows open in Safari, suddenly the focus just changes from one to the other, or sometimes the application just shifts all together (Safari to Finder). Also, when filling in a form, the focus may change for no apparent reason, and the same seems to apply to keyboard controls in embedded flash. Has anybody else experienced this issue?

    I am having exactly same problem.
    At first, I thought it was finder's problem. But after suffering from the problem for like 5 months, it appears to be another process that's stealing the focus.
    I still don't have any clue as to which process is doing such a horrible thing.
    It's getting worse. At the time I first upgraded to the Leopard, it was not so often that I didn't even notice it except for when I was trying to rename a file with the Finder. But now, it's happening very often and it happens even when I'm fiddling with firefox!!
    As I went through this annoyance, I found out that it usually happens with a spike in the CPU usage and IO usage. So I guess the culprit might be some service that's running in the background, indexing filesystem or doing some sort of house chores.
    I really wish that the developer guys at Apple would at least give a dime at this age old problem.
    There are people suffering from the same problem :
    http://discussions.apple.com/message.jspa?messageID=7668279#7668279
    Message was edited by: Orchistro

  • Table with column group (one column) - next row is showing on new page instead of below previous row

    I am creating new table. My goal is to display some text in few lines like this:
    "AAAAAAAA"           "BBBBBBBB"           "CCCCCCCCC"     
    "DDDDDDD"           "EEEEEEEE"
    Actually the next row (with "DD" and "EE" values) is not displayed below first row, but on the next page.
    I've tried to put table into rectangle, disabled all page breaks and still the same effect. Any help?

    Hi Heidi,
    Actually, it's not solution, I only gave more details about my problem :)
    Another description:
    In my report I'm creating Tablix with Column grouping. There is only one column with image (every image has same width). If there is only three pictures, then they are displayed next to each other in one row.
    In case, there is more than three pics, another row is showing on next page. I'd like to display all rows one after another on one page.
    I've tried to create three vertical lists, and filter each column group to display only records:
    1) =(RowNumber("Tablix1")) mod 3 = 1
    2) =(RowNumber("Tablix1")) mod 3 = 2
    3) =(RowNumber("Tablix1")) mod 3 = 0
    Unfortunately, I got an error:
    "A FilterExpression for the tablix ‘Tablix1’ uses the function RowNumber.  RowNumber cannot be used in filters."
    Do You have any other propositions?
    --------EDIT--------
    ok, I manged to solve it. As I said, I've created three vertival lists and placed them next to each other.
    Then, instead of using filter, I've used Visibility trigger:
    1)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix1") mod 3 = 1, false, true)
    2)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix2") mod 3 = 2, false, true)
    3)
    =IIf(RunningValue(Fields![rowgroupfield].Value, COUNTDISTINCT, "Tablix3") mod 3 = 0, false, true)
    I had to use function RunningValue to count all occurrences, as my report is quite complex and "RowNumber" [ssrs function] and "ROW_NUMBER() OVER (ORDER BY [rowgroupfield])" [sql query] were not working properly.

  • Focus shifts to the top of the screen on slecting value from messagechoice

    Hi All,
    While selecting a value from message choice field, focus shifts to top of the screen and user needs to scroll down.
    Due to fireAction event on messageChoice field, I think, page has to completely render and focus shifts to top of the screen.
    As a solution, I am thinking about to regain focus on the same filed, after fireAction event gets triggered.
    For this, what changes should I do?
    Please advice.
    Thanks,
    Naresh
    Edited by: 958039 on Mar 7, 2013 7:44 PM
    Edited by: 958039 on Mar 7, 2013 7:54 PM

    Why do you have a fireAction event set? Can you change it to firePartialAction?
    Thanks
    Shree

Maybe you are looking for

  • I have to renew my password every time I want to sign in.

    Please can you help - every time I want to log in to the discussion forums, I get a red message telling me my password has been incorrectly entered. I use the same password and I have to go through resetting it every time. Why could this be happening

  • I am trying to find a power supply for the sony DRX-720 DVD/CD AND THE PRICE

    I am trying to find a power adapter for the sony DRX-720UL DVD/CD Rewritable Drive and the cost?

  • Trying to add Facebook like button to site

    Hi I'm having a bit of a nightmare I'm trying to add a Facebook like button with a direct link to like my facebook page I have read several posts on here regarding this saying how easy it is just copy & paste the code onto a html widget in iWeb Nothi

  • Scene never ends

    hello, my scene only contains 2 images. the 1st: a layer with the script "stop;", and,on another, a movie clip with the scrip: onClipEvent(load){ Calculate approximate kbps after test swf loads function getkbps(startTime,sizeInBytes) { elapsedTimeMS

  • -6531 Error on cursor

    Hi all, I am receiving the following error: ERROR: Exiting P_S_GENERATE_CONFIRMS with SQLCODE error: -6531:ORA-06531: Reference to uninitialized collection When I attempt to run the following: CURSOR owner_payee_cur IS SELECT DISTINCT TT_POL_NUM, TT_