Request for tip

Tips and Tricks
Post Reply
cgetty
Posts: 15
Joined: Tue Feb 06, 2024 7:17 pm

Request for tip

Post 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

linb
Site Admin
Posts: 11
Joined: Thu Jan 25, 2024 4:40 pm

Re: Request for tip

Post 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.
cgetty
Posts: 15
Joined: Tue Feb 06, 2024 7:17 pm

Re: Request for tip

Post 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
cgetty
Posts: 15
Joined: Tue Feb 06, 2024 7:17 pm

Re: Request for tip

Post 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
Post Reply