682
Views
7
Comments
Solved
[OutSystems Data Grid] how to get Current Row Number on clicking any column in Grid
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.14.8 (Build 58515)

In a DataGrid Reactive 

I want to get the current row number on clicking any column inside grid.

For Example if i click on March i should get value "3"


workspaces_9MpACJsYik.png
2024-05-17 04-26-02
Maxime Baracco
Solution

Hi Hamza,


I forked the Data Grid component to send the click event parameters (row and column numbers): https://www.outsystems.com/forge/component-overview/13211/data-grid-with-click


Does it solve your problem?

2025-01-31 20-15-29
Hamza Gulzar
Champion

Thanks I will review. I also used JavaScript to get the numbers

UserImage.jpg
Flavio Cândido Soares

Hi Hamza

I believe you want to get the grid line number.

1st Create a local variable (CurrentRowNumber)

2nd Click on Roll Cell
 \ Properties \ Events \ Event \ add an onclick event

3rd Add a new client action

4º Add an Assign with the variable (CurrentRowNumber) and pass the grid value (nameGrid.List.CurrentRowNumber)

5º Repeat the step for the other Row Cells (with the same Client Action)

To show the value of the row add an Expression with the value of the variable (CurrentRowNumber)


2025-01-31 20-15-29
Hamza Gulzar
Champion

I am working with DataGrid. We dont have options like getting CurrentRowNumber or calling events onClick

2024-05-17 04-26-02
Maxime Baracco
Solution

Hi Hamza,


I forked the Data Grid component to send the click event parameters (row and column numbers): https://www.outsystems.com/forge/component-overview/13211/data-grid-with-click


Does it solve your problem?

2025-01-31 20-15-29
Hamza Gulzar
Champion

Thanks I will review. I also used JavaScript to get the numbers

2021-09-06 15-09-53
Dorine Boudry
 
MVP

For future reference of anybody with the same problem :

if you prefer not to clone the datagrid component, this forge component offers a non-invase alternative to be used alongside the normal datagrid component.

DataGridEvent

2022-11-12 11-28-30
Gonçalo Martins
Staff

Agree 100% @Dorine Boudry 

In the product team, we always try to fit new features that might add extra value to it and prioritize accordingly - and this is one we have on our backlog.

Cheers,
GM

2021-09-06 15-09-53
Dorine Boudry
 
MVP

@Gonçalo Martins ,

great to hear this is on your radar, maybe you can share that also on this idea.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.