I am getting null value in form instance tab panel 2 in dev extreme while updating. Its some of bug - textbox

I am getting null values in tab panel 2 instance in dev extreme form. What would be the reason behind that?? I have filtered and populated data for update in textboxes. I have 2 panels beneath.
Scenario while it saves. I need to click on any of the textboxes in tab panel 2 then it saves correct data. I am getting the values in sql. But why it is failing in the first save??
(Note this is a error related to view only)

Related

Delphi 10.1 Berlin Fast Report - Show Multiple Records in One Page

Below is the design of my report.
When clicking the preview button, it shows one record every page.
How to make it display multiple records until the page is fully occupied, and then the next record will be on the next page? I want something like the image below.
Looks like you have set the StartNewPage property flag on your MasterData1.
Click that band with the righ button and uncheck the Start New Page of its Menu.
Instead of defining Report DataSet, define MasterData1 DataSet.
Right click on MasterData1, Edit... select the your DataSet and set the value of Number of Records to 0. Probably this property is set with 1.

MVC 4 accessing model list on click

I have an mvc app where I pass a list to a view. In a most click, I want to be able to render the next item in the last but am having trouble figuring out how to do that efficiently. My approach originally was to use an index i but I realized that one the page is rendered, accessing my model last at i will always leaf to the same result since that item in the list is rendered on page load and can't just be accessed dynamically. Any insight to an approach for this problem?
The model can't be accessed as it's only used on the server side.
There are a few ways of solving the problem, you can use Knockout.js or similar client side view model components, once the user click on the button just render then next item from the knockout model.
Or use AJAX to retrieve the next value from the back end and then render it to the screen.
Or generate the whole screen and just hide all items from the user and then display them once the user clicks the button

Rails-Haml, Table display of checkbox selection

I have a table that displays data for the items selected in the checkbox above, like a[], b[], c[]. Initially, when the page is first loaded, the table display is empty. When checkbox selections are made, the tables displays the data for the selection. Then when I untick all checkboxs and press display, the table display should be empty.
In the controller the variable for checkbox selection is thus>
#selected_brands = params[:brands] || session[:brands] || {}
as you may realize, params[], and session[] are values submitted by form in the view. {} -> when no checkboxes are selected.
Again in controller, I have this
#products = Product.find_all_by_brand(#selected_brands.keys)
The problem I have is, when I have unchecked the boxes, following the previous selections I made, the table displays data from previous session, instead of an empty table. What am I not doing?
You run into a HTML issue bugging lots of people: when you uncheck all checkboxes, nothing is sent to the server, and thus no change is recorded, so the last situation is still recorded.
There are many solutions to this (events, javascript, serverside code), so my advise is to broaden your search to generic html how to handle this situation best.
If you don't like Javascript, and have no problem with too many db-actions, remove all selected brands for the product and reapply the chosen ones when you get this result.

jQuery UI droppable problem

I have a script that uses jQuery UI's graggable and droppable functionality.
Items are dragged from left panel into main area and dropped.
There are two scenarios:
Items are dropped into other boxes, preset on page load or can be dropped into main area to create a new box. The items can be moved between the boxes. Everything works fine with this setup.
In second scenario there are no preset boxes in main area. They are supposed to be created whn an item is dragged and dropped from the left panel. However, for some reason it only allows me to create one box. Here's an example.
My level of UI proficiency is not high enough to spot what the problem is.
Your problem is that in this code:
$.when(createEmptyStack()).then(function(data) { ... }
data is always "" meaning that you're attempting to add a new element to the page with the same id over and over again (your AJAX request to createEmptyStack is not returning anything in the response). This is why it works fine the first time; the id doesn't exist and so the code works as expected.
When you drag another item into the main area, the element may be successfully appended, but it has a duplicate id. This code:
putCardIntoStack(ui.draggable,newstackId);
(in the same block as the code above)
Is always called with the draggable object and just STACK as the newstackId.
In short, this is a problem with your server-side code not returning a stack id. According to Firebug, your AJAX request isn't returning anything at all.

DBLookupComboBox and Refreshing of Contents

I have Delphi 7 and I'm using NexusDB for the database.
I have a main form where I have a DBLookupComboBox to list the contents of a Table.
If I press a button I have on the form to add a new item to the list (which opens a 2nd dialog box) and then come back to the main form I want the newly added item to show up immediately
I can't seem to get that to work.
I've tried refreshing the DataSet under the ListSource object.
Anyone have any ideas?
Thanks,
David
DBLookupComboBox1.ListSource.DataSet.Close;
DBLookupComboBox1.ListSource.DataSet.Open;

Resources