Hyperlink click event on extjs 4 grid - extjs

I am facing an issue in listening to the click event for hyperlink in extjs grid. Actually I have a form whose display field’s value is a hyperlink. On click of this hyperlink, I show a window pop-up which a grid(single column) and has multiple values,one value for each row(which are again hyperlinks). On click of this I show a form. On the click of hyperlink on grid column, I have this listener:
cellclick:function(){
Ext.getBody().on(‘click’,function(event,target){
MyModel.getProxy().url = ‘…’;
MyModel.load({
scope:this;
callback:function(){
}
});
},null,{
delegate:’.className’
});
}
On click of the hyperlink on grid row, there is a call to the rest service. When I click on any value for the first time, it works fine. When I click on any other value, there are two service calls, one for the value that is clicked and one for the previously clicked value and this goes on increasing with the increase in the number of clicks.How can I avoid this?Is there any other way to listen to the hyperlink click event?Any help is highly appreciated.Thanks….

Related

Kendo grid does not refresh when I try to close one grid and open another one in same page on different button click

I have a kendo grid which has buttons in every row, On click the buttons open a pop-up with different grid on each button click, so problem is--
When I click on any button for first time grid opens with it's related data. When I close that grid and open another grid, I get the same data as previous one
When I reload the page and open any grid for 1st time it works fine, If I open a second one again it repeats
What I understood from Network Recording is it is not requesting data from api on 2nd button click and directly using data present in it previously.
Here is an example of the given problem using local data, can you please help
Dojo Example.

Extjs 6: How to forcefully show a tooltip on an element on a button click?

I have a scenario i.e.combobox and a button. I want to show a tooltip on combox when I click on a button and hide it when i click again. How do I do that without using ids on tooltip instance? Also can I specify the position of tooltip i.e x and y relative to combobox and style tooltip a little bit?
Thanks a lot
When you click on button create new tooltip instance as below:
Ext.create('Ext.tip.ToolTip', {
html:<tip contents>,
id:<some id>
});
And showBy() this instance for that combo like tip.showBy(<combo instance>).
Now again you click on button you check if tip instance is present, if yes then hide it else show it again. But you will need some id for tooltip.

How to show a dialog on click of a combobox item using MVVM?

I am having a combo box control in which I had inserted three items(For instance X,Y,Z respectively). I want to show a dialog when "X" item in the combobox is clicked. In order show a dialog upon click on "X" item, I was able to handle it in "SelectionChanged" event. But the problem here is when I click on the same item no event is getting triggered and as a result I am not able to show a dialog on click on "X" item.
How can I accomplish this issue using MVVM pattern.
I am very new to WPF, please be kind with your answers.

WinForms: can a menu click handler determine which edit control on the form had focus immediately preceding the click?

WinForms.
Let's say we have a grid on the form with some cell editors (checkboxes, radio button groups). The form has a file menu. File -> Save. User visits a few cells in the grid, and clicks a checkbox in a cell, and, without touching anything else with the mouse and without touching the Tab key, clicks on the File menu and then clicks Save.
Inside the Save menuitem click handler, is it possible to determine which checkbox in the grid had focus immediately prior? That checkbox won't have lostfocus yet because a menu choice doesn't cause its lostfocus event to fire.

How to detect a click on the selected row of a RadGridView control

My WPF application uses the Telerik RadGridView control on a few of its screens. I have a requirement that says that whenever the user clicks on a row in the RadGridView, I'm supposed to switch to another screen and display detail information about that row. I hooked up a handler to the SelectionChanged event and this works, except that nothing happens if the user clicks on the selected row a second time. This makes sense, as the selected row isn't being changed.
How can I detect a second click on the same row and have the second screen displayed?
Tony
You could just attach a handler to the MouseUp event on the GridView. Check if there are any selected cells and respond from there. This will fire even if there is already a selection.
The MouseDown event will fire on the mouse click, but before the gridview updates the selction, mouse up should fire when the selection has already been adjusted
You can also attach a handler to each individual cell in code-behind as follows
(this.GridView as RadGridView).AddHandler(
GridViewCell.MouseUpEvent,
new EventHandler<Telerik.Windows.RadRoutedEventArgs>(this.OnMouseUp));
I think you may try to achieve this through the MouseLeftButtonDown event or PreviewMouseLeftButtonDown event.

Resources