
Signature
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
Thank you, Peter, that gets me sometimes...
Now I am getting a
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS0122: 'SalesApp.subscriptions.Item_Bound(object,
System.Web.UI.WebControls.DataGridItemEventArgs)' is inaccessible due to its
protection level
and the highlighted line is line 14
Source Error:
Line 12: <form id="Form1" method="post" runat="server">
Line 13: <IMG style="Z-INDEX: 100; LEFT: 8px; POSITION: absolute; TOP:
8px" src="Images/logo.gif">
Line 14: <asp:DataGrid id="dgSubs" style="Z-INDEX: 102; LEFT: 24px;
POSITION: absolute; TOP: 128px" runat="server" OnItemDataBound="Item_Bound"
Line 15: BorderColor="#CCCCCC" BorderStyle="Ridge" BorderWidth="1px"
BackColor="White" CellPadding="0"
Line 16: AllowPaging="True" Font-Size="Smaller" CellSpacing="2"
Width="1000px" HorizontalAlign="Center">
> Antonio,
> Whenever you see this exception you must remember to ask yourself,
[quoted text clipped - 46 lines]
> > >>
> > >> Antonio
Antonio - 30 Jun 2006 18:14 GMT
Ok, Peter,
I set the Item_Bound in the Page_Load event
private void Page_Load(object sender, System.EventArgs e)
{
dgSubs.ItemDataBound += new DataGridItemEventHandler(this.Item_Bound);
bindGrid();
}
The Item_Bound event is
private void Item_Bound(Object sender, DataGridItemEventArgs e)
{
if (e.Item.Cells[4].Text == "Null/No Set Dummy Row")
e.Item.Cells[4].Text = "None";
}
and it never gets to the e.Item.Cells[4].Text = "None"; line, so, it still
displays the "Null/No Set Dummy Row"
> Thank you, Peter, that gets me sometimes...
>
[quoted text clipped - 82 lines]
>> > >>
>> > >> Antonio