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();
}