添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
路过的大象  ·  Apache OpenOffice ...·  1 周前    · 
想出国的豆腐  ·  PostgreSQL Python: ...·  1 周前    · 
谦逊的楼梯  ·  Introduction to plottable·  5 天前    · 
睿智的钢笔  ·  Plots in plottable·  5 天前    · 
温柔的苹果  ·  GitHub - ...·  4 天前    · 
火星上的海豚  ·  SpotBugs·  1 年前    · 
风流倜傥的木瓜  ·  vue 中 ...·  1 年前    · 

Hi All,

Can someone help me getting the index on selection of row?

I am able to get the index but the issue is visible row index is getting fetched on row click event.

For example:

Actual Row number in the column is 17.

As I have made visible row count to 5, the values when scrolled down, on click of the button event (image column), the index is coming between 0 to 4 only.

I am using Sap.ui.table.

Any help on this is much appreciated.

Thanks,

Venkatesh

Check this blog for your issues:

https://blogs.sap.com/2014/04/08/understanding-sapuitabletable-in-10-minutes/

Also, try to bind an event handler for the event rowSelectionChange. In this method, you should get the index in the data set.

Regards,

Sharath

Hi Sharath, thank you so much for responding. :slightly_smiling_face:

It's already working based on rowSelectionChange.

I have got the index through getContextByIndex but the challenge is with the segmented button in my table which will be resolved if the button gets refreshed after the user takes the action. Please see the attached image.
So, the issue is "index of the Segmented Button" in the table is not getting fetched properly.

Table is getting refreshed but the button which is pressed is staying as it is like shown in the image even after scrolling away from the record (scrolling down I mean).

Here is the code of the column:

		var oAction = new sap.ui.table.Column({
				label: new sap.ui.commons.Label({text: "Action"}),
				template: new sap.ui.commons.SegmentedButton({
					id:"arBtn",
					buttons:[
						    new sap.ui.commons.Button({id:"BtnApr",text:"{Action}", style:sap.ui.commons.ButtonStyle.Accept}),
						    new sap.ui.commons.Button({id:"BtnRej", text:"{ActionRej}", style: sap.ui.commons.ButtonStyle.Reject})
					select : oController.segmentBtn
		colList.push(oAction);
  

capture.png

Thanks,

Venkatesh

sap.ui.commons.segmentedbutton is deprecated. So please use sap.m.segmentedbutton.

Meanwhile, what is the actual requirement? Is it to refresh the buttons? or Is it to get the selected button?

Regards,

Sharath

Failed to load component for container - ModuleError: failed to load in Technology Q&A ALV CONTROLL TREE in Technology Q&A SAP Cloud Integration Advanced Event Mesh Adapter: OAuth Authentication [3] Authorization Code + IAS in Technology Blogs by SAP Issue in displaying simple chart using flexible programming model in sapui5 in Technology Q&A Knowledge graphs for LLM grounding and avoiding hallucination in Technology Blogs by SAP