I would like to ask how to use Confirmation Message box (ClientAPI.AddButtonConfirm(WebControl wc,string str)) in dotnetnuke.
My case is I have items in Repeater control and I have a function to select multiple items and delete when "Delete Selected" button was clicked.
My function is worked. But I would like to show confirmation message before the delete function is trigger that allow user to cancel the process.
Thanks.
I got it now. Actually it was easy thing
in .ascx file my code is
asp:LinkButton ID="btnDelete" runat="server" OnClick="btnDelete_Click" CssClass="dnnSecondaryAction" Text="Delete" Visible="false"/>
and in .cs file
ClientAPI.AddButtonConfirm(btnDelete, "Are you sure to delete this entry");
Then when click the button this will display Dotnetnuke confirmation message box.
Add OnClientClick property in your button. You can update confirmation message as you need.
OnClientClick="javascript:return window.confirm('Do you want to remove this Brand?')"
Related
I am editing a button that currently loads more products onto a page. A "Load More" button. For ADA compliance, when voiceover is on this button must say "loading" when clicked. I have injected aria-live/accessibilityLiveRegion into the component but it just reads "Load more Load more" when pressed... Can I add a message somehow to the aria live? Or any advice on how to get a button to read 'Loading' after pressed in React Native Web?
aria-live should be on the element that's going to be changing, if you don't already have it there. Or just add the attribute role="alert" to that element. It will automatically read out the content, so you could conceivably add a click handler to your button and give a screen reader only element with an alert role the content of "loading" to get the functionality you're describing.
From my template, when I click on submit, I have to check if one of the fields of my form exist in another table yet and if it's, show popup with OK/Cancel
How can I do that?
I am using EditorGridPanel with cellEditor which acts nearly like Excel. We implemented Arrow Keys to move among rows and columns.While validating a row, if it does not match the validation rule we show a MessageBox and hope that focus does not move if it is not valid. But, after the MessageBox shows - focus moves to the next row/column. Another problem is, user have to click in the OK button of the MessageBox to remove that from screen. Can we have the focus on the invalid column editor and also focus on the MessageBox OK button - so that user can press Enter to hide the message and continue entry?
Please check our link. http://www.softworksbd.com/swazilandlmis/yyyy_stockdata.php
Only one element can be focused, so focus should go to the message box. AFAIK enter/escape keys works out of box with message box.
You can pass callback to the messagebox. In this callback you can focus desired cell in the grid. Like this:
Ext.Msg.alert('Title', 'Message.', function(){
this.startEditing(rowIndex, colIndex);
}.createDelegate(grid));
So after message box is closed, the focus will go back to the editor.
I have a Wpf Form with a tabControl with 2 tabs "Customers" and CustomerDetail"
First Tab is a list of all Customers populated in a datagrid and delete Button as a dataTemplate on each line of the grid.
Selecting a customer it gets the customer details and moves to the second tab.
This all in MVVM and the delete button is mapped to a DeleteCommand .All good.
My Problem
It cannot seem to distinguish when clicking on the delete button it fires the selected event and goes to the other tab.I dont want it to go to the other tab when pressing delete.
How can I do it?
User selects row and should go to the other tab.
Row is selected and presses delete button just trigger the delete command.
Hope all clear
Any suggestions?
Try using DoubleClick event for showing CustomerDetails tab. so, when user click on delete button, they just fire click command of the datagrid and nothing happen...
I am looking for a way to once I see a form by Name add a button to that form and when the user clicks the added button, pull information from the form. For example, if I see the for title - "Stack Overflow - Wnidows Internet Explorer" I would add a button "MyButton" on the form, and when that button is clicked, I would "pull" the information from the "search" box. It should work on Web or Win forms.
Any help would be greatly appreicated.
I found my answer
You need to get the window handle to the form in question.
To put the button on another form you need to create the button and set its owner to the other window and set the buttons window position.
You can use the same window handle to enumerate the child windows to get the text if its an edit control.