473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

grid view control

I am developing a website(File system), in that I am using a grid view control. In the code behind file, I am using gridview control's rowDeleting event. When the user clicks delete button , I am displaying a messagebox asking whether to delete or not. When I am running from source it works fine.

But after publishing my website, from the published pages, when I click the delete button, I am getting the following error.

"showing a model dialog box or form when the application is not running in user interactive mode is not a valid operation. Specify the serviceNotification or DefaultDesktopOnly Style to display a notification from a service application."

How can I resolve this problem?

thank u all,
kiran
Nov 29 '07 #1
4 1496
Shashi Sadasivan
1,435 Expert 1GB
Hi,
what sort of modal dialog are you using?
javascript or .Net?

If its MessageBox.Show() then its from the .Net library and since your service is running the code, it would only run on the machine running the service (not the client)
Nov 29 '07 #2
Hi,
what sort of modal dialog are you using?
javascript or .Net?

If its MessageBox.Show() then its from the .Net library and since your service is running the code, it would only run on the machine running the service (not the client)
I am using msgBox( ) function ( VBScript ).

in the gridView_rowDeleting event I used the following statements

Expand|Select|Wrap|Line Numbers
  1. dim style as msgBoxStyle
  2. dim msgResp as msgBoxResult
  3.  
  4. style = msgBoxStyle.DefaultButton2 or msgBoxStyle.crytical or msgBoxStyle.YesNo
  5.  
  6. msgResp = msgBox("want to delete?", style, "Delete")
  7.  
  8. if msgResp = msgBoxResult.yes then
  9.  
  10. '' Delete record
  11.  
  12. end if
  13.  
If this is not the right way to meet my requirement, I request u to show alternative. i.e., whenever user clicks the delete button of gridview control (I am using visual studio 2005), i want to receive confirmation from user.

Thank u all
kiran
Nov 29 '07 #3
I am developing a website(File system), in that I am using a grid view control. In the code behind file, I am using gridview control's rowDeleting event. When the user clicks delete button , I am displaying a messagebox asking whether to delete or not. When I am running from source it works fine.

But after publishing my website, from the published pages, when I click the delete button, I am getting the following error.

"showing a model dialog box or form when the application is not running in user interactive mode is not a valid operation. Specify the serviceNotification or DefaultDesktopOnly Style to display a notification from a service application."

How can I resolve this problem?

thank u all,
kiran
can you post code ? or you to Project.com that more example

i think you should use code after
Expand|Select|Wrap|Line Numbers
  1. protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  2.         {
  3.             if (e.Row.RowType == DataControlRowType.DataRow)
  4.             {
  5.                 LinkButton l = (LinkButton)e.Row.FindControl("LinkButton1");
  6.  
  7.                 l.Attributes.Add("onclick", "javascript:return " +
  8.                      "confirm('Bạn có thực sự muốn xóa bản ghi này ?  ')");
  9.             }     //DataBinder.Eval(e.Row.DataItem, "StatusID") + "')");
  10.         }
  11.  
  12.         protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
  13.         {
  14.             int statusID = (int)GridView1.DataKeys[e.RowIndex].Value;
  15.             Delete(statusID);// function Delete
  16.         }
Nov 29 '07 #4
I tried with ur code. I used a templatedField with a linkbutton type Itemfield.
whem i am clicking the linkbutton it is diplaying alert but how can I fire to gridview_rowdeleting event when the user clicks "yes".
Dec 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Shiva | last post by:
Hi, My (main)form has a subform that contains the details of the mainform. The default view of the mainform is 'single form', the default view of the subform containing the details is...
4
by: Maheshkumar.R | last post by:
Hi groups, How to get a particular selected row ID from a grid view control where i have placed imagebutton. On click event how i can get the ROW ID ? -- Mähésh Kumär. R
0
by: ¿ Mahesh Kumar | last post by:
I have created a XML file as datasource which i 'm binding to a grid view control. During runtime I'm capturing items in XML file and displaying in a GRID VIEW control. but i want to remove or...
10
by: John Wilson | last post by:
My app produces some long datatables to display in a grid. So I put them in a div so users can scroll. But the grid headers scroll out of view. I would like to stop them doing this. Can I fix them...
1
by: sonali_aurangabadkar | last post by:
i want to edit whole grid on singel button click
2
by: probashi | last post by:
Hi, Using the SqlDataSource/SelectParameters/ControlParameter one can easily bind a Grid View with a list box (or any other controls), pretty cool, but my list box is multi select. My...
0
by: Kondapanaidu | last post by:
Hi, I am using Visual Studio 2005 ASP.NET Using C#. My form has one. Grid view This it self having Text box and Dropdowns. I Have coule of questions like?
1
by: =?Utf-8?B?TG95b2xhIHN0YWxpbg==?= | last post by:
Hi, I am using ASP.Net 2.0 version and Windows'XP OS. I am useing the Grid view control to display the user details along with the paging concept provided by the grid view control. When i...
2
by: Valli | last post by:
Hi, I am using a gridview to display data from table. In the gridview, there are 5 columns in which one column contains link name(eg. http://www.msn.com). I want to show this link as an...
2
by: poornimanithya76 | last post by:
Hi, i am tried to convert below piece of code from data grid to grid view. since grid view is not having item created event so i try to implement with row Created. i am unable to perform whole...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.