|
Hi,
I have a DataGridView control with one column as ComboBox control.
I want to raise the event "SelectedValueChanged" of combo box.
How to do this. Please help.
Thanks & Regards,
nas
|
|
|
|
|
read an article on deploying events in C# applications over MSDN or search google.
write this line in your constructor.
dataGridView1.SelectedValueChanged+=<then press="" the="" tab="" key="" twice="" you'll="" get="" right="" thing="" in="" here="">then you start coding in the function made for the event handler
Rocky
|
|
|
|
|
Hi Rocky,
Thanks for reply.
Actually in DataGridView we can make any Column-Type as controls (Button,ComboBox, CheckBox...).
So i have selected one column of DGV as ComboBox. But this ComboBox differs from the normal ComboBox control.
By coding i want to access the ComboBox control of the DGV. 
|
|
|
|
|
OK
I know ur talking abt the datagridviewcombobox control right? try using the event 'CellValueChanged' on the dGV and in that you can get the column as
if(e.columnIndex == yourdgvcomboboxname.ColumnIndex)
{
//perform you task
}
and c if this things works for u or not incaseif it does give this msg and full rating
|
|
|
|
|
hello,
i am doing a project by C# language and using visual studio2005.Net.
Now i need a C# code which reads excel file and save all datas to corresponding SQL Server data base.
plz help me i will be grateful to u.
Shafik
|
|
|
|
|
You can read data from excel file by OLE DB provider and then save the data to database using ADO.NET
|
|
|
|
|
Dear sir,
would u tell me details...
|
|
|
|
|
This question has been asked and answered numerous times on this forum already.
Please check existing posts before submitting a question...
Paul
|
|
|
|
|
Here you go: excel using ole db[^]
If you need more information search for the keywords. You can find examples both on codeproject and google
|
|
|
|
|
I need some code or direction to write code the code to add my application at startup.
There are some software to add the application at startup by i need my own codding.
|
|
|
|
|
Have a look at Managing start-up section at http://www.codeproject.com/csharp/Trayminimizer.asp
|
|
|
|
|
You can add path of your app to these registry keys, and those will be executed at computer startup...
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
Cheers,
h.
|
|
|
|
|
hi all,
i have to insert sentences and images in word document in such a way that first page will contain only an image after that every page contains some sentences and one relevant image.That problem is that after inserting the sentence and image in the page i have to skip the rest of the space in that page and move to next page to insert other pair of sentence and image.
please help..
thanks
|
|
|
|
|
I want to make an application to make call via modem and receive them. I also want to implement to caller identification facility.
I need your's link's or hints to create such type of application.
which libraries i have to use and what is the technique to handle them.
|
|
|
|
|
In .Net 2.0 MS added the SerialPort class. That is one thing you will need to review before getting into the problem. You can use the serial port class to open a stream and send commands to the modem.
Phil
|
|
|
|
|
hi what just i want to know :
a connection string is already in the connection class and tested.
i am adding a combo box in a new form .....
how i can call or create a new instance to call the connection string before i write myConn.open
regards
|
|
|
|
|
What do you want to do exactly ? What connection class ? What does the combo box do ?
You can't call a string.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
the idaea is i want to fill the combo box data from the database( sql 2000)
i am working in c#
the connection string exist in a class
how i can open the connection from the form?
|
|
|
|
|
OK, now it's starting to make sense. The reason to have the conection string in a class, is for that class to be part of the data layer. It should therefore expose methods to get the data you need, which can then be called to set the datasource of the combo box.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello
In my C# program I got a class which has more than 200 Public methods and 50 private methods. Will the object created for this class utilize all these methods size ? How can I find out how much space is utilized by my object.
Is it a good practice like having more number of methods in single class ? Will this make any performance issues ?
|
|
|
|
|
I really doesn't know where to start to explain because obviously your knowledge of how compilers/programs work lacks a lot of stuff
But anyhow: the size of an object has nearly nothing to do with the number of methods (methods reside in the compiled code only once). Only fields (i.e. private int i) add to the size of an object.
And that number of methods is seldom advisable. A class should exist for one single purpose and 200 methods for a single purpose? Maybe you should split the class up into several classes, but that depends 100% on what it's for.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Urs Enzler wrote: the size of an object has nearly nothing to do with the number of methods (methods reside in the compiled code only once).
Thanks, So a class which contain few number of methods and large number of methods will be having same space ?
Urs Enzler wrote: A class should exist for one single purpose and 200 methods for a single purpose?
Yes it's a database access class. All the forms are referring this class. Do you know any applications that can count object utilized memory space ?
|
|
|
|
|
N a v a n e e t h wrote: Thanks, So a class which contain few number of methods and large number of methods will be having same space ?
Yes - if you neclect the size the larger code uses in the dll. 20 instances of a class with 100 methods and no fields use exactly the some amount of memory as 20 instances of a class with no method and no fields.
N a v a n e e t h wrote: Yes it's a database access class. All the forms are referring this class. Do you know any applications that can count object utilized memory space ?
I can't give you a link but I'd look for a Memory Profiling Tool.
-^-^-^-^-^-
no risk no funk ................... please vote ------>
|
|
|
|
|
Hi,
how to develop addins to MS Outlook thru C# windows applications?
Thanks,
Priya.
|
|
|
|
|
this is a very very abstract question Priya. No buddy's gonna tell u how to make the whole thing. try to be a bit more specific
|
|
|
|