Search Results

Search found 6055 results on 243 pages for 'forms'.

Page 113/243 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • DataGridView and the CellEndEdit Event

    - by Brandon
    I have a DataGridView, and would like to hook into the CellEndEdit event. I've been able to successfully hook into the CellContentClick event, but am having issues with CellEndEdit. I added the following code to my Form1.cs file: private void dataGridView1_CellEndEdit(object sender, DataGridViewCellCancelEventArgs e) { dataGridView1[0, 0].Value = "Changed"; } With that code, nothing happens when I am done editing a cell. Is there anything else that I need to do to successfully hook into this event? I see that CellContentClick has a this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); line of code in the Form1.Designer.cs file, but I tried to mimic this for CellEndEdit, and received a compile error (No overload for 'dataGridView1_CellEndEdit' matches delegate 'System.Windows.Forms.DataGridViewCellEventHandler')

    Read the article

  • how to put a value to an array when a checkbox is checked? c#?

    - by Jan Darren Noroña
    I am making a random character generator, i have 2 forms, form1 and form2, on my form2 i have the checkboxes there, so if the user checked checkbox1, on my form1 it will only display 1 character, now if the user check all 5 checkboxes, my form1 will generate 5 characters. i have a button on form1 that will trigger an event on generating random characters. characters: '+','-','*','/','%' how will my code be? I am using WINDOWS FORMS APPLICATION. pics here: form1: http://i49.tinypic.com/30bzos8.png form2: http://i50.tinypic.com/k00ndt.png char[] select = new char[] { '+' , '-' , '*' , '/', '%' }; var rand = new Random(); char num = select[rand.Next(5)];

    Read the article

  • In Visual Studio 2010, how do you invoke the "View In Browser" feature on an MVC app?

    - by Chris
    In Visual Studio 2010, you can right-click an aspx page in a web forms app, or on the web forms app itself in the solution explorer, and you get "View in Browser" in your context menu. In ASP.NET MVC projects, this item doesn't seem to be available in the context menu. The only way I know to run the app is to set the MVC app as a startup project and hit CTRL+F5. But, if there are two MVC apps in the solution, this doesn't really work. How do you accomplish this for mvc apps?

    Read the article

  • Printing Work Items in TFS

    - by user351671
    Hi, I am looking for a fancy way the print individual work items in TFS. OK ... maybe not the work item directly but I need to produce printable forms based on data on a work item. And by fancy I mean: header, footer, formatting, tables maybe ... stuff like that. No, I am not trying to print a list of work items, read carefully, I need an output based on a single work item. For those who are wondering "Why on earth do you need that?" I should say: We are keeping everything on TFS around here. (For now only software development stuff, but I am thinking bigger...) Sometimes somethings need to be on hard copy, to be signed for instance, and that is why I need printable forms.

    Read the article

  • Good way to fetch XML from a remote URL, convert it to HTML and display it in a ASP.NET-page

    - by Binary255
    Hi, The use case I want to achive is. 1. Fetch XML from a remote URL. 2. Convert it to HTML using XSLT 3. Insert the generated HTML at a position in my ASP.NET web forms page. Alternative on the above, if 1 returns a 404: 2. Generate HTML which display an error message to the user. Only step 3 is left as I've completed 1-2. As there are logic for handling the two execution paths and performing the XSLT-transformation I thought it would be suitable to keep it in the code-behind file. What's a good, clean way of inserting generated HTML at a position in my ASP.NET web forms page?

    Read the article

  • Screen Resolution Question VS2008 - C++ CLI

    - by MrMcC
    Hi, I have a program that has a SIZE of 800x600. I want to make this program expand if it is maximized, so that all the elements(buttons, picturebox's) change size to fit the new ratio depending on the users windows screen resolution. The way I am thinking to approach this is to take the users screen resolution and manual change the size of everything, and do this for all common resolutions, if a user has some rare resolution, ill just make it so the maximize/minimize buttons are disabled. But this will be very very time consuming as there are lots of elements in the forms, and their are multiple forms..... Basically, is there a shortcut? Perhaps a built in feature or some kind of add in for VS2008. What are some methods to tackle this issue?

    Read the article

  • MessageBox.Show not raising HelpRequested event

    - by Trevortni
    I have a form that is showing a MessageBox using MessageBox.Show, and trying to receive events from the Help button on the MessageBox so I can execute my own code. The Microsoft documentation shows how to do this; however, using what is suggested does not work. Here's a shortened version of my code: Private Function MethodName() As Boolean AddHandler Me.HelpRequested, AddressOf Me.MsgBoxHelpRequested Select Case MessageBox.Show("Text", "Title", MessageButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2, 0, True) Case MsgBoxResult.Yes ' Do stuff Case MsgBoxResult.No ' Do stuff Case MsgBoxResult.Cancel RemoveHandler Me.HelpRequested, AddressOf Me.MsgBoxHelpRequested Return False End Select RemoveHandler Me.HelpRequested, AddressOf Me.MsgBoxHelpRequested End Function Private Sub MsgBoxHelpRequested(ByVal sender As Object, ByVal hlpevent As System.Windows.Forms.HelpEventArgs) ' Breakpoint that never gets hit ' More code End Sub I've been searching for a solution to this problem, but the best I've found is this question: http://stackoverflow.com/questions/2407880/how-to-detect-help-button-press-in-windows-forms-messagebox that refers me back to the same Microsoft code that doesn't seem to be working. Can anybody help me with this? Thank you.

    Read the article

  • How to inherit from the main class in java

    - by user225269
    I have two java classes. One is NewFrame.java where the forms(buttons, textfields) are located. And the other one is Main.java where I have put the connection string for mysql: Main.java looks like this: public class Main { /** * @param args the command line arguments */ public static void main(String[] args) throws Exception { // TODO code application logic here Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/employee_record", "root", "password"); PreparedStatement statement = con.prepareStatement("select * from employee"); ResultSet result = statement.executeQuery(); } } How do I inherit from the main.java so that the declarations in it would be universally accessible to the forms in NewFrame.java? Please help. Thanks

    Read the article

  • How to make c# don't call destructor of a instance

    - by Bình Nguyên
    I have two forms and form1 needs to get data from form2, i use a parameter in form2 constructor to gets form1's instance like this: public form2(Form form1) { this.f = form1; } and in form1: Form form2 = new Form(this); But it seem form1 destruct was called when i closed form1. my question is how can i avoid this problem? EDIT: I have many typing mistakes in my question, i'm so sorry, fixed: I have two forms and form2 needs to get data from form1, i use a parameter in form1 constructor to gets form1's instance like this: private Form f; public form2(Form form1) { this.f = form1; } and in form1: Form form2 = new Form(this); But it seem form1 destruct was called when i closed form2. my question is how can i avoid this problem?

    Read the article

  • html5 offline storage for Windows Mobile 6.1 or an alternative?

    - by SimonNet
    I understand that there are no browsers currently which support offline storage for mobile 6.1. I am trying to find a web form based solution avoiding the loss of data when my device has no connectivity. Have ruled out Gears and would like to avoid a win forms application as the forms change so often. Are there any other approaches that I should look at which are viable in C#? Are there any estimated dates for when we might see a browser for mobile 6.1 which can offer offline storage? Thanks

    Read the article

  • Should I still use querystrings for page number, etc, when using ASP.NET 4 URL Routing?

    - by Scott
    I am switching from Intelligencia's UrlRewriter to the new web forms routing in ASP.NET 4.0. I have it working great for basic pages, however, in my e-commerce site, when browsing category pages, I previously used querystrings that were built into my pager control to control paging. An old url (with UrlRewriting) would be: http://www.mysite.com/Category/Arts-and-Crafts_17 I now have a MapPageRoute defined in global.asax as: routes.MapPageRoute("category-browse", "Category/{name}_{id}", ~/CategoryPage.aspx"); This works great. Now, somebody clicks to go to page 2. Previously I would have just tacked on ?page=2 as the querystring. Now, How do I handle this using web forms routing? I know I can do something like: http://www.mysite.com/Category/Arts-and-Crafts_17/page/2 But in addition to page, I can have filters, age ranges, gender, etc. Should I just keep defining routes that handle these variables, or should I continue using querystrings and can I define a route that allows me to use my querstrings like before?

    Read the article

  • How to handle the close (big X) button at the source?

    - by Simon T.
    We would like under some circumstances to block the action of the close button in the title bar. The problem is that it's a MDI applications and it seems that we will have to add code in each forms to cancel the operation in the Closingevent handler. It seems that the child forms are the first to receive the event. There is no way to add code at a single place to cancel the close operation. Information on how the close event is propagated to the child form would be welcome. Is there a simple way of doing what we want to do?

    Read the article

  • What is the proper way to check the previous value of a field before saving an object? (Using Django

    - by anonymous coward
    I have a Django Model with updated_by and an approved_by fields, both are ForeignKey fields to the built-in (auth) User models. I am aware that with updated_by, it's easy enough to simply over-ride the .save() method on the Model, and shove the request.user in that field before saving. However, for approved_by, this field should only ever be filled in when a related field (date_approved) is first filled in. I'm somewhat certain that I can check this logically, and fill in the field if the previous value was empty. What is the proper way to check the previous value of a field before saving an object? I do not anticipate that date_approved will ever be changed or updated, nor should there be any reason to ever update the approved_by entry. UPDATE: Regarding forms/validation, I should have mentioned that none of the fields in question are seen by or editable by users of the site. If I have misunderstood, I'm sorry, but I'm not sure how forms and validation apply to my question.

    Read the article

  • Wpf Window resizes when computer is locked.

    - by Chris
    I have a Window set to the height and width of my monitors: var r = System.Drawing.Rectangle.Union( System.Windows.Forms.Screen.AllScreens[0].Bounds, System.Windows.Forms.Screen.AllScreens[1].Bounds ); Height = r.Height; Width = r.Width; This is all fine until I Lock my computer (WIN+L), when I come back the window has resized itself to be on one monitor only. What I want to do is prevent the decrease in size, as I'm drawing on a canvas on the second monitor, and when the resize occurs, this is all lost.. Any thoughts on how I can prevent this? Cheers!

    Read the article

  • asp.net: moving from session variables to cookies

    - by P a u l
    My forms are losing session variables on shared hosting very quickly (webhost4life), and I think I want to replace them with cookies. Does the following look reasonable for tracking an ID from form to form: if(Request.Cookies["currentForm"] == null) return; projectID = new Guid(Request.Cookies["currentForm"]["selectedProjectID"]); Response.Cookies["currentForm"]["selectedProjectID"] = Request.Cookies["currentForm"]["selectedProjectID"]; Note that I am setting the Response cookie in all the forms after I read the Request cookie. Is this necessary? Do the Request cookies copy to the Response automatically? I'm setting no properties on the cookies and create them this way: Response.Cookies["currentForm"]["selectedProjectID"] = someGuid.ToString(); The intention is that these are temporary header cookies, not persisted on the client any longer than the browser session. I ask this since I don't often write websites.

    Read the article

  • Trying to get excel 2003 into already made windows form

    - by Dcurvez
    good afternoon everyone :) I got sucha dilemma! (hate being new at stuff!) What my problem is is that I have a project that is in full design mode swing right now. I built it using the Windows form.. Anyways, on one of my forms..that I already started building (very painstakingly).. Minds have changed and now what needs to be on that form is either a full excel 2003 workbook..or at the very least..excel worksheet. The problem is that I have not been using studio 2008 for long..and coding experience shows the same. Can someone please tell me how the heck I can put a worksheet or a workbook on that form without starting my whole project over using office forms? Please..go slow with this newbie cuz i really dont know anything and Jargon is confusing me even more :( thanxxXXX :)

    Read the article

  • App.Config file in console application C#

    - by user1240679
    I have a console application in which I want to write the name of a file. Process.Start("blah.bat"); Normally, I would have something like that in windows application by writing the name of the file 'blah.bat' to Settings file in Properties. However, here I didn't find any Settings file and I added an app.config for the same purpose. I am not sure what to write here in app.config, that would lead to me to achieve similar thing as in windows forms. For eg: In windows forms. Process.Start(Properties.Settings.Default.BatchFile); where BatchFile is a string in settings file in Properties.

    Read the article

  • Redirecting a page when session expires using asp.net mvc

    - by Naidu
    In my web.config file i have the following code: <system.web> <assemblies> <authentication mode="Forms"> <forms loginUrl="/Account/Login" slidingExpiration="true" timeout="1" /> </authentication> <sessionState timeout="1"></sessionState> </assemblies> </system.web> And I have main page Project and in that there will sub pages. I have given the [Authorize] attribute for each view index method. After the session complete when we select any view then the page inside the project main page will be redirecting. But I want the whole page to be redirected. Any Help is appreciated.

    Read the article

  • Pre-Populated Date in Text Field

    - by user2537332
    I am trying to pre-populate a text box with today's date, but for some reason, it keeps showing today's date as 5/30/13, which is a month behind. This code should just be pulling the local time so why is it a month behind? Here is my code, can someone please tell me why the current date is off...Please help, :) var dateToday=new Date(); function loadDate(){ var today=dateToday.getMonth() + "/" +dateToday.getDate()+"/"+dateToday.getFullYear(); document.forms[0].curDate.value=today; } function orderReady(orderTime){ dateToday.setDate(dateToday.getDate()+orderTime); var ready=dateToday.getMonth()+"/" +dateToday.getDate()+"/"+dateToday.getFullYear(); document.forms[0].puDate.value=ready; } <body onload="loadDate();"> <p>Today's Date<br /> <input type="text" name="curDate" size="50" /><br />

    Read the article

  • Updating GUI Component from a different class C# WPF

    - by Boardy
    Hi all, I am trying to update a GUI component (DataGrid) in one class from a different class. I am using C# and WPF Forms. When I used the standard WF forms I could pass a reference to the GUI component as a parameter to the function that needed to do the work with the DataGrid. However, I do not know how I can do this in WPF. I have Class1 which has the GUI component and I need Class3 to run the function inside Class2 which will automatically update the GUI display of the Datagrid found in Class1. Any help with this would be much appreciated.

    Read the article

  • C# background worker and timer loop

    - by Mike
    This is my first attempt of a Timer, if someone could help me out where I am going wrong it would be awesome. I'm trying to use a while loop where if the timer hits 30 seconds try to loop it again. private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { System.Windows.Forms.Timer my_timer = new System.Windows.Forms.Timer(); my_timer = null; //int restartticker = 30000; while (true) { my_timer.Start(); if (my_timer.Equals(30000)) { watcherprocess1(); } my_timer = null; } } Object reference not set to an instance of an object. my_timer.Start();

    Read the article

  • How do I identify where the POST data sent to a PHP script came from?

    - by Mike Turley
    I have a ton of data collection forms on my website, and I wrote a PHP script to handle all the data. All the forms have that one script as their action, and POST as the method. The handler emails a copy of the data to me, and I'd like for the emails I get to contain the URL of the form where they originated. Is there any way in PHP to get the url of the form which was submitted to the script? Or do I have to add an extra hidden field in every form with its URL?

    Read the article

  • Should I share UI for objects that use common fields?

    - by wb
    I have a parent class that holds all of the fields that are common between all device types. From that, I have a few derived classes that each hold their unique fields. Say I have device type "Switch" and "Transformer". Both derived classes only have 2-3 of their own unique fields. When doing the UI design (windows forms) in this case. Should I create two separate forms for each device type or create a user control with all fields that are shared among all devices? Thank you.

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >