cancel
Showing results for 
Search instead for 
Did you mean: 

insert a new row between two dynamically generated from igrid

Former Member
0 Kudos

Hi All,

I am displaying a dynamic table with 10 columns , three of its coolumns are populated from the grid

rest user needs to enter .

For entering columns user might need to insert a new row (example like when we click on in people soft a new row is inserted)

I am able to insert the row at the end of the last row of the dynamically generated table but not in between where actually user wants to insert

Any reply is appreciable

Thanks & Regards

Namita

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Namitha,

I could think of a workaround. Its not advisable for a perfect solution to you problem but it will do the trick. Insert row in the igrid as mentioned in earlier posts. Then generate the table again using the javascript function.

I suggest you to do some R&D on javascipt or XSLT forums. There you'll be able to get a perfect solution.

Hope that helps

Regards,

Musarrat

Former Member
0 Kudos

Thanks for the responses

I want to speak on java script part too

But i am not sure if i can do here in MII forums

in scripting language there is ABAP , PHP but not java script

Please let me know if i could discuss java script here

Thanks

Namita

Former Member
0 Kudos

Hi Namita,

You can discuss javascript here.

Thanks,

Manisha

Former Member
0 Kudos

Hi namitha,

Javascript is not a SAP technology. I suggested you the search for some forums so that you can get faster response there.

Some links that may help you.

http://www.codeproject.com/KB/HTML/html.aspx

http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s

Hope that helps.

Regards,

Musarrat

Former Member
0 Kudos

Hi Namita,

If you want to insert a new row in the grid,

maybe getGridObject().setCellValue(ROWNUMBER,COLNUMBER,VALUE) can not work.

For it can only cover with the original one rather than add one.

If it is the real situation you met.

The only solution I can think up is:

You can use a transaction to manipulate the results, add one row in any position of the rowsets.

If you already have a datasource, you can update it with the new results. and reload the results in grid.

If alter your datasource may cause some trouble, you need save the new results in a temporary datasource such as a XML file.

Use a icommand to execute the transaction after click some button, then update the grid.

It's a complex way, hope it can help you.

Thanks & Regards

Kavin

Former Member
0 Kudos

hi, namita

if u want to update ur db from ur grid, it will not work. the data u changed is just at the ui level.

u must call a transaction that have the certain actions perform the db updating task.

you just want to change the date in the grid at the ui level, js will do that.

funtion name :document.Appletname.getGridObject().setCellValue(ROWNUMBER,COLNUMBER,VALUE)

have a nice day

Former Member
0 Kudos

Hi Namita,

If you want to insert a row in the grid, then you use this method:

document.Appletname.getGridObject().setCellValue(ROWNUMBER,COLNUMBER,VALUE)

By using dynamically generated table code, you can not insert a row in a grid.

IF you want to insert a row at the end of the grid, then you can use the javascript code for dynamically generated table.

Thanks,

Manisha

Former Member
0 Kudos

Assuming you want to achieve this with the iGrid (not the table as you've mentioned in the post) the only method available is getGridObject().setCellValue(row num,column num,column val).

You will have to play with this to achieve your scenario.

If its an HTML table you are talking about then I am sure JavaScript would definitely enable you to do that.