Messagebox Based on server event

I have search screen where as soon as user click on the search if there are no results i want to show a window Control has a message box. Please let me know is there way you can do that using any sync fusion controls.


5 Replies

RP Rekha P Syncfusion Team December 16, 2008 05:38 AM UTC

Hi Prasanna,

Thank you for your interest in Syncfusion Products.

In order to show a window control, you can use the property InitiallyShown and please refer the below code snippet to achieve this.


Window1.InitiallyShown = true;


Also please refer the below link for a small online sample to show a Window control as a messagebox and the sample files can be downloaded from 'Download source'.

http://websamples.syncfusion.com/samples/Tools.Web/6.4.0.15/F78487-Window/main.htm

Please let me know if this sample helps you.

Thanks,
Rekha



MA Mohamed Arif December 16, 2008 02:34 PM UTC

Rekha,


Can i use the same on a Web UserControl. I tried, but it is not showing the window. Can you please let me know, if i need to do anything specific for a control?

Thanks,
Arif

>Hi Prasanna,

Thank you for your interest in Syncfusion Products.

In order to show a window control, you can use the property InitiallyShown and please refer the below code snippet to achieve this.


Window1.InitiallyShown = true;


Also please refer the below link for a small online sample to show a Window control as a messagebox and the sample files can be downloaded from 'Download source'.

http://websamples.syncfusion.com/samples/Tools.Web/6.4.0.15/F78487-Window/main.htm

Please let me know if this sample helps you.

Thanks,
Rekha





RP Rekha P Syncfusion Team December 17, 2008 06:50 AM UTC

Hi Arif,

Yes, you can use the Window control as a WebUserControl. Please refer the code snippet below to add a property InitiallyShown to the User Control.

public bool InitiallyShown
{
get
{
return Window1.InitiallyShown;
}
set
{
Window1.InitiallyShown = value;
}
}

Also please refer the sample below which illustrates the Window control as a user control and the sample files can be downloaded from 'Download source'.

http://websamples.syncfusion.com/samples/Tools.Web/6.4.0.15/F78487-Window_Updated/main.htm

Please let me know if this sample helps you.

Thanks,
Rekha



MA Mohamed Arif December 22, 2008 02:35 PM UTC

Rekha,

I was able to show the window, but the window is not enabled.

This is what i am trying to achieve.

Control makes a webservice call, If the call returns no results, I need to display a popup window saying search yielded no results with an "Ok" Button.

This code should be within the control, not in the calling aspx page.





RP Rekha P Syncfusion Team December 24, 2008 11:11 AM UTC

Hi Arif,

Thank you for being patient.

I am afraid that I am unable to reproduce the issue of 'window is not enabled'. Also I have created a simple sample to test this issue and please find the sample files below which illustrates your scenario.

http://websamples.syncfusion.com/samples/Tools.Web/6.4.0.15/F78487-Window_Updated1.zip

In the above sample, search for a root treeview node and click 'Search' button. If no such entered text is present in treeview, then Window control popup with ok button. Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Please let me know if you have any other concerns.

Thanks,
Rekha


Loader.
Up arrow icon