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
125
Fire ClientSide event when selecting the checkbox
posted
Hi, I have created a UltraGridBand in the code behind. The code looks like this: UltraGridBand ub = new UltraGridBand(true); ub.Columns.Add("One"); ub.Columns.Add("Two"); ub.Columns[0].AllowUpdate = AllowUpdate.Yes; ub.Columns[0].Type = ColumnType.CheckBox; ub.Columns[0].DataType = typeof(bool).ToString(); this.UG1.Bands.Add(ub); I want to write some client side code when the checkbox is clicked. How to trigger a client side event when the checkbox is clicked?
  • 140
    posted

    AfterCellUpdate is the right event to use if you're checking on the client.
    If you're checking server-side, any of the following events will do, depending on whether you want postbacks to occur automatically and when you want the check to be performed:  UpdateCell, UpdateCellBatch, UpdateRow, UpdateRowBatch
    Either way, check the Value of the cell in your checkbox column.  Assuming your column's datatype is set to be boolean, the cell's Value will be true if the box is checked, and false otherwise.