cancel
Showing results for 
Search instead for 
Did you mean: 

Edit table view - Toggle functionality on button click

Former Member
0 Kudos

Dear CRM experts,

I am fresh to CRM. I have a requirement to edit all fields of a table view based upon a click of button (toggling between edit/display) in a custom component. I have created  a table view using Value node. I have already attached EDIT button. By default , everything is appearing in Editable Mode. I also found that we have GET_I_ACTIVE method for the same and even I am able to do this using this method. But, this does not look fancy as for each attribute I have to code here whereas I have same behaviour for all attributes. Is there any other simpler way ? Pls guide how to proceed. Here, I hv two questions -

a) Why its appearing editable by default , where is the setting for this default behaviour?

b)How do I achieve toggle functionality -( By default - it should appear as Display but when required it should change to edit mode by click on a button ).

I have attached .HTM file for this.

I am able to find lot of replies for MODAL nodes but not for Value Node.

Also, if someone can share any links, documents which explain BOL genil will be highly appreciated.

Regards

Nishant

Accepted Solutions (1)

Accepted Solutions (1)

former_member186543
Active Contributor
0 Kudos

Hi Nishant

I have just checked your html file . For the configCellerator tag , we have an attribute ( editMode ) which decides whether the table is in edit mode or display.

Possible values of this attribute is NONE , ALL , SINGLE.

Create an event handler , which will trigger on the click of the EDIT button and create a public attribute in the IMPL class of the view named as : gv_editable.

Set the value of this variable in the event handler as NONE or ALL on alternate clicks and you can access this value in the HTML file.

Your Html code will look like:

<chtmlb:configCellerator downloadToExcel       = "TRUE"

                         id                    = "ConfCellTable"

                         editMode          = <%= controller->gv_editable %>

                         onRowSelection        = "select"

                         personalizable        = "TRUE"

                         selectedRowIndex      = "<%= EFFORTDATA->SELECTED_INDEX %>"

                         selectedRowIndexTable = "<%= EFFORTDATA->SELECTION_TAB %>"

                         selectionColumn       = "<%= lv_cellerator_selectioncolumn %>"

                         selectionMode         = "<%= lv_cellerator_selectionmode %>"

                         table                 = "//EFFORTDATA/Table"

                         usage                 = "EDITLIST"

                         visibleFirstRow       = "<%= EFFORTDATA->VISIBLE_FIRST_ROW_INDEX %>"

                         visibleRowCount       = "6"

                         width                 = "100%" />

/Hasan

Former Member
0 Kudos

Hello Hasan,

Thanks for your help. I will try this tomorrow as I am back from work now. I will appreciate if you could also provide me pointers to some links, documents which explain BOL genil , Modal Objects/Nodes, Value Nodes etc.

Regards

Nishant


former_member186543
Active Contributor
0 Kudos

Hi Nishant

BOL How to : http://scn.sap.com/docs/DOC-4108

SAP CRM tech : http://sapcrmtutorial.blogspot.com/

/Hasan

Former Member
0 Kudos

Thanks Hasan for the help. It worked. Could you pls also help me with delete button. I need to select few rows and provide delete functionality.

Regards

Nishant

Former Member
0 Kudos

Hi Hasan,

Again I have some issues with EDIT functionality. I hv placed EDIT button and I am filling one global variable gv_edit = 'ALL' and passing this value in .HTML file. By default, my table has 1 row. It works fine with it. I am abl to toggle between EDIT/DISPLAY. But I hv one more button for inserting rows. When I insert new row and click on EDIT , I am able to edit only 1st row. So, to summarize, the behaviour of 1st row is only changed with EDIT button. Pls advise.

Thanks

Nishant

Answers (0)