This is a migrated thread and some comments may be shown as answers.

Accessing table rows

0 Answers 67 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bader
Top achievements
Rank 1
Bader asked on 19 Feb 2012, 02:52 PM
Hi,

I have a problem in impleminting the following code (Which is belongs to the RadGrid ASP.NET AJAX control) uisng the Reporting Table control:
protected void MainRadGrid_PreRender(object sender, EventArgs e)
{
foreach (GridDataItem dataItem in MainRadGrid.MasterTableView.Items)
{
int previousItemIndex = dataItem.ItemIndex - 1;
if (previousItemIndex >= 0)
{
if (dataItem["Number"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Number"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].RowSpan = 4;
dataItem.OwnerTableView.Items[previousItemIndex]["Number"].BackColor = System.Drawing.Color.FromName("#FAF8BB");
dataItem["Number"].Visible = false;
}
if (dataItem["Color"].Text == dataItem.OwnerTableView.Items[previousItemIndex]["Color"].Text)
{
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].RowSpan = 2;
dataItem.OwnerTableView.Items[previousItemIndex]["Color"].BackColor = System.Drawing.Color.FromName("#B6F1FA");
dataItem["Color"].Visible = false;
}
}
}
}

And which event should I use here: ItemDataBinding or ItemDataBoun

Please, I need your help.

Regards,
Bader

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Bader
Top achievements
Rank 1
Share this question
or