Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: TreeGridview it shows expand button on every column . bug or My mistake?? #513

Open
blackholeearth opened this issue Dec 22, 2024 · 3 comments
Labels
discussion question Further information is requested

Comments

@blackholeearth
Copy link

blackholeearth commented Dec 22, 2024

    var ktgv1 = new KryptonTreeGridView();
    ktgv1.Dock = dock.Fill;
    this.Controls.Add(ktgv1);

    // Example of adding nodes
    // Define columns
    ktgv1.Columns.Add(new KryptonTreeGridColumn { HeaderText = "name", DataPropertyName = "Column1" });
    ktgv1.Columns.Add(new KryptonTreeGridColumn { HeaderText = "age", DataPropertyName = "Column2" });
    ktgv1.Columns.Add(new KryptonTreeGridColumn { HeaderText = "birthdate", DataPropertyName = "Column3" });
    ktgv1.Columns.Add(new KryptonTreeGridColumn { HeaderText = "job", DataPropertyName = "Column4" });

    var rootNode = ktgv1.GridNodes.Add("Root", "" , "" ,"");
    var childNode1 = rootNode.Nodes.Add("jane doe", "18", "2022-12-12", "engineer");
    var childNode2 = rootNode.Nodes.Add("joe doe", "18", "2022-12-12", "engineer");
    childNode1.Nodes.Add("ch-joe doe", "18", "2022-12-12", "engineer");
    for (int i = 0; i < 500; i++)
    {
        var childNodex = rootNode.Nodes.Add($"ch-joe doe {i}", "18", "2022-12-12", "engineer");
        for (int j = 0; j < 250; j++)
        {
            childNodex.Nodes.Add($"ccx - joe doe {i}", "18", "2022-12-12", "intern");
        }

    }
    ktgv1.ExpandAll();


any tutorial for this control ?? - #FAQ-able

photo:
image

@blackholeearth blackholeearth added discussion question Further information is requested labels Dec 22, 2024
@PWagner1
Copy link
Contributor

Hi @blackholeearth

Is it possible to upload a sample?

@blackholeearth
Copy link
Author

blackholeearth commented Dec 23, 2024

yeah... here, the test proj.

sample project also have my TreeGridView implementation..
mine is 2-3x slower than kryptonsuit-extended.canary-treegridview

Treegridview_test1.zip

@blackholeearth
Copy link
Author

blackholeearth commented Dec 23, 2024

i think i found it. - add to #FAQ please.

when i type .KryptonTreeGrid crtrl space.. nothing shows in the autocomplete . i found it by mistake..

  // Example of adding nodes
  // Define columns

  //this will show expand/button
  ktgv1.Columns.Add(new KryptonTreeGridColumn { HeaderText = "name", DataPropertyName = "Column1" });  

 //normal column
  ktgv1.Columns.Add(new KryptonDataGridViewTextBoxColumn { HeaderText = "age", DataPropertyName = "Column2" });  
  ktgv1.Columns.Add(new KryptonDataGridViewTextBoxColumn { HeaderText = "birthdate", DataPropertyName = "Column3" }); 
  ktgv1.Columns.Add(new KryptonDataGridViewTextBoxColumn { HeaderText = "job", DataPropertyName = "Column4" }); 

result
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants