|
int index = 0;
string[] pages = .....;
void NextView() {
if (index < pages.Count-1) {
index++;
View.CurrentPage = pages[index];
}
}
void PreviousView() {
if (index > 0) {
index--;
View.CurrentPage = pages[index];
}
}
|
|
|
|
|
Hi
I am trying to insert a DataGridViewComboBoxColumn, the column is getting inserted but without values (options) in the combobox.
The Code is as under
<br />
DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn();<br />
column.HeaderText = "SELECT";<br />
column.Name = "ItemSelect";<br />
column.CellTemplate = new DataGridViewComboBoxCell();<br />
column.Items.AddRange("One", "Two", "Three");<br />
column.DropDownWidth = 160;<br />
column.Width = 90;<br />
column.MaxDropDownItems = 3;<br />
column.FlatStyle = FlatStyle.Flat;<br />
myDataViewGrid.Columns.Insert(0, column);<br />
When I run the code, in datagridview all cells except 1st are populated properly, in first cell I see only empty combobox.
Also, after showing the value, which event should I use to get the selected value of combobox?
Please guide
Thanks in advance
|
|
|
|
|
Hi
I got the Ping Monitor
Alberto Venditti -
given sample code but when I am running the program ,the Host name and ,OFF,ON are not displaying on the Grid Control.
I created the PingLog and ,HostList Tables in the SQL server 2005.Whatever I addded in the Hostlist through the GUI it is updating in the database.but,The ON and Off status are unable to view on the Grid control.
I just coped whole code and created the Database,And my running host name I added in the List of GUI.
Can u pls. tell me what I have to do to see the List of ON and OFF host details.If I missed ...something.
Advance Thanks.
Pandu
|
|
|
|
|
medara wrote: If I missed ...something
Yes you are missing something. You would be way better off posting your question here[^] since he more likely to see it there than here. And posting a question about a VB article in the C# forum is almost certainly not going to get you an answer.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
My C# program is set to target the 2.0 version of the .NET Framework.
I used one of the overloads of WaitHandle.WaitAny that's only available in the 3.0 version of the framework, and it let me build the program and run it!
Is this supposed to occur?
The problem is that when I run the program on a machine that only has version 2.0 of the framework, the program crashes, of course.
But why did Visual Studio allow me to use an overload from the 3.0 version when it shouldn't have?
|
|
|
|
|
Actually 3.0 is a update to 2.0. It runs over 2.0. Thus if you build your project with a machine which have 3.0 installed, it will automatically take it as 3.0 (if not specified explicitly while creating project in VS 2008 IDE).
The project you built has taken 3.0 framework.Thus it requires it when running to a machine having 2.0 and crashes.
3.0 is not a new framework, but just an enhancement to 2.0.
|
|
|
|
|
Thank you for the information!
|
|
|
|
|
Is there an API for the Win32 CreateProcess interface with all functionality available in C#/.NET?
I'm seeking for an example and would be very grateful for one.
|
|
|
|
|
You're either going to use the Process class in the System.Diagnostics namespace or you can P/Invoke the CreateProcess function yourself. Go to http://www.pinvoke.net[^] for details.
|
|
|
|
|
Have a try:
using system.diagnostics;
process.start("excel.exe");
April
Comm100 - Leading Live Chat Software Provider
modified 27-May-14 21:55pm.
|
|
|
|
|
...and you're telling me the blatenly obvious, why....??
You might want to reply to the original poster and not me. That way, HE gets the email notification that you replied.
|
|
|
|
|
Hi
i have treeview and it has some parantnode and chilenode;
i want when user checked(select) parantnode all of that chilnode's checked automatically;
what should i do?
|
|
|
|
|
If a parent node is clicked, you'll have to write code to enumerate all of its child nodes and check them.
|
|
|
|
|
I would implement an event handler for the AfterCheck event of the TreeView : in that event handler : if the checked Node has child Nodes : call a recursive function passing the TreeNodeCollection of the Node to the recursive function which will check all the child nodes, or do whatever else you want to do.
best, Bill
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
can anyone help me to get a source code for file sharing, power point presentation, whiteboard, for video conference....
|
|
|
|
|
You need everything from us. Why dont you post this in Job section to get someone do this for you.
Pay people, they will work for you. This forum is to help people. If you have specific help(at least after trying) there are lots of experts who are willing to help.
This way, no one going to help you.
|
|
|
|
|
What are you trying to achieve here ? If you need these things, then you should just buy them. If you've accepted a project to write this stuff, then you deserve what you get, if you have no idea how to do them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi.
By drag-and-dropping a file or folder to my application icon I start the application with respect to the dropped file/folder passed in as argument. Dropping on a shortcut to my application (created using right-click) works fine as well, but when I create a icon in the VS Setup Project it no longer features drop.
Do you have any idea as to why icons created by a VS Setup Project (MSI) behaves differentially from icons created by me using right-click?
Best regards,
Disore
Why is it drug addicts and computer afficionados are both called users?
--Clifford Stoll
|
|
|
|
|
I do not know if this is a correct forum, but here goes. I am using XML as a config file. The app will be Opensource. I am currently using XML to store a password in PLAIN text. Is there a whay to Encrypt a password in a whay that it is hard to get actual password. Or shoud i leave it in Plain Text?
|
|
|
|
|
It is never a good idea to store a password in plain text. Best is to Encrypt the password and store the encrypted value.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Even if it is Open Source?
What kind of key shoud Should i use? Use Profile ID or PC Fingerprint?
Witch encryption method do you sugest?
|
|
|
|
|
You can prompt the user for a "master" password that you use to encrypt/decrypt the stored passwords.
|
|
|
|
|
Whell it seems i woud have to do with a user typed password. I will add for a user to chose how to store a password.
|
|
|
|
|
Use the RsaProtectedConfigurationProvider Class in the System.Configuration namespace to encrypt / decrypt configuration data.
|
|
|
|
|
For password, what I generally do.. Is we encrypt the password using MD5 hash. This is one way encryption algorithm, so it cannot be decrypted. Now when you want to check, First encrypt the user input and then check with the existing.
Say for instance:
your password is "hello", we encrypt it and store say its "#548sfj"
now if the user inputs "hello" again from UI, you are going to encrypt it to get "#548sfj" and then compare them. This way you can remove the risk of stealing your password(as most of the people uses same password for many logins).
To use MD5 Hash use this Function :
public static string EncryptPassword(string Password)
{
byte[] data = new byte[15];
MD5 md5 = new MD5CryptoServiceProvider();
data = Encoding.ASCII.GetBytes(Password);
byte[] result = md5.ComputeHash(data);
return Encoding.ASCII.GetString(result);
}
Now after you encrypt store the password anywhere... such as XML file, config files, Database etc.
Hope you like my solution.
|
|
|
|