.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Reconhecer checkBox dentro de DataGridView em Windows Form com um evento checkedChange...

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :WPF
Então ... eu to com um grid e dentro tenho o checkBox... quando a pessoa selecionar ele vai deixar a linha amarela... quando tirar a seleção ele muda a linha... e caso fique selecionado ao apertar um botao de insert... o sistema vai cadastrar o que esta selecionado... mas nao consigo pegar os valores dentro do grid...

View Complete Post

More Related Resource Links

Refresh datagridview in windows form application


I am having a main which will have 2 controls namely treeview and datagridview . I will have a form to be opened when user selects an option from treeview. My treeview will be as follows





If i click on the text file that was child to the root i will show the content of that file. But what i need is if right click on child i will have an option as NEW and i will get a new form. If i enter some values and click on save i will save them to the text file which was provided in the treeview at the same time i would like to show the user in the datagridview when the second form gets hide. Like that i can have multiple child forms what ever data i give there in the forms that should be shown to datagridview when the child form gets closed or hide

Datagridview control vb.net Windows Form

I want to detect the keystroke or keycode for the "Arrow Up" Or "Arrow Down" in the Datagridview "Selection Changed" event on a vb.net Windows form. Just to want to put a "If" statement to do some stuff if it is true that the keypressargs is either "Arrow Up" or "Arrow Down". Thanks

Windows authentication login form issue


Hi guys,

I have an application that requires windows authentication to login, the problem is that every time an user logs in under IE and win XP, the username is pre filled with the IP address of the server as instance and the username. I need to replace the server ip with  XXXX instance name instead of doing this manually.

Could anyone pleas help me out with this one?

Thanks in advance,


Open a windows application form names in another

Hi, Now i am in a horrible situation. I want to create an application for open another application(exe) and display all the form names in newly opened application in a compobox.If we selected a compobox item,ie;a form name in new application opened,i want to display all the control names in that form... is it possible? we can do it in same application.but how can i do it in another application? thanks in advance   Anoop

Possible to truly "scale" a Windows Form?

Hi all! I'm trying to think of a way to truly "scale" a Windows Form. I don't just mean resize the form and rearrange the controls accordingly; I mean really "Honey I shrunk the form!" type of shrink, including all text and graphics, as if they had been drawn on a Graphics object with a scale transform less than 1. Aero does this when it shows a shrunken window preview icon... that's exactly what I want, except I want it to happen to the window itself as the user resizes it. I know WPF can do this, but I need a way that'll work on a standard Windows Form without rewriting or massively re-engineering the UI. Any creative ideas? Thanks in advance! :-D

wpf datagridview checkbox column selection not working fine.

Hi Experts,in my c#.net windows based wpf application i added  a datagridview.dynamically i added checkboxcolumn to that datagridview DataGridViewCheckBoxColumn cbCol = new DataGridViewCheckBoxColumn(); GridSource.Columns.Add(cbCol); and another column is string. to this column am hardcoding the values DataTable _datatable = new DataTable(); _datatable.Columns.Add("Name", typeof(string)); _datatable.Rows.Add("CSRs"); _datatable.Rows.Add("Customers"); GridSource.DataSource = _datatable; till here fine am getting two columns (checkbox and Name)when i am trying to check those checkboxes problem comming.am trying to get the count of the checked rows for that i used below code int cbcount = 0; foreach (DataGridViewRow _dgRow in GridSource.Rows) { if ((bool)_dgRow.Cells[0].Value) cbcount++; } cbcount will give the checked count.but the problem raising here if i check 2 rows it giving 1if i check 5 rows it giving 4if i check 1 row it giving me 0means am getting n-1 resultwhere i did wrong??

Transfering Data from Windows form application to a website

Hello Friends I have a windows form application and i have to transfer the data from my forms that have been retrieved from SQL server database to a website. So that i can automate the data entry on the website. Can anybody please tell how should i go about doing this. Thanks & Regards, Syed

Unexplained Crash on .NET Windows Form, Potentially a Common Crash?

Hi, I have a continuous problem with a .NET Framework 3.5 Windows Form application crashing with the "...this application has performed an illegal error..." error message.  No errors are being caught through a Try-Catch (using a generic Exception, so to my knowledge it should catch any exception?) block throughout the application, so it appears to be something external.  At first we thought it may have been the users computer, but even after a replacement computer the same error continues.   I was just wondering if there are any common crashes which have any hotfixes etc. for .NET Framework 3.5? Or if anyone else has experienced anything similar?   Thanks

how do i create a windows form application login for to validate username and password from sql serv

 I would like to know how I can create a login form for my windows form application. The login form must be linked to a SQL server 2005 express edition database (in which the username and passwords are stored). The login form must validate the user using the database and allow them to access the program. 

Windows form.Handle

I need to know the equivalent code for ASP.Net as like:In my windows application I write :Form frm = new Form();IntPtr hwndp = frm.Handle;Now my question is how can I achieve this value through ASP.Net code?

OK button click on Windows dialogue form not triggering click event

I have created an Add-In for Outlook 2003 in Visual Studio 2005. When a new message is sent and a toggle button is selected, a form that I have created will be displayed as a dialogue box, where further information can be entered. Once this information has been entered you can click the OK button and the message is sent. If you were to click the OK button with invalid data in the form, there would be a message box with an error message. This all works perfectly on my development machine but when I have packaged the Add-In and installed it on other machines it does not work. Clicking on the OK button does nothing, there is not even an error message. All the prerequsits are successfully installed and this is the only part of the Add-In that does not work. All help greatly appreciated. Thanks Nick

Windows Form Resolution Setting

HI I created one application in my laptop its working correctly but when i m trying to use that one in Desktop some part of application got hide in right side of screen. I faced this problem today when i was giving the Demo on my application in college. I dont know how to make the application which will run in any system without any resolution problem.       Please help me. My project is windows based. please help me............ Thanku......... 

time out stored procedure windows form

I have a form that runs kicks bulk copies data to a data base and then runs a stored procedure.  the problem I have is the stored procedure takes a long time and users have no way to know what is going on.  the app window freezes says not responding and then after a while it completes and moves on. is there a way to prevent the application from freezing and being marked as not responding?

Windows Keyup event is routed to next form even if the current form is closed

In a form (say FormA) i have 2 events "Keyup" for the form and button_click event for the button. I call FormA from the main form with a showDialog, after this i call another form (say FormB), it also has the 2 events. In both the form the button_click event has the logic to close the form (this.close()). Now when the FormA is opened the focus is on button, if the user presses "enter" button the button_click event is called which closes the form, the logic returns to the main form and the next line i.e. to open the FormB is executed. Now here is the wierd part, in FormB because there is a KeyUp event handler; just after instantiation of the form directly this event handler is called. I guess this is being routed from FormA. Shouldnt the FormA's keyup event be closed as soon as the form is closed?

Integrate SSIS project in Windows Form

I have a windows form project in which I would like call a SSIS project passing 2 variables simlutaneously...How do I accomplish this?

Delphi Win32 MDI Parent with C# Windows Forms child form

I have created an assembly containing a form that i want created as a MDI child form in a Delphi Win32 application's MDI parent control. I can create the .NET form fine from my Delphi code. I can even use the Delphi window handle to let my .NET form be a child in the Win32 application by using the SetParent API. However minimizing the child form makes it disappear (instead of the regular minimize action for MDI children), and it also doesn't cause the MDI container to get scroll bars when you drag the child form under the edge of the MDI container. I have the feeling that the child form is not yet correctly aware that it is a MDI child. For instance, its MdiParent property is null. And i read somewhere that i might need to call some more Win32 API"s to hook everything up correctly. I can't, however, for the life of me not find which ones to call, and where to do it. Is there anyone here that is well versed in hooking up managed Windows Forms with native Win32 applications that can lend a helping hand?

windows form is not visible in windows service????

i am trying to open an windows form in my windows service OnStart() method but it is not opened can anybody help me my code is: protected override void OnStart(string[] args)         {             // TODO: Add code here to start your service.                         Thread t = new Thread(new ThreadStart(delegate             {                 Form1 f = new Form1();                 Application.Run(f);             }));             t.SetApartmentState(ApartmentState.STA);             t.Start();         }
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend