Hi
i am using outsystems datagrid reactive component.i am using this with autogenerate option.i cant mention static column and action column.with out action column is it possible to display link against one record so i can open detail page if i click.
I just used a sample app, haven't configured anything different in my OML. Here's the URL to try out
https://personal-t4mpz2cn.outsystemscloud.com/DataGrid_Sample/
Hi Arkyadeep,
I don't think this is possible in current feature set of this forge component.
How did it go with your trials on the other componenthttps://www.outsystems.com/forge/component-overview/13211/data-grid-with-click
I guess you tried that a few days ago, did it end up with some issues?
I am using auto generate.i don't want to add any column in the grid.
Sorry I didn't understand what you mean by auto generate.
Is it the auto-scaffolding of the grid based on entity, like the accelerator? or something else?
If u did not mention any column in the grid and if u pass the json then it will populate the data based on your json
Alright I got it now about your requirements. I don't think it is possible, at least in this component.
Hi @Arkyadeep Bharadwaj ,
i made a forge component a couple of days ago to add click event handler to grid. It gives you row and column that was clicked. This works also on autogenerated grid.
datagridevent
also, this is on the radar of Outsystems to add as functionality to the datagrid itself, see this idea.
Dorine
is it possible to generate column with hyperlink without action column.
it just gives you an event, saying what row and what column was clicked, from there you can decide what consequence you want from that click. So, yes no action columns are needed, but no, the technology used is not a hyperlink.
@Dorine Boudry the other one which I suggested also works the same way.https://www.outsystems.com/forge/component-overview/13211/data-grid-with-click
It fires a click event on the parent grid whenever a cell is clicked, and provides the cell's column and row numbers.
I think both of these components would work in this scenario.
yeah,
it's just that the other one is a clone of datagrid component, I think that's a horrible strategy
If inuse your component then can I get clicked row and colum postion for particular data.if it is possible can u plz share one sample oml file.
I have one datagrid which is autogenerated and if I click firstname colum and row number is suppose 4 then I need row no 4 primary key value based on the click.that value i want to pass to different screen to open details page
Waiting for your reply
just look at the demo application as a sample on how to use it.
Of course it can not give you the primary key of your entity, only the row clicked, both the datagrid and this component are business agnostic, how could it know what your primary key is ?
Hi AB,
Have you tried using its API? Example, OutSystems.GridAPI.Rows.GetRowData('OS_MyGridId', 1) in javasript to get the 1st row of the grid 'OS_MyGridId'
It returns JSON value in following format
'{"isSuccess":true,"message":"Success","code":200,"value":"{\\"Tenant_Id\\":0,\\"Id\\":5,\\"Name\\":\\"Ann Olivarria\\",\\"Username\\":\\"ann.olivarria@example.com\\",\\"Password\\":\\"$1$36Fdfsdfasdffsdfsdfsdfsdfsdgsgsdfs30DC514D81494\\",\\"Email\\":\\"ann.olivarria@example.com\\",\\"MobilePhone\\":\\"1-553425-720-9353\\",\\"Creation_Date\\":\\"2022-09-04T18:47:44Z\\",\\"Is_Active\\":true}"}'
No my question is inhave datagrid and in that grid I am binding the ID but when I click based row and column position can I get particular cell value
Is it possible to share ur oml file?because after getting row and column value i have to take the Id and that I'd i have to pass to different page to display details data.
exactly, using getrowdata will do it (as is also used in my demo app), but extend on this, there is really no need to do that in javascript, it is available as an action from the Datagrid component.
Oh yes, you're right. I didn't realize it was available as a Client Action too.
AB, you're going to have same json text from the client action. Makes sense to avoid a custom javascript.
Were you able to resolve your query for having access to the DataRecord row values?
I will check