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
100
Bug with Button Columns and LoadOnDemand
posted

Rows that get added on demand have buttons with no css class set.

  1. Have a form with LoadOnDemand="xml"
  2. In InitializeLayout add a button column and set CellButtonStyle.CssClass to some css class
  3. Load the form and scroll down so that the grid loads more data

Notice how the newly added rows have buttons with no css class.

To work around this I simply check for the postback and set the style in the InitializeLayout event.  Shouldn't InitializeLayout only get called when a new data schema is bound to the Control anyway? 

if (IsPostBack)
{
Grid.Columns[0].CellButtonStyle.CssClass =
"btnClass";
return;
}