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
65
RowSelectionChanging Event issue
posted

Hi guys, 

I need some help to achieve my requirement, we have a set of controls (Text boxs, Date pickers & WebDataGrid v11.1), on page load grid will fill with data and select the first row, which will pre-populate the TextBoxs & Date controls from the Selected Row. If user change the data in any of the TextBoxs & Date Controls and try to Select different Row, then prompt the user with Confirm Message.

To achieve this, i written the following code in RowSelectionChanging event and it works perfectly but only issue is that, Message is dispalying "Twice", i need single message, any help is greatly appreciated.

 function ifgWD_CaseInfo_RowSelectionChanging(sender, eventArgs) {

        if (isDirty == 1) {

            var message = "Changes are pending..."           

            var answer = confirm(message)

            if (!answer) {

                eventArgs.set_cancel(true);

                return false;

            }

            else {

                return true;

            }

        }  

    }

 

Thanks,

Sunil