JqGrid ask for new fields on click custom button - button

I have added a custom button to the navigator in my jqgrid and i am wondering how can i ,when i click on the button, show a dialog with the same style as the edit dialog and ask for some especific fields that are not included in the colModel. Those field would be to be sent to the server when clicking on ok button.
Any ideas?
Thanks in advance.
Carlos.

You can display the "Edit" dialog using editGridRow method. In the second (properties) parameter of the method you can include your custom beforeShowForm event handler which can make any modifications in the dialog.
See last demo from the answer for an example. The demo has the line
$('<tr class="FormData" id="tr_AddInfo"><td class="CaptionTD ui-widget-content">'+
'<b>Additional Information:</b></td></tr>').insertAfter (nameColumnField);
inside of beforeShowForm.
If the information which you need to show in the dialog are from the hidden column of the grid you can use simplified way which you find here. The main idea in the solution is that jqGrid include in the form dialog all hidden fields, but the corresponding row is hidden. So it is enough just to show the hidden row.

Related

No event getting generated on button click in MFC

I have a dialog based application. I have one static text control and a button on this, both of which I have made invisible in the beginning. I want to show both the controls on reaching a certain condition. When I click this button, again I want to make both the controls invisible.
However, I am able to show and hide the control and also captured the button click event like this:
ON_BN_CLICKED(IDC_MY_BUTTON, &MyDlg::OnBnClickedMyButton)
and defined OnBnClickedMyButton().
But when I press the button, it is not pressed and the event is also not generated.
Any suggestions?
First check if the IDC_MY_BUTTON exists and is valid.
Remember to add DECLARE_MESSAGE_MAP() at the header file.
Also check at the BEGIN_MESSAGE_MAP(MyClass,MyParentClass) if the class
and the parent class you write are right.
I hope this helps.
I think the IDC_MY_BUTTON maybe is invalid or other control has the same ID.
Well, finally I have come to know that though the button was visible but on clicking it was not taking control, hence I used BringWindowToTop() to draw it on top. Now it is being clicked and OnBnClickedMyButton() is also being called.
But now the issue is that after calling BringWindowToTop() the button is not shown. It is shown only when I take the mouse pointer on it. Not able to understand what is the issue.

How do you force Combobox dropdowns to stay open

How do you force Combobox dropdowns to stay open even when other Alert boxes appear. Looking at what to subclass from mx.Combobox, there doesn't seem to be much that i can do to short of implementing an entire combobox from scratch.Thx
For that you need to create a custom ComboBox which if created in following Link. and might be this link will going to be useful to you.
Please visit this LINK

How to display custom error message on EditForm Template of AspXGrid?

DevExpress AspXGrid has a cool editform template that you can use it several ui style as popup form or inline form betwwen grid rows etc..
When you unimplement Update Event of grid and if you allow grid to editing from settings, it shows the EditForm, but when you fire update button at this state, it shows a cool Error Message like "Specified method is not supported"..
I want to write some custom message in the same place of that message.
Anyone knows how can i do?
Thanks a lot.
Use the ASPxDataValidationEventArgs.RowError property to specify the error text displayed within the Error Row. This row is automatically displayed below the Edit Form if the RowError property is set to a not empty string.
Please, also take a look at the GridEditing/Validation demo module and ASPxGridView documentation.

Qt:creating a dynamic button

I want to create an application in which i will create a button and by pressing that button as list of options will open and i can choose one of them.for example i will create a button named "searching algorithm" and by clicking this button a list will open at same place which display two options as linear search and binary search.can anyone give me an idea how to do that?
You want a QComboBox:
The QComboBox widget is a combined button and popup list.
I believe what you need is a popup window where you can have list of options, whenever your button is clicked show this window, hide it when user selects an item in the list or clicks outside of the working area. There is an example you can use as a reference:
QT 4.7 Google Suggest Example
hope this helps,
regards

Infopath option button control - modify button count

I have an InfoPath Option Button control on a template and need to add an additional option button to the control. Any ideas would help.
Do you mean programmatically or you just don't know how to add a button to an existing group (since the default is to create a new group)?
If you just want to add another button to an existing group the easiest way is to copy one of the existing buttons and paste it. Then double click (or right click and select) to go to the properties screen and change the "value when selected".

Resources