在网格视图中,多个表中的值应绑定在GridView1的一列中。 [英] In grid view in more than one table values should bind in one column in GridView1.
问题描述
1.fileInfo
1.fileInfo
CREATE TABLE [dbo].[fileInfo](
[fileId] [bigint] IDENTITY(1,1) NOT NULL,
[userId] [bigint] NULL,
[fileName] [nvarchar](50) NOT NULL,
[fileType] [nvarchar](50) NOT NULL,
[fileSize] [nvarchar](100) NOT NULL,
[filePath] [nvarchar](200) NOT NULL,
[createdOn] [datetime] NULL,
[statusId] [bigint] NULL,
[lastModifiedOn] [datetime] NULL,
PRIMARY KEY CLUSTERED
(
[fileId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
在网格视图中它将显示..
与fileType和fileSize结合使用GridView1中的列..
此输出文件:
fileName fileType fileSize filepath createdOn
Asp notes.docx .docx 13539 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
Asp.net.docx .docx 14041 2013 -04-04-05-52\ 4/4/2013 5:52:20 PM
我想在GridView1.Combine中使用fileType和这样显示输出GridView1中相同列中的fileSize ..
fileName fileType& fileSize filepath createdOn
Asp notes.docx .docx 13539 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
Asp.net.docx .docx 14041 2013-04-04-05-52 \ 4 / 4/2013 5:52:20 PM
显示在gridView1
文件名,fileType& filesize,filepath,CreatedOn 。
In grid View it will display ..
Combine with fileType and fileSize in same columns in GridView1..
This Output File:
fileName fileType fileSize filepath createdOn
Asp notes.docx .docx 13539 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
Asp.net.docx .docx 14041 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
I want Display Output like this in GridView1.Combine with fileType and fileSize in same columns in GridView1..
fileName fileType&fileSize filepath createdOn
Asp notes.docx .docx 13539 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
Asp.net.docx .docx 14041 2013-04-04-05-52\ 4/4/2013 5:52:20 PM
display in the gridView1
filename,fileType&filesize,filepath,CreatedOn.
please say
correct solution Friends!
Advance Thanks Friends!
推荐答案
使用此查询
use this query
select fileId,userId,fileName,(fileType + ' ' + fileSize)as fourthcolumn,filepath,createdOn,statusId,lastModifiedOn from fileInfo
这篇关于在网格视图中,多个表中的值应绑定在GridView1的一列中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!