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
1205
UltraGridRowEditTemplate - Archor & Toggle On/Off
posted

A couple of UltraGridRowEditTemplate qusstions:

1. Can I toggle template usage on and off using a button, similar to what I can do with cardview?
2. Can I set a fixed location for a template within the grid using something like:

 this.ret.Anchor...   
 this.ret.Location...

Thank you.

Parents
  • 37774
    Suggested Answer
    posted

    1) The easiest way to do this is to toggle between setting the RowEditTemplate property to null or to the instance of your template, i.e.:

    UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[0];
    if (band.RowEditTemplate == null)
        band.RowEditTemplate = this.ultraGridRowEditTemplate1;
    else
        band.RowEditTemplate = null;

    2) There's not really a way to fix the location of the template, per se, but you could certainly handle the BeforeRowEditTemplateDisplayed event and set e.Location to a point of your choosing; just keep in mind that this point is in screen coordinates.

    -Matt

Reply Children
No Data