Hello Community,
In my “Page_Load” sometimes I use Grid Control RowDataBound to manipulate the grids layout as follows
PX.Web.UI.PXGrid gridWithStyle = (PX.Web.UI.PXGrid)ControlHelper.FindControl("grid", page);
if (gridWithStyle != null)
{
gridWithStyle.RowDataBound += (object grdsender, PXGridRowEventArgs erdb) =>
{
var grdRow = erdb.Row;
//Do Stuff
}
}
I have come across a situation where I need to do the same for “Form” control. I tried to replicate the same logic from Grid and modify it for Form but couldn’t make it work. This is what I have done but I have a problem with the commented part for “DataBound” as follows.
PX.Web.UI.PXFormView formWithStyle = (PX.Web.UI.PXFormView)ControlHelper.FindControl("form", page);
if (formWithStyle != null)
{
formWithStyle.DataBound += (object frmsender, EventArgs erdb) =>
{
// how? var frmRow = erdb.Row;
//Do Stuff
}
}
Any help is appreciated how can I make this work?
Best answer by aaghaei
View original