Login Register

float

NumberTextBox floating point behavior

Hi,

My first time using dojo and dijit and I am having problems with the behavior of a NumberTextBox widget which I hope someone can help me with. The dijit text box is created entirely with javascript code and what I would like it to do is to allow the user to enter a number between -180 and 180 with, optionally, up to 6 decimal places. Here is what I have :

new dijit.form.NumberTextBox({style:"width: 100px",
promptMessage: "Enter a value between -180 and 180",
rangeMessage: "Longitude out of range",

How to query a dojo.data Store for items within a number range

Hello,

I have been experimenting with the dojo.data.ItemFileReadStore and find this very promising. Specialy the way to query items that match a certain string like "Fo*" is great. But I fear the most obvious is missing, isnt it?

Can I query for items that are within a certain number (int or float) range? Like I would sql "select * from countries where population < 300".

Is that possible somehow? Perhaps by sorting and then cutting off after the value get smaller?

Please suggest what you would find a good practice,
thank you for your help

dT

Syndicate content