问题1 :当您输入时,他想输入n个不同的记录。 C#创建了大量的行并系统地进入。
例如:
Tbl1
+----+----------+-----------+----------+
| ID | NAME | ADDRESS | SALARY |
+----+----------+-----------+----------+
| C1 | Ramesh | Ahmedabad | 2000.00 |
| C2 | Khilan | Delhi | 1500.00 |
| C3 | kaushik | Kota | 2000.00 |
| C4 | Chaitali | Mumbai | 6500.00 |
| C5 | Hardik | Bhopal | 8500.00 |
| C6 | Komal | MP | 4500.00 |
| C7 | Muffy | Indore | 10000.00 |
+----+----------+-----------+----------+
当程序要求输入您想要询问的数据时。如果输入3,则会创建动态文本框,输入所有记录。
数据表应该是这样的......
Tbl1
+----+----------+-----------+----------+
| ID | NAME | ADDRESS | SALARY |
+----+----------+-----------+----------+
| C1 | Ramesh | Ahmedabad | 2000.00 |
| C2 | Khilan | Delhi | 1500.00 |
| C3 | kaushik | Kota | 2000.00 |
| C4 | Chaitali | Mumbai | 6500.00 |
| C5 | Hardik | Bhopal | 8500.00 |
| C6 | Komal | MP | 4500.00 |
| C7 | Muffy | Indore | 10000.00 |
| C8 | Hari | Goa | 8550.00 |
| C9 | Aum | Panjab | 4500.00 |
+----+----------+-----------+----------+
总的来说,我要问的是C#在一行中创建动态文本框(插入一行。文本框应该在线上。对于第二行中的第二行)。
或者它会加载GridView
表格,其中包含先前输入的数据以及两行以输入新记录。
问题2 :如何按升序对表格进行排序?
例如,如果我输入新记录C10 Ram Chennai 9000.00
默认情况下,它位于
Tbl1
+----+----------+-----------+----------+
| ID | NAME | ADDRESS | SALARY |
+----+----------+-----------+----------+
| C1 | Ramesh | Ahmedabad | 2000.00 |
| C10| Ram | Chennai | 9000.00 |
| C2 | Khilan | Delhi | 1500.00 |
| C3 | kaushik | Kota | 2000.00 |
| C4 | Chaitali | Mumbai | 6500.00 |
| C5 | Hardik | Bhopal | 8500.00 |
| C6 | Komal | MP | 4500.00 |
| C7 | Muffy | Indore | 10000.00 |
| C8 | Hari | Goa | 8550.00 |
| C9 | Aum | Panjab | 4500.00 |
+----+----------+-----------+----------+
排序时应该进行排序......
Tbl1
+----+----------+-----------+----------+
| ID | NAME | ADDRESS | SALARY |
+----+----------+-----------+----------+
| C1 | Ramesh | Ahmedabad | 2000.00 |
| C2 | Khilan | Delhi | 1500.00 |
| C3 | kaushik | Kota | 2000.00 |
| C4 | Chaitali | Mumbai | 6500.00 |
| C5 | Hardik | Bhopal | 8500.00 |
| C6 | Komal | MP | 4500.00 |
| C7 | Muffy | Indore | 10000.00 |
| C8 | Hari | Goa | 8550.00 |
| C9 | Aum | Panjab | 4500.00 |
| C10| Ram | Chennai | 9000.00 |
+----+----------+-----------+----------+
C10行应该在C9之下。如何排序表?