Is it possible to make rows editable in a readonly data display grid?

Certified Associate Developer

Hello All,

I have a grid for displaying the data and as the number of columns are very huge around 50, I can not use editable gridcontrol. So is there a way to make a specific cell editable based on the index selection. Lets say for example, My design looks like below

 

ENO    Name    Age

1         abc       40

2         pqr       30

3         xyz       10

Now, Lets say we have a validation where user can not insert age below 20. So based on that criteria the last row is not acceptable. So for that we want to provide drop down column to the user where the list of indexes available in which there is any validation issues and on the basis of that index selection the record at the cell would appear into editable component. In this case the index would be 9. That means the dropdown will show index 9 to user and when they click on the index. The field at index 9 should appear in editable format so that user can change its value

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer
    The standard way I handle this in a Paging Grid context is to make the grid selectable (or make one of the text columns a link), and upon the user selecting or clicking on any of the links, dynamincally show a new field/section below the grid where the user can then take further action, such as viewing extended details or providing edits. Validation would then be handled on these fields, and the user would need to click a button to commit their changes.
  • As suggested by Mike you can do that approach, If you want to allow user to edit Multiple Fields, Then you can go with the grid selection as well. Suppose you want to change the Name and Age at one go, Have a selection enabled for that grid, Once user selects that row, display the Fields that can be edited and provide a button like "Update".
  • 0
    Certified Associate Developer
    in reply to chandu
    Thanks Mike and Chandu for your valuable comments. your suggestions seems to be perfect for me but there is one issue with the data that is displayed in the grid. each and every cell in a grid points to a single array item. So for example if we talk about the grid I mentioned above, In that case there are three rows but the array size is 9 which means value 1 is in one index,abc is on second index,40 is on third index. Similarly goes for other i.e 2 is on 4th index and so on. Now my question is if I want to allow user to select a particular row and update the values of each and every item in that row. Then How would I achieve this?
  • 0
    Certified Lead Developer
    in reply to viveku3486
    If the array is 9 members instead of 3 rows of 3 values, then what logical method are you using to divide it up into 3 rows in your grid? Also is there a particular reason you're not using an array of CDT where the CDT has the particular properties each row is interested in (ENO, Name and Age)? If you were able to do it that way, it would make this and several other things a lot easier.
  • 0
    Certified Associate Developer
    in reply to Mike Schmitt
    Its actually a cdt but whats happening here is I'm creating an excel file via export cdt to excel smart service. So my overall cdt is getting divided into multiple fields and as user can enter any number of rows and then upload the file, It creates a separate array for each item while i display the grid. To be more precise on what i'm saying let me give a quick example.

    Suppose my cdt has three fields i.e
    cdt:{
    label,
    required,
    type
    }
    Then I'm displaying label field inside the excel sheet. Now Suppose the above given example is taken from cdt then original cdt would be something like

    cdt:{label:Ename,required:true,type:1},{label:Name,required:true,type:1},{label:Age,required:true,type:1}
    Now when I display this label inside excel file and user enters the record inside it, We have to take it individually for each and every item entered and that divides the cdt into multiple array index
  • 0
    Certified Lead Developer
    in reply to viveku3486

    So for clarification, exactly how are you splitting the resulting data into separate rows on-form within Appian?

    At the end of the day I believe you will probably want to take the effort to devise and maintain a data structure that will actually work well within Appian, which if you hope to use a grid approach, I don't believe it will be very feasible to use the approach where every member of the array represents a separate cell.  You should be aiming for a CDT something more along the lines of,

    {
    id,
    Name,
    Age
    }


    where you will then have an array of these, each member of which representing a row in your grid.