Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Hierarchical Grid doesn't show +/-
posted

Hi,

I am manually creating the relationship in a hierarchical grid (see below).  For Infragistics 6.2, it will not show the +/- in the grid.  Below is an excerpt of my code.  I am still using framework1.1, so cannot upgrade to the latest infragistics yet.  This worked in an earlier version though.  If I do an expand all, I can see the 2nd level.  But the grid will not show me the expand/compress buttons.  Any help will be much appreciated. //execute stored procs to return data; this basically returns 2 datasets (level1 & level2)
OracleDataAdapter myDataAdapter = new OracleDataAdapter();
myDataAdapter.SelectCommand = cmd;
DataSet ds =
new DataSet();
ds.Tables.Add ("level1");
ds.EnforceConstraints =
false;
ds.Tables["level1"].BeginLoadData();
myDataAdapter.Fill(ds.Tables["level1"]);
ds.Tables["level1"].EndLoadData();

 

// Fill Level 2 tasks
cmd.Parameters["p_lvl"].Value = 1;
myDataAdapter.SelectCommand = cmd;
ds.Tables.Add ("level2");
ds.EnforceConstraints =
false;
ds.Tables["level2"].BeginLoadData();
myDataAdapter.Fill(ds.Tables["level2"]);
ds.Tables["level2"].EndLoadData();

//create relations for hierarchy
ds.Relations.Add(ds.Tables["level1"].Columns ["LVL1"], ds.Tables["level2"].Columns ["LVL1"]);
UltraWebGrid1.Rows.Clear();
UltraWebGrid1.Columns.Clear ();
UltraWebGrid1.DisplayLayout.ViewType = ViewType.Hierarchical;
UltraWebGrid1.DataSource = ds;
UltraWebGrid1.DataMember = "level1";
UltraWebGrid1.DataBind();

  • 405
    posted

    I resolved problem #1.  Issue is that the logic contained this statement:

    UltraWebGrid1.DisplayLayout.IndentationDefault = 0;

    I removed this and the plus/minus icons show up!

  • 405
    posted

    Ok, I am also having a problem with my OutlookGroupBy grid.  Does anyone know of a known problem with Infragistics not properly displaying the outlookgroupby or hierarchical grid in the parent/child relationship?  Below is a quick example.

    My query returns the following results: 

    type            desc
    employee    name1
    employee    name2
    employee    name3
    customer    cust1
    customer    cust2
    customer    cust3

    my c# code is as follows:

    UltraWebGrid1.DataBind();
    UltraWebGrid1.DisplayLayout.ViewType = ViewType.OutlookGroupBy;
    UltraWebGrid1.Columns[0].IsGroupByColumn =
    true;
    UltraWebGrid1.Columns[0].SortIndicator=SortIndicator.Descending;
    UltraWebGrid1.Rows.Sort(
    true);
    UltraWebGrid1.ExpandAll(
    true);
    UltraWebGrid1.Columns[0].Hidden=true;

    Grid results show only:
    name1
    name2
    name3
    cust1
    cust2
    cust3

    Grid should show this:
    employee
        name1
        name2
        name3
    customer
        cust1
        cust2
        cust3

    if I don't hide column 0, I only get:
    employee
    customer

    Can anyone please help???