1>How do I initially focused to the first cell in the first row??

1>How do I initially focused to the first cell in the first row??

Shashidhar.nkShashidhar.nk Posts: 21Questions: 5Answers: 0

and 2>how do i disable key-navigation(arrows/tab), when inline form is open until form is submitted by pressing enter key??

here is debugger link: http://debug.datatables.net/inejil

for 1st question: actually i used keys:{focus: '#upcomingHearingsTable tbody tr td:eq(0)',}, but still i am not getting it focused..

for 2nd question: i used keys.keys but it only listen for that keys, and i am not getting how to prevent it till the form submission,

reply me soon..

Answers

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    Hi,

    You could use the keys.enable() and keys.disable() methods, attached to the open and close() events (i.e. on open call keys.disable()).

    Allan

  • Shashidhar.nkShashidhar.nk Posts: 21Questions: 5Answers: 0
    edited July 2017

    Hi,

    I used keys.enable and disable methods, But, facing the same problem,

    here is my code:

    upcoming_hearings_edit.on('open', function (e, type) {
                    if (type == "main"||type == "inline") {
                        upcoming_hearings_view.keys.disable();
                    }
                })
    
                .on('close', function (e, type) {
                    upcoming_hearings_view.keys.enable();
                });
    

    what i need to do is.. Initially table's first cell should be focused and through key navigation i will move to another cell and i will edit the cell(inline, by pressing enter), while editing keys navigation should be disabled, why because, keys navigation submits the data..
    so until the form submitted by user through enter key pressed, keys navigation should be disabled..

    reply me soon..

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • allanallan Posts: 63,482Questions: 1Answers: 10,467 Site admin

    That looks like it should be all that is needed. COuld you give me a link to a test case showing the issue please?

    while editing keys navigation should be disabled, why because, keys navigation submits the data..

    That's how Editor's inline editing mode works. It does not queue the data - it will always send an Ajax request after each cell has been submitted. Disabling KeyTable will not change that.

    Thanks,
    Allan

This discussion has been closed.