User502904657 posted
First post here!
Sorry if I am breaking ediquite.
I have been using the techniques shown here
http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm
Its been working well for me. My site use VB rather than C#, but it hasn't been an issue until I tried to do some dressing up of the GroupHeader and GroupSummary.
The site above has the following sample:
protected void Page_Load(object sender, EventArgs e)
{
GridViewHelper helper = new GridViewHelper(this.GridView1);
helper.RegisterGroup("ShipRegion", true, true);
helper.RegisterGroup("ShipName", true, true);
helper.GroupHeader += new GroupEvent(helper_GroupHeader);
helper.ApplyGroupSort();
}
private void helper_GroupHeader(string groupName, object[] values, GridViewRow row)
{
if ( groupName == "ShipRegion" )
{
row.BackColor = Color.LightGray;
row.Cells[0].Text = " " + row.Cells[0].Text;
}
else if (groupName == "ShipName")
{
row.BackColor = Color.FromArgb(236, 236, 236);
row.Cells[0].Text = " " + row.Cells[0].Text;
}
}
I am having trouble duplicating the following line from the above code into VB. Any help is appreciated.
helper.GroupHeader += new GroupEvent(helper_GroupHeader);
Thanks,
Shane.