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
455
Supress new template add row
posted

 Hi

How to suppress the new template add row when the user starts typing in the template row? I have set the AllowAdd property to TemplateRowOnBottom. I would like to add a new template row only when the user clicks on the row selector image or when the template row the user entered has valid values.

 

Thanks 

 

  • 71886
    Offline posted

    Hello gomadams.

    You could read about suppressing this in the following thread:

    http://forums.infragistics.com/forums/t/12252.aspx.

    Also, you could use a code like the following in order to achieve the desired behavior:

    private void ultraGrid1_AfterSelectChange(object sender, AfterSelectChangeEventArgs e)
            {
                if (e.Type.Name == "UltraGridRow" && ultraGrid1.ActiveRow.IsAddRow && ultraGrid1.ActiveRow.GetUIElement().ChildElements[0].PointInElement(ultraGrid1.PointToClient(MousePosition)))
                {
                    Console.WriteLine("A selector was clicked, please perform the actions here");
                }
            }

     

    Please do not hesitate to ask if something comes up.