Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
650
Events in a UserControl
posted

Good Day All

Am using a Infragistic Ultragrid Control and in the Control there is no event <b>RowDataBound</b>, So i decided to add it. I right Clicked on the Control and went to Properties and clicked at the lightning sign for events and double clicked "DataBound" event and next to it i started coding  my event like this

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)

{

if(e.Row.RowType == DataControlRowType.DataRow)

{

//Were ony intestested in Rows that contain Data

//Get a reference to the Data used to Databound the row

DataRowView drv = (DataRowView)e.Row.DataItem;if (Convert.ToInt32(drv["Actv1"]) == 262)

{

//The Current Product has 0 items in Stock

e.Row.Font.Bold = true;

e.Row.ForeColor = System.Drawing.Color.Red; //Set the text color red

e.Row.ForeColor = System.Drawing.Color.White;

}

}

}


The Compiler did not complain. Now i want to use this event in the like in MS Gridview. How do i get that event to be Fired ?


Thank you

Parents
No Data
Reply
  • 7694
    posted

    Hello,

    Please take a look at the link below:
    http://forums.infragistics.com/forums/p/18427/67170.aspx#67170

    also take a look at:

    http://forums.infragistics.com/forums/p/18722/67999.aspx#67999

    Hope this helps.

Children
No Data