| |

VerySource

 Forgot password?
 Register
Search
View: 735|Reply: 3

How to generate dynamic controls based on database data

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-3-18 09:30:01
| Show all posts |Read mode
TABLE [dbo]. [Rs0Items] (
[ItemId] [int] NOT NULL,
[SID] [tinyint] NULL,
[FieldName] [varchar] (18) COLLATE Chinese_PRC_CI_AS NULL,
[ChName] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL,
[FieldType] [int] NULL,
[FieldLength] [tinyint] NULL,
[FieldDotL] [tinyint] NULL,
[Correlation] [int] NULL,
[TableName] [char] (40) COLLATE Chinese_PRC_CI_AS NULL,
[CorTable] [nchar] (40) COLLATE Chinese_PRC_CI_AS NULL,
[IndexCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL,
[IndexName] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL,
[pLeft] [int] NULL,
[pTop] [int] NULL,
[Tab] [tinyint] NULL,
[Width] [int] NULL,
[sLeft] [int] NULL,
[sTop] [int] NULL,
[sTab] [tinyint] NULL,
[sWidth] [int] NULL,
[sYNShow] [char] (1) COLLATE Chinese_PRC_CI_AS NULL,
[YNShow] [char] (1) COLLATE Chinese_PRC_CI_AS NULL,
[AddMinusItem] [tinyint] NULL,
[YNRoot] [bit] NULL,
[Rs] [bit] NULL,
[Pm] [bit] NULL,
[ReadOnly] [int] NULL,
[YnReserve] [bit] NULL
Has the above fields
The contents of the table are:
FieldName ChName FieldType FieldLength
---------------------------------------
EmpNo employee number 0 10
EmpName Name 0 10
Birthday 7 10
Gender 0 4
In fact, it is based on the data in the database to create a form control
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-30 16:45:02
| Show all posts
Dynamically generate the input interface, right?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-17 11:00:01
| Show all posts
How to achieve data binding?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-17 19:00:01
| Show all posts
Datagrid is okay. There are SQL statements to get the following results:
Field 1 value 1
Field 2 value 2
Field 3 value 3
This result should meet your needs, but unfortunately I don't remember how to write the sql statement, please check it
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list