How to enter Barcode in series without touching anything else? - devexpress

The grid has 6 columns, the first column is the bar code, the second is quantity.
Grid has NewItemRow at the top, I need the grid to validate the column barcode if it is valid, fill the following columns.
If a barcode already exists, increase the enter code hereamount.
I want to enter the barcodes in series, without touching anything.
The barcode device sends barcodes in format (code + enterkey), but it is also possible to use the format (code + below).
barcode1 + enter
barcode2 + enter
barcode3 + enter

Related

How to format Credit card text edit widget?

I am trying to make a custom format for my credit card widget. The first 4 numbers should be followed by a dash '-', then after 3 numbers, another dash and then 2 more numbers.
Example: 1234-678-52.
How can I custom format a text edit so that it has '-' already present and follows the format described above?
The built-in date widget has something similar: having '/' as a delimiter.
If you are using QLineEdit the option is to use the inputMask property:
your_qlineedit->setInputMask("999-9999-99");
You can use three input fields. Place them in one line, draw the '-' in between and add the input masks and some logic.
Input masks: 999, 9999, 99
Logic 1: Go to next input field as soon the input is accepted
Logic 2: Go to previous field as soon all characters are deleted (optional)
The user should now be able to type in the whole number without pressing TAB or '-'.

wrap ctrl + enter in str() function r

I often find myself using ctrl + enter to run something in r-studio. I often find that I would like to be able to wrap whatever I am putting into ctrl + enter in the str() function.
This is particularly the case when I am piping lots of dplyr verbs together. Mutating new variables and joining dataframes etc. Sometimes halfway through the set of piped commands I need to check what the name of a variable in a dataframe that i have created is called so that i can access it via the next pipe. This usually means that i have to:
highlight the text up to the last relevant pipe
hit ctrl + enter
press the up arrow
add a bracket to the end of the pasted text
Press home
navigate via the arrows to the first line of the pasted text
type: str(
This is extremely laborious and I find myself doing it often. Is there a shorter way that I am not aware of? Otherwise is there a workflow process people use to get around this?
Ideally there would be a modified ctrl + enter shortcut that would wrap whatever is highlighted in str() and output the result to the terminal.

Display cumulative value of each column in balloon text

I built a cumulative line graph using context.cumulativeCol() in the Value field and I am interested in displaying the cumulated value of the current column in the ballon text.
This is what I have, which only shows the value of the column:
I tried to change the default value [[Row]], [[Column]]: [[Value]] from the Ballon Text field and tried to use something like context.cumulativeCol() but I could not achieve my goal.
If it is possible, how am I supposed to do it?
I've just tried to put:
return "Cumulative: " + context.cumulativeCol();
to the balloon function and it worked fine in the latest version. Perhaps you are trying to return a number instead of a string from the balloon function?

How do I run the same piece of code for multiple text inputs without using select case?

I have eight aspx text inputs labelled txtBoookingId1, txtBookingId2 etc etc. I have a sub which handles eight buttons clicks as the code is more or less the same for each. I have it so it knows which one is pressed. I want to run "booking = System.Text.RegularExpressions.Regex.Replace(txtBookingId2.Text.Trim, "[^0-9.]", "")" to trim off any letters but I want the txtBokingId2 part to be the correct one based on which button was clicked.
Is there an easier way of doing this than using a Select with eight cases and the same line of code in each with only the bolded above changed slightly? I tried having a string "Dim txt As String = "txtBookingId" & btnPressed.ToString" (which would give txtBookingId1, txtBookingId2 etc based on button then using that in place of txtBookingId2 but it's not valid code as there isn't an text input named "txt".
Code decides which button is clicked based on where CommandArgument=1,2,3 in the text input etc

Fusion charts -Pie chart going wrong on zero values

I am using fusion chart for rendering pie chart. In some scenario all the values passing to the graph string will be zero. That is returning the chart in a wrong way instead of showing no data to display.
the following is the graph tag I am using.
Int PendingAmount =0;
Int PaidAmount =0;
"<graph showNames=\"1\" bgAlpha=\"0,0\" numberPrefix=\"Rs. \" decimalPrecision=\"0\"><set name=\"Paid\" value=\"" + PendingAmount + "\" color=\"A4CFD7\"/> <set name=\"Pending\" value=\"" + PaidAmount + "\" color=\"58A1C7\" /></graph>";
This is how the graph is displayed.
I had the similar problem with fusion charts. I would first suggest you to use their latest build. They may have solved this problem.
In my case, I was manually checking for no values or zero values and was in turn, replacing the chart with a simple html text like No data to show.
If you define only the chart element like , then you will get "No Data to Display" error message.
If you define at least one set element, then you wont get "No data to display" error message as there is data to display, but this time zero data and hence zero pie(only the chart canvas) will be rendered.
Hope this helps!

Resources