Page 1 of 1
Request for tip
Posted: Tue Jul 16, 2024 1:57 am
by cgetty
Hello every one. I'm experiencing a bit of a brain block here so PLEASE help me out.
I have a tree grid. It has a few rows of data. I would like to double click on a row, then I would like a specific web page to open. So any row in the tree grid would go to a different URL.
If you go to https://www.crossui.com/RAD/CrossUI you could edit this project if that makes it easier.
elmo.ross.ImportJsonFoodItemsToGrid.from.file
To see the debug version
Re: Request for tip
Posted: Wed Jul 17, 2024 3:56 pm
by linb
Hi, I added an event for the dblclick:
Code: Select all
_treegrid1_ondblclickrow:function(profile, row, e, src){
xui.Dom.submit("https://google.com", {"q":row.cells[0].value}, "GET", "_blank");
}
Once you dlblick a row, it will open a new tab, the first cell value will be in the search box in google.com.
And if you want to save JSON, you have to use backend code. The frontend can read data, but can not save data.
Re: Request for tip
Posted: Thu Jul 18, 2024 1:04 am
by cgetty
Thank you!!
Just for fun I clicked on the debug version and the edit you did was reflected there.
Then I opened up the project "elmo.ross.ImportJsonFoodItemsToGrid.from.file" and then take a look.. How cool.
Clark
Re: Request for tip
Posted: Thu Jul 18, 2024 11:53 pm
by cgetty
I am grateful for the assistance I received from this previous post. Can someone please answer this question for me.
I would like to see the URL displayed in a message box after a row is double clicked on.
I think it would be something like this "row.cells[2].value" but of course showing the URL instead.
To see the debug version
If you go to https://www.crossui.com/RAD/CrossUI you could edit this project if that makes it easier.
elmo.ross.ImportJsonFoodItemsToGrid.from.file
Thank
Clark