2014-07-01 6 views
0

asp의 목록 상자에 항목이 있다고 가정 해 봅시다. (System.Web.UI.WebControls) :목록 상자에서 항목을 정렬하는 방법.

 
100  the lonely guy  123 124 
1002  the tiger's den 123 125 
10  the master  125 190 
10000  the talon's  231 345 

내가 그것을 아래 형식과 같은 열에 서식이 좋아하는 준비 방법 : 사람 내가

 
100  the lonely guy  123 124 
1002 the tiger's den 123 125 
10  the master   125 190 
10000 the talon's  231 345 


희망이 하나 나에게 도움이 될 수 있습니다. . 고맙습니다.

+0

일부 사용자는 올바르게 이해할 수 있도록 질문에 코드를 입력하십시오. –

답변

0
public class Form1 : System.Windows.Forms.Form 
{ 
    private DataSet ds; 
    private MultiColumnListBox listBox1; 
    public Form1() 
    { 
     ds = DataArray.ToDataSet(new object[,]{ 
        {"Row0, col0", "Row0, col1" ,1}, 
        {"Row00, col0", "Row1, col1" ,new object()}, 
        {"Row1, col0", "Row2, col1" ,"Some String"}, 
        {"Row1a, col0", "Row3, col1" ,Rectangle.Empty}, 
        {"row1aa,col0", "Row4, col1" ,1}, 
        {"row0, col0", "Row5, col1" ,1}, 
        {"pow0, col0", "Row6, col1" ,1} 
        }); 

     listBox1 = new MultiColumnListBox(); 
     listBox1.Parent = this; 

     listBox1.DataSource = arr;    
    } 

} 
+0

asp.net에서도 사용할 수 있습니까? 왜냐하면 질문 asp.net입니다. –

+0

당신은 함수 안에서 코드를 사용할 수 있습니다 ... 이것을 통해 당신은 어떻게 그것을 얻을 수있는 아이디어를 얻을 수 있습니다! –

+0

내가 그걸 시도했지만 그게 오류 – user3312649