visual-studio-2017componentone

component one c1List add Rows or addItems


im using component one tools like C1List in C# (also i use Visual Studio). I want to add some rows to my C1List. i found this documentation: http://www.componentone.co.kr/files/Documentation/Winforms_List.pdf

First it seems kinda easy. here is my Code:

C1.Win.C1List.C1DataColumn col = new C1.Win.C1List.C1DataColumn();
col.caption = "JustAColumn";
c1List1.Columns.Insert(0,col);

c1List1.AddItem("newRowValue");

Thats what the documentation says. But i see no added rows. The list is empty only the new column is there.

Someone worked with c1List already?


Solution

  • To use AddItem you have to set C1List's DataMode to AddItem;

    c1List1.DataMode = DataModeEnum.AddItem;
    

    For more refer this page