Axapta form input fields - axapta

Is it possible to prevent axapta from remembering entered values in a form input field so that when the user has entered one value, they do not get a highlighted proposal for what they could enter?

Yes, it is possible.
Set the AutoDeclaration property of your control to Yes.
Execute element.delAutoCompleteString(NameOfYourControl); in one of your form's methods e.g. in init.

Related

Show required custom validator error message in to associated textbox

I have a text box control that I'm wishing to apply custom field validation to. The data I'm validating in the text box is used as a primary key in the database I've set up. I need custom validation controls that allow me to check for duplicates before the data is submitted.
I would like the user to be prompted to enter different input if the validation returns that the data exists.
you better add OnTextChange property to textbox and perform the primary key validation in that function.

How to validate that at least one field out of four has an input from the user

I have four fields on my screen and I want the user to at least enter a value for one of the fields. I want a popup message similar to what you can do with a validate control to popup when none of the fields have a value entered.
Is there a way to do this with the stock validate control in ASP.NET?
I know how to do this is JavaScript, I just wanted to see if there was an easier way first.
I think you can validate this using a groupbox control

How do I wire up a custom C# ASP.Net WebControl to post back a custom __EVENTARGUMENT?

I'm creating a custom ASP.Net GridView and I want to be able to alter the __EVENTARGUMENT value but I can't figure out how to capture the returned value on the server side.
I'm creating the ability to have a collapsible representation, so the first level is the standard GridView and I will insert additional rows via JavaScript if they expand the first level row.
My problem is how to create a link on the selecond level rows that posts back with custom data.
I believe the RaisePostBackEvent is where this value gets passed into; the base GridView class allows you to override it, so you should be able to tap into it there.
This is a part of the IPostBackEventHandler interface.
HTH.
Use __dopostback to raise the postback from javascript. Use the correct parameters so that this will be mapped to the right event

Asp.NET AJAX control update field on form

I have a form with several text fields, a couple of drop down lists, and a custom asp.net control.
The requirement I have is that when the values of certain fields ( some are in the main form, some are inside the control ) the user will be alerted that the settings will not take place unless they also restart the processing and will have the option to reset it. If they exercise this option by pressing on the restart button, we execute an additional restart() method call on the server side on top of everything else.
In order to create this alert system I need to know when these required fields have changed. For the fields in the main form/page I store the original values in hidden fields when the page gets created (possible because the page is static). Then when the submit button is pressed I check the current values against the original values stored. If any of them differ I will alert the user.
For the fields in the custom control, I created a boolean property that indicates whether changes in the fields of interest took place. This control is highly dynamic contains a variable number of lists, some of them with over 100 items that can be selected or deselected. So this boolean property is able to identify if the changes I am looking for took place.
The problem is I need to get the value of this property when the user clicks on Submit, otherwise it will not contain the right value. But at the same time I want to avoid a postback. I do not want the whole page to reload. I want to get that value asynchronously somehow.
Since the whole page is stateless the question is how do I accomplish this? How do I accomplish the call to the property? And after I make the call and I get the result where do I store it so it's accessible from javascript code on the client side.
You can try putting a timer control in your ajax panel. Then on a set interval, you will evaluate the boolean property in your code behind.
Alternatively you can check the hidden field "changed" event using JavaScript or jQuery
http://api.jquery.com/change/

ASP.net form Double Entry

I have a form that I need the user to be able to type something in a textbox, after they tab out have them enter the same value in another textbox in proximity to it to assure they entered it incorrectly. After that, the second textbox is to disappear and they will continue to the next field without ever having a postback.
Does anyone have any recommendations on how to do this most efficiently? Is there a control that will facilitate this for me?
You can do it by javascript easily. on the onblur or onchange clientside events you should check two textbox's values.
An alternative option : maybe you want to use CompareValidator to compare values of your form elements. Don't forget to set EnableClientScript=true and use ValidationSummary control.

Resources