DynamicPopulate with multiple triggers - asp.net

I want to dynamically populate a form field from multiple other fields in the form.
If input A or input B is changed, input C should be updated based on the values in input A and input B.
The DynamicPopulateExtender in Ajax control toolkit has almost this. With it I can populate a target based on a trigger.

Solved with jQuery...

Related

In App Maker, can you fake valueIsRecord with a dropdown field?

In App Maker, what is the simplest way to achieve the same result with a dropdown box that you can with a suggest box, which can return the whole record when you make a selection giving you the ability to assign associated record values to other fields on the page?
Consider a data model with three fields, (Code, Description, and Severity). Add a dropdown box to select the Code. Have the selection, (probably using onValueChange or onValueEdit), write the selected Code's Description to a label field beside the dropdown box. The Code's Severity will also be used to affect the style in some way like background color or something, but for this answer, merely assigning the value to a scripting variable will be good enough. It's the record value access and assignment mechanism I am after.
Clarification: This data model will not be the page's datasource. It is a secondary reference table used for assigning a code to a ticket. You can also assume that a record value will be written to a field in the page's datasource as well.
I would appreciate the simplest low code solution as we will have non-programmers attempting this. Thanks.
As long as you leave your value binding on the dropdown blank the following should work:
Set the options binding to:
#datasources.YourDatasource.items
You may want to consider changing the 'Names' binding to be the projection of a particular field in this datasource otherwise the values showing in your dropdown will only be the 'keys' from this datasource.
Then in your onValueEdit event you will gain access to individual fields like this:
var item = widget.datasource.item;
item.YourFieldToEdit1 = newValue.YourOtherDatasourceField1;
item.YourFieldToEdit2 = newValue.YourOtherDatasourceField2;
That would probably be the simplest way.

Submitting "complex" ASP.net forms using cURL&PHP

I'm trying to create a bot to submit a ASP.net form using cURL and PHP. I'm able to do this with simple forms but I got stuck with one email form that uses a grid. Looking the network traffic when submitting the form I found this as one of the parameters posted to the form:
panForm$cbpEmail$FormLayout$grdFaleConoscoDestinatarios: {"selection":"T","callbackState":"z952aVWEs2XJ9DNtuoB8EI0qtZom3Guwv37Ny34ch6u8rMA6ASD0MLgS8vw+0Bz88+PlMhyGnAlnYDZXOy6C0OCBknNqTSUClocyeoOOYcO6KfoLUvLMZWRTBGRY+WUBG3MKabwqmYopS8A42gKWxUHlS7fr98CEILuzK6NAfyuUbg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qWTV0/1WqtOSBHw/cALQVRIjPZacF++Kh8v94EiL0Tb44DLwnPgMjcRDJxVifjK3u+VFjrCnvLaQdRRjTq3GVV3jaWQwdx4wRxUKdpfa9A6tH83qC28/tWYFkeUhRoTPOPmSwZJgsrD1+ShmN+b74257CGPAtvvpFk8VJSK//RuRyj7Mv1BfVAinzvPz4vLX4vAMg7p0DylKsTmmEb+WDYXzZegBxngS8wwvHUHErp+vm5De8H0GWW7cXWPGDmS8NNqex8sdPe02yFxH4UuDfUjNnWbTyNgH6pMQKuR/a9qTporlwD/4viOc5yyt0/rIs0+tRTL1kew3/uJ5Umcw1QHGc+e7ZTRFR+YnxiQUAKFRhBUvE/JNaAarH1z/qsg8WrDi6yHN/wOoZcGUgBm/2w8iULF5GKvV74xb2jDX5o9xb5c++GjpGDBbVL3Q96UHMAAjRa6u3r4aIbYt2eIQ6p8SjuUKRDNxwDidz7Bq0eO1ahZ0tECcDLAtpjjVbdYLJtL64Z6kHZKSjZwduHtTNzG4XtE9d5NCZITbQ8L2Qtr1jm1ZDYPd2p92yHZgwaNmmtieSsOaxeDNE/l4cVs3kRo5BOXG1V7snk/IOoecMdQ3gJ7UhOMfnD0u4QBRXSrje72ET7jb+RTI=","groupLevelState":{},"keys":["201259","201260","201261","201262","201263","201264","201265","201266","201267","201268","201269","201270","201271","201272","201273","201274","201275","201276"]}
This data represents a grid that is part of the email form where user is able to select who will receive the email.
My question is how can I mimic what ASP.net do to create this data from the grid that is on the page to be able to submit the email form? Does anyone have information about this "callbackstate"?
After submitting a lot of times the same form I realized that I don't need to care about the callbackState. What is important in my case is properly set the selection attribute of this JSON (provided during the creation of the component on the page).
The selection attribute represents the state of the checkboxes in the grid. T means true and F false. selection="T" means only first row selected while selection="FTFT" represents 2nd and 4th rows selected. Remaining rows not represented in the selection attribute are false by default.
Best Regards

asp.net webform Repeater, Update a set of textbox, Add to the List / Array

I am working on old webform asp.net application which uses Repeater.
The Repeater is a set of Name and address textbox fields. I have 3 sets of Name and Address information, basically, 3 sets of records in the object list to bind.
On the UI, I changed/update one of the Name and Address. I noticed in the list, which it iterate or loops through the repeater control
foreach (RepeaterItem item in this.NameAddressRepeaterControl.Items)
I see that an extra recod is added to the items.
Question:
I am used to fixed textboxes. When I update the textbox, I write code to take Exactly what is filled in the textbox and populate the DTO object to pass to the data layer to perform database transaction to update the database records.
When the new updated record is added to the Repeater Control list, I don't know which records is updated and which is the new records.
I am checking out OnItemDataBound and OnItemCommand to see if there is a way to get the old value from one of the field and also record the value of the new value. Is this possible?
The form contains 1 Save button and it will loop through the Repeater.Items to see what Name/Address to extract, but the new and old company exist in this list.
Instead of looping through the RepeaterControl.Items, Is there a way to extract from directly the visible Repeater control? If there are 3 repeater Name/Address control, is there a way to get all the info from each of the 3 sets of Repeater controls? The Repeater wraps around a user control, NameAddressCtrl.
I prefer not to replace the Repeater controls with fixed textboxes.
Any help is greatly appreciated.
Thanks.
I reviewed the code several time and add additional code to keep track what was add and changed in the repeated and only passed the information to be saved to the db. The solution was to write additional code. I did not change anything with the repeater behavior. Thanks for the comments and help.

Dynamic ajax category child dropdown

I'm using GF to create a filter. Some part of the work is done.
What I need to do now is allow 3 or 4 dropdowns to be populated dynamically.
I'm using the code providade in topic in http://goo.gl/hU31iK
I already made the queries on my table, but I'm having some difficulties, as described below:
First, my form ID is 1.
My first dropdown's ID is input_1_6
Second is input_1_4
Third is input_1_5
Fourth is input_1_7
That said, using the code in topic above, the values for input_1_4 is being loaded after choosing some value in input_1_6, but it isn't actually populating the dropdown input_1_4 (javascript alerts the values loaded, but the dropdown is empty).
Plus, any ideas on how to create the third and fourth filters, based on choices?
-- Field input_1_6 loads
-- Choosing some value in input_1_6 populates input_1_4 (based on value in input_1_6).
-- Choosing some value in input_1_4 populates input_1_5 (based on value in input_1_4).
-- Choosing some value in input_1_5 populates input_1_7 (based on value in input_1_5).
-- Choosing some value in input_1_7 and click submit form will do my stuff.
Thanks!

Checkboxes and View Based Table View

I am having some difficulty trying to use checkboxes as the selectedIndex in a view based table.
There is good documentation on view based table here:
[View Based Tables ]
However, I after searching and looking on Stackoverflow I can't seem to get my implementation for doing the following.
My view is a table that makes a callout to Yahoo Finance. The table is view based constructed with bindings.
When the table is populated I want to have a check box against each row so that when the user clicks the check box, that row will be updated from Yahoo. Currently this works using multi or single selection using the table view and an observer.. I want to do this with the checkboxes and a button that gets all the checked rows.
The IB setup is as follows:
What is the best way to get the rows where the checkbox is selected? Should I use the array controller or do I need to do something with the table?
Assuming that you use a NSArray of NSDictionaries as your data model, why not add a key/value pair to each "stock" dictionary as a flag? Then in your button action method, just iterate through the data model and trigger an update when the flag is set. Bindings do the rest!

Resources