2013-05-25 1 views
0

'sub_name'이라는 열이 asp GridView에 성공적으로 포함 된 SQL 데이터베이스 테이블이 있습니다.하나의 열 데이터를 두 개 이상의 열로 나누는 방법 asp의 드롭 다운 목록에서 데이터?

이 코드의 실수를 수정할 필요가 없습니다. 데모 용입니다.

<asp:Gridview runat="server" AutoGenerateColumns="false"> 
    <columns> 
    <asp:templatefield> 
    <asp:Label runat="server" text='<%# bind("sub_name") %>'> 
    </asp:TemplateField> 
    </columns> 
    </asp:Gridview> 

의 GridView는 유사한 출력을 보여줍니다

subjectname1 
subjectname2 
subjectname3 
subjectname4 
subjectname5 
subjectname6 
subjectname7 
subjectname8 
subjectname9 
subjectname10 

그래서 난의 GridView 이 아니라 두 개의 서로 다른 컬럼에서 동일한 출력을 얻을 수있는 C# 또는 영문 파일을 조작 할 수있는 방법? 이와 유사한 뭔가 :

subjectname1 subjectname6 
subjectname2 subjectname7 
subjectname3 subjectname8 
subjectname4 subjectname9 
subjectname5 subjectname10 

답변

관련 문제