When the database data EXT page is displayed, convert the id to name

Updated on technology 2024-05-19
11 answers
  1. Anonymous users2024-02-10

    According to the SQL you wrote

    That's probably the case.

    select , from Table 1 t1, Table 2 t2 where ;

    When RS is executed, it has two elements: id and name.

    There are two ways to write the foreground page.

    Write 1: header:'id,dataindex:'id',mapping:'name';This is a direct search for the index for name.

    Spell 2: header:'id,dataindex:'id',mapping;1;Take the second element of the result set The first one is the id and the second one is the name

  2. Anonymous users2024-02-09

    This problem is estimated to be a duplicate problem of ext control id, after setting the id, the duplicate control indicates that there is already a control using this id, you can change the id to another name, you need to pay great attention to the use of id when using ext, can not be repeated, otherwise there will be many strange phenomena.

  3. Anonymous users2024-02-08

    Add one to the tree.

    loader: new

    This is the event of the struts. Receive the node parameter.

  4. Anonymous users2024-02-07

    "id"When the control is defined, the id must be added to get it.

  5. Anonymous users2024-02-06

    Because if you don't enter it, the background will receive it""This cannot be converted into a number, and the error reported is a digital conversion abnormality, and you can judge whether the ID is or not""and then convert.

  6. Anonymous users2024-02-05

    Obtained with jquery.

    drop-down box select: var xxid=$('#comment).val();

    However, the drop-down box is not rated.

    The Chinese characters that need to be changed to id are used to fetch the database with the tag library Example: Not evaluated.

    Negative reviews are good reviews.

  7. Anonymous users2024-02-04

    According to your description, just put the value in it, and the id can be found based on your value, $("#comment").val() is the value selected in the drop-down box (the value of the option).

  8. Anonymous users2024-02-03

    A form to wrap these up, and then submit it and then use the same method to get your select id should be fine.

  9. Anonymous users2024-02-02

    See if your background has found the data.,And save it in json format according to the dataindex in the front.。。。

  10. Anonymous users2024-02-01

    = session["employeeid"].tostring();

    string strsql = @"select * from tb_user where employeeid=employeeid";

    Frankly, I didn't understand these two lines. Don't you need to concatenate your SQL statement?

    If I had written, it would probably look like this.

    session["employeeid"].tostring();

    string strsql = @"select * from tb_user where employeeid=" +

  11. Anonymous users2024-01-31

    extjs is just a front-end presentation framework, and cannot directly insert records into the database.

    It will encapsulate the data in JSON format, send the JSON string to the backend (which may be ASP, PHP, JSP, etc.), and then the database part will be processed by the background, and then notify the ext data through the ** function that the data has been inserted.

    So, what you want to know is how to encapsulate the data in the control into json and send it to the backend in extjs.

    ext used it a long time ago, and now I can't remember the syntax, but something like this:

    1.Give your space an id, such as the TextField control, which is"username"

    2.Bind events for your Add button, which you can bind when building a control, e.g. listeners:

    or"addbutton").on("click", function() so that when you click the "Add button", the content in the function will be executed.

    3.Get the value of the TextField control in the function, for example: var username ="username").getvalue();

    4.The obtained value is sent to the daemon for processing through AJAX. Such as:

    The simplest program is probably like this, and you have to look at the API for specific methods.

Related questions
8 answers2024-05-19

Bind data with listview and you're good to go.

For example:"type“ "size"is a field of the class le is the set of lists taken out of the database. >>>More

13 answers2024-05-19

Let's say the textbox is named textbox and the string of numbers to be displayed is strfloat: >>>More

11 answers2024-05-19

This is a nuisance, the memory is occupied.

You're going to have to look it up"The memory cannot be read"Find relevant solutions, there are many on the Internet. >>>More

5 answers2024-05-19

Attach a database or import a database.

SQL itself has data import operations. However, if you want to import data from a backup file, you need to do something else. Let's take an example. >>>More

8 answers2024-05-19

It's mysql. I know your purpose to save space. But I don't know ...