Bug Report T279832
Visible to All Users

ASPxGridView - Batch Edit - Keyboard navigation (Tab key) doesn't work if one cell is disabled for editing in Row edit mode

created 10 years ago

Hi there,

I have a gridview that is using batch edit updating.

I read this post:
https://www.devexpress.com/Support/Center/Question/Details/T121689

which says to set the value of a readonly cell, ie:
grid.batchEditApi.SetCellValue(grid.lastMultiSelectIndex, "PRODUCT_COST", cost.toFixed(2));

I need to remove the setting:
EditFormSettings.Visible = DefaultBoolean.False;

The problem is, if I remove this setting, tab ordering in the grid doesn't work any more, ie. I can't tab passed the readonly cell.
I need to have:
EditFormSettings.Visible = DefaultBoolean.True; for tabbing to work.

Without it, the grid tabs all editable cells until the read only cell but then none after the read only cell.  See the attached image for more info.

How can I setup a gridview so that I can update read only cells in batch mode using clientside batchEditApi.SetCellValue function but also maintain proper tabindex?

Regards,
Dave

Comments (3)

    Hello David,

    >>>  The problem is, if I remove this setting, tab ordering in the grid doesn't work any more, ie. I can't tab passed the readonly cell.
    I need to have:
    EditFormSettings.Visible = DefaultBoolean.True; for tabbing to work.
    Without it, the grid tabs all editable cells until the read only cell but then none after the read only cell.  See the attached image for more info.

    <<<  I am not sure that I completely understand the issue. If the column is not shown, it does not matter if it is read-only or not. Does the tabbing work when the read-only column is visible or not? It will also help if you provide us with related View files so we can understand your scenario better.
    I am looking forward to hearing from you.

      Hi Sergi,
      I have put together a simple example with the issue outlined and attached it to this post.
      When you run it, click on one of the rows on the start page to edit the fields.  You will not that the 'Age' column is not editable, but the rest are.
      If you put focus in the User Name column and click tab, focus shifts to Full Name, tab again and focus shifts to DOB, tab again and I would expect focus to shift to the Email column but it doesn't.  This is the functionality I want to have working.
      Now if you go into the solution file at:
      > \Views\Home\_GridViewPartial.cshtml
      and uncomment the following:
      //column.EditFormSettings.Visible = DefaultBoolean.False;  //Need this for tabindex to work
      then the tabbing works right along the row, but then I can't use the following line to update the "Age" column:
      GridView.batchEditApi.SetCellValue(grid.lastMultiSelectIndex, "Age", age);
      So I'm kind of stuck.  I want to be able to update the "Age" column, but also have the tabbing working.
      Can you show me how to do this in the supplied solution?
      Regards,
      Dave

      Artem (DevExpress Support) 10 years ago

        Hi,

        I've reproduced the issue and passed it to our R&D team. Please bear with us.

        In the meantime, you can use GridViewBatchEditMode.Cell and the following code:

        JavaScript
        function OnUserBatchEditStartEditing(s, e) { //Disable editing for certain columns var ageColumn = e.focusedColumn; if (ageColumn.fieldName == "Age") { e.cancel = true; // delete e.rowValues[ageColumn.index]; } }

        I've attached the modified sample.

        Thanks,
        Artem

        Answers approved by DevExpress Support

        created 9 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.