|
Hi friends.
I have one datagridview which has one column contain combobox's (dropdown)
this code gets executed at form load
-----------------
ComboBoxCol = new DataGridViewComboBoxColumn();
ComboBoxCol.HeaderText = "SortOrder";
ViewInformationDvg.Columns.Add(ComboBoxCol);
-----------------
there are other column also.
My requirement is that i want to insert some integer number in combobox that is number of row in datagridview.
For example if first row inserted then value in comboboxx is 1
when second row inserted then value of combobox is 1,2
when third row inserted then value of combobox is 1,2,3
and so on ( rows are inserted at run time by clicking on some button)
and i want updated value of combobox to be reflected in all rows..
Hope you got my problem.
Thanks lot
Avtar.
|
|
|
|
|
As ComboBox is a control, you shoudl have Attributes property there. Add row number as an attribute.
Sincerely,
Elina
Life is great!!!
Enjoy every moment of it!
|
|
|
|
|
Hello friends,
I am developing a windows application in C#.NET in my application there is a panel control that contains some labels i want to print that panel control along with other controls in a image format..
How can i do that????
Thanks
Dikshant
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Depending on what your "other" controls are, I would say that the easiest way would be to reference the control's properties: .BackColor, .ForeColor, .Text, etc. You will need to create a Bitmap to draw to and a Graphics object to do the drawing.
Creating a short scenario is very helpful in getting your questions answered. If what I've described above sounds good, give me a scenario and I might can post some code for you.
Cheers!
Richard
If you could rent a programmer a hour and a half for a dollar and a half, how much would he charge for 10 hours?
|
|
|
|
|
|
Hi,
Kindly help me that, How may I retrieve Hard Disk Serial number?
Thank you in advance
(Riaz)
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Thank you Mr. Ravi
------------------
You have provided me good help. where I can find more hardware informations. but there is still missing my Hard Disk serial number information.
(Riaz)
|
|
|
|
|
Hi,
I am working with a VS2005 windows application. There are some text boxes that are used for entering decimal numbers.
If user enter -1234567.8, I want to reformat it as -1,234,567.80
How can I do it, I tried to use MaskText box but could
Thanks you!
Harsh
jayasshc
|
|
|
|
|
You can use string.Format to format a number, or you can overload the textbox itself to give you the format you want, by handling events when the text changes, and reformating it. You're better off formating it when the focus leaves the textbox tho
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Could you please give me an example?
Thanks!
jayasshc
|
|
|
|
|
Hi,
I got it, could find a good example.
Thank you very much!
Harsh
jayasshc
|
|
|
|
|
I have wizard kind of windows application with many forms. I have set the form Location
this.Location = new Point(100, 100);
This works fine with single monitor. If the user connects to 2 monitors i want the form to be displayed in both the monitors. How can set the form Location? Also also if the user switches back to single monitor the Form should display in one monitor?
|
|
|
|
|
Screens.PrimaryScreen will give you the main monitor. All the screens in the collection will have locations relative, so you can position your window anywhere you like. Getting the same form to display on both monitors, is actually a setting in windows, which would make the full screen be cloned. Otherwise, you'd need to create two windows and have them mirror each other.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply.
As you mentioned "Getting the same form to display on both monitors, is actually a setting in windows, which would make the full screen be cloned."
I dint understand it clearly. Do you mean to say i cannot programmatically make the same form to display on both monitors? Or i need to change same settings in the Windows. How to do this?
|
|
|
|
|
Who have source C# for click'n'see or the program similar click'n'see?
Thanks
|
|
|
|
|
See'n'say? That's a hardware solution.
|
|
|
|
|
Well, I don't know, I've not heard of it. But, I recommend www.rentacoder.com if you're looking for full source code. Here, we help programmers who are stuck with their own code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
QTrung123 wrote: Who have source C# for click'n'see
The manufacturers of the C# version of Click'n'see?
|
|
|
|
|
click'n'see is a program which can retrieve text under mouse!!!!
|
|
|
|
|
I am using third party control (Infragistics UltraComboEditor). Unfortunately, this control is not raising MouseWheel event with Mouse wheel is moved (may its a bug in control). How to handle global mouse wheel event?
Somehow i want to handle the mouse wheel moved event in my application, and will check whether currently the focus is in UltraComboEditor and act accordingly, is this possible?
Thanks
|
|
|
|
|
|
I have an interface library to a device and one function is defined as
unsigned short init(HANDLE handle, unsigned char* cFlag);
The cFlag is just a byte ([in] parameter), and not an [out] parameter and should not be a pointer. Expected values are 1, 2, 4.
If I create the following p/invoke...
[DllImportAttribute("if.dll", EntryPoint = "init")]
public static extern ushort init(IntPtr handle, IntPtr cFlag);
Now, how do I use it...
Case 1:
IntPtr handle = ...
IntPtr cFlag = new IntPtr(2);
int result = init(handle, cFlag);
Case 2:
IntPtr handle = ...
IntPtr cFlag = Marshal.AllocHGlobal(1);
Marshal.WriteByte(cFlg, 2);
int result = init(handle, cFlag);
Marshal.FreeHGlobal(cFlag);
Which is correct and recommended?
Best regards,
Paul.
Jesus Christ is LOVE! Please tell somebody.
|
|
|
|
|
I want two merge two tables A & B. Table-A contains column A, B, C and Table-B contains column D, E, F. I want the result table to contain columns from both tables i.e., A,B,C,D,E,F. Is there a way to accomplish this in C#? I'll greatly appreciate any response.
|
|
|
|