Heirarchical Grid Issue

I have a three tiered xml file that I want to load into a grid with expanding rows. The issue I have is that once I expand a row, the child grid appears above the selected row but should appear below.

I also need a way to hide some of the key columns in the grid and inner grids by Column Name rather than by column number. How is this best done?

XML Data File

<?xml version="1.0"?>
<payments>
<daytotal id="dt1" Date="01/17/2007" Amount="653320.56">
<payment dt="dt1" id="p1" Client="Abacus" Product="Disability" Amount="232034.55">
<allocation pmt="p1" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p1" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p1" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
<payment dt="dt1" id="p2" Client="Educator" Product="Disability" Amount="232034.55">
<allocation pmt="p2" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p2" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p2" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
<payment dt="dt1" id="p3" Client="Regence" Product="Disability" Amount="232034.55">
<allocation pmt="p3" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p3" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p3" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
</daytotal>
<daytotal id="dt2" Date="01/18/2007" Amount="63320.56">
<payment dt="dt2" id="p11" Client="Abacus" Product="Disability" Amount="232034.55">
<allocation pmt="p11" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p11" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p11" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
<payment dt="dt2" id="p21" Client="Educator" Product="Disability" Amount="232034.55">
<allocation pmt="p21" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p21" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p21" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
<payment dt="dt2" id="p31" Client="Regence" Product="Disability" Amount="232034.55">
<allocation pmt="p31" id="a1" AllocationType="Collected Premiums" Account="82734823" Amount="10000.00"/>
<allocation pmt="p31" id="a2" AllocationType="Due to Affiliates" Account="9823749" Amount="25.50"/>
<allocation pmt="p31" id="a3" AllocationType="Loss Expense" Account="9837948" Amount="500.00"/>
</payment>
</daytotal>
</payments>

C# Code

if (!Page.IsPostBack)
{
DataSet ds = new DataSet();
string filename = Server.MapPath("xml/data.xml");
ds.ReadXml(filename);

WebWorksheet sheet = GridWeb1.WebWorksheets[0];
sheet.DataSource = ds;
sheet.DataMember = "daytotal";

sheet.Cells.SetColumnWidth(0, new Unit("0pt"));
sheet.Cells.SetColumnWidth(1, new Unit("0pt"));

// Creates in-sheet column headers.
sheet.EnableCreateBindColumnHeader = false;

// Data cells begin at row 1;
sheet.BindStartRow = 0;

// Creates the data field column automatically.
sheet.CreateAutoGenratedColumns();

// Binding.
sheet.DataBind();
}

Hi,

Thanks for considering Aspose.

Well, I don't find your issue. I tried your xml file, get the heirarchical grid view and the child grid appears below the selected row. Could you give us some details: Which version of Aspose.Grid.Web you are using, OS, VS.Net, IIS settings, Browser etc.

I also need a way to hide some of the key columns in the grid and inner grids by Column Name rather than by column number. How is this best done?

I think you can use GridWeb's BindingChildView event and in its event handler you may write code e.g.,

private void GridWeb1_BindingChildView(Aspose.Grid.Web.GridWeb childGrid, Aspose.Grid.Web.Data.WebWorksheet childSheet)

{

DataView view = (DataView)childSheet.DataSource;

//Hiding two cols of the payment entity.

if (view.Table.TableName == "payment")

{

childSheet.BindColumns["dt"].Width = new Unit("0pt");

childSheet.BindColumns["id"].Width = new Unit("0pt");

}

}

You may try the latest hotfix obtaining: <A href="</A></P> <P>And attached is the preview of the grid when running in the browser, you may check</P> <P>Thank you.</P> <P> </P></FONT></FONT></FONT>

Grid Version: 1.9.2.3
OS: Windows XP SP2
VS.NET 2005 version 8.0.50727.762 (SP.050727-7600)
IIS: Defaults for a VS 2005 Web Site Using the auto Port Assignment

I get the same condition when I run the demo locally but it works fine when I run the demo from the aspose website.
The image below is an example of what I am seeing even running the installed demo locally.

OK One more piece of information. I uninstalled and reinstalled the 1.9.2.0 Grid from the msi file thinking the issue might be with the Hot Fix of 1.9.2.3

Running the solution file (Aspose.Grid.Web.Demos.sln), I received the following of which I said Yes...

The site 'http://localhost/Aspose.Grid.Web.Demos' is currently configured for use with ASP.NET 1.1.4322.2032.
Microsoft Visual Studio has been designed for use with ASP.NET 2.0; if not configured some features may make incorrect assumptions, and pages designed with the tool may not render correctly.

Would you like the site to be configured for use with ASP.NET 2.0?

The problem still exists.

Hi,

I think, when you re-install Aspose.Grid again, you selected VS.Net 2003 as demos option. So you have to convert and upgrade the demos to VS.Net 2005 for use.

It looks strange that you are facing the problem with heirarchical grid view demo. We will further investigate and get back to you soon.

Thank you.

Hi,

Thank you for reporting this problem. We have found that the heirarchical view has some problem at .net 2.0. We need some investigation and we will fix this problem soon.

Any update on this issue?

Hi,

Yes, we resolved the issue related to hierarchical gridview of the control for .Net 2.0 with XhtmlMode. Please try to upgrade to 1.9.2.5 or greater versions of Aspose.Grid.Web. You may dowload the zip file, the zip file contains Aspose.Grid.Web.dll and other script files etc. (You only need to replace / overwirte these files in their related installable folders). You may download the zip file(s) @:

<A href="</A></P> <P><A href="

We will soon launch the msi installer for users in our Downloads module.

Thank you.