|
Thats the exactly wht I wanted to know.
so any solutions for me ... ???
"Mess with the Best, Die like the rest"
|
|
|
|
|
Read the article source and see how it's done?
I would suggest reading up on SHAppBarMessage as that is what docks the app window like the taskbar.
|
|
|
|
|
Hello every body
I am developing an application where i am using DataGridview it has following data
Table : Roles
--_---------------------------
| Role | Primary | Secondary |
------------------------------
Role is string type column
Primary and Secondary are Boolean type columns (So they appear with a check box)
<big>
i want to record the change of value of "Primary" and "Secondary" columns.</big>
That is I want to know if user checked or unchecked the value in any row in the last two columns
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
hi,
Don't think datagrid, think datasource.
So ure solution is in the the datatable.
use the ColumnChanged or ColumnChanging event of ure datatabl. Here an example :
mydataTable.ColumnChanged += new DataColumnChangeEventHandler(mydataTable_ColumnChanged);
void mydataTable_ColumnChanged(object sender, DataColumnChangeEventArgs e)
{
if (e.Column.ColumnName == "Primary" ||e.Column.ColumnName == "Secondary")
{
if (e.PropsedValue == true )
{
//............. do something
}
}
}
HTH.
Hayder Marzouk
|
|
|
|
|
That would only work if the datagridview was databound I think. If there is no underlying datasource/table you have to access the DGV directly.
You can also use the datagridview.Click event to capture whether a checkbox was clicked, and get it's new value in the way I described below.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Are you just trying to retrieve the data from the datagridview columns? or are you trying to capture them into events.
if it's the former, then you can simply do this:
dataGridView1.Columns.Add("foo", "foo");
DataGridViewCheckBoxColumn cbc = new DataGridViewCheckBoxColumn();
cbc.Name = "bar";
dataGridView1.Columns.Add(cbc);
dataGridView1.Rows.Add("xyzzy", true);
dataGridView1.Rows.Add("yzzyx", false);
Console.WriteLine((bool)((dataGridView1.Rows[0].Cells[1]).Value));
Console.WriteLine((bool)((dataGridView1.Rows[1].Cells[1]).Value));
Cast the value of the cell you need into a bool, and you have the Checked value.
ps: please don't randomly place layout tags over text in your post, makes it hard to read.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Hi,
I want to use a flow layout panel to establish the order of several times in a graphic way.
Is it possible?
Its just drag and drop manipulation, right?
Thx,
Nuno
|
|
|
|
|
Hi,
We have a program, made with C#: that's why I am here .
In order to check for a drive existence, we use System.IO.Directory.Exists, giving the drive letter and root folder as parameters (i. e., "C:\\").
Under Windows XP it runs just fine, but under Windows Vista, the call always return false, even against C:\.
Could anybody give us any advice about it...? It's driving us nuts!!
Fidel Leon - EA3LF
|
|
|
|
|
Im sorry, I downgraded back to Vista (because it wasn't worth it imo on a <3000$ laptop) but I can confirm that it works on XP.
Visual Studio can't evaluate this, can you?
public object moo<br />
{<br />
__get { return moo; }<br />
__set { moo = value; }<br />
}
|
|
|
|
|
Well, being Windows Vista, you probably need to set the IO security rights before it will let you read/check/validate or anything else ...
Have a look-see at this topic: FileIOPermission[^]
|
|
|
|
|
Can anybody give me the code of c#.net in which i can send the different icons (i.e. smiley,cry,etc..)
Thanks in Advance.
Dipan Patel
Dipan Patel.
|
|
|
|
|
C# has nothing to do with it. The program on the other end needs to read HTML mail, and then the images need to be linked to in the email.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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!
I have a ArrayList, that contains class (for example):
<br />
class A<br />
{<br />
int a<br />
int b<br />
public A() <br />
{<br />
a=0;<br />
b=0;<br />
}<br />
public A(int Na, int Nb)<br />
{<br />
a=Na;<br />
b=Nb;<br />
}<br />
}
How to sort this elements in the arraylist ? The sorting field is A.
One nation - underground
|
|
|
|
|
u can try arraylist's Sort method
rahul
|
|
|
|
|
If you're using .NET 2.0, use a List instead and provide a sorting function. I can't recall, but I thought you can do this in 1.1 and 1.0 as well, probably just with lots of casting of objects.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Christian Graus wrote: I thought you can do this in 1.1 and 1.0 as well, probably just with lots of casting of objects.
Yup, for sorting operation there must be operators <, >,= defined (or some of them at least), which System.object does not have.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hello,
Saikek wrote: The sorting field is A.
I don't understand this!
Don't you mean you whant to sort your Collection of "A"-class instances, with the value of the "A"-class member "a" (which is an int)?
Martin
|
|
|
|
|
As others said, if you are using .NET 2.0 use generic collection (List<A> ). As for sorting, you probably mean sorting by field int 'a'? As you dont expose anything (a,b is private) you could implement IComparable . Or if you can expose sorting field, custom implementation of IComparer that knows how to sort class A (e.g. A.SortByFieldAComparer). Look up appropriate interfaces in MSDN or google.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hello,
Just because I'm curious:
Do you know of a equivalent Comparer class to System.Collection.CaseInsensitiveComparer, which comparse int values?
Or is the solution to use "ToString" for comparison.
dnh wrote: As for sorting, you probably mean sorting by field int 'a'?
I'm happy that it's not only me, who thinks that the question is not valid.
All the best,
Martin
|
|
|
|
|
Hmm, there is only one way how to compare integers (that makes sense) as far as I know. System.Int32 implements IComparable , so no need for comparer.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hello dnh,
2 minutes after I posted this yesterday, I hoped you would ignore it.
So the .Net 1.1 solution for me would be, use the Sort method of the ArrayList class and give a user specific IComparer instance as parameter.
Userspecific IComparer instance would be something like this:
public class ComparerForIntMemberaInClassA : IComparer
{
int System.Collections.IComparer.Compare( object x, object y )
{
A firstA = x as A;
A secondA = y as A;
return firstA.a.CompareTo(secondA.a);
}
}
What's your feeling about it?
Thank you for you interest!
All the best,
Martin
|
|
|
|
|
yes, that looks fine. Other solution would be implement IComparable in class A; I don't know the guidelines but to me it feels like for "default" sorting I would implement IComparable in class I want to sort (if it is class I own - if it is e.g .NET framework class then I can't do that) and non standard comparations (e.g case insensitive) would go into custom comparers. If you are sorting by private members, nested class should solve access problem.
"Throughout human history, we have been dependent on machines to survive. Fate, it seems, is not without a sense of irony. " - Morpheus
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Thanks for your statement!
Have a nice day!
All the best,
Martin
|
|
|
|
|
hi all,
i've developed a windows application , i wanna add update software feature to it,[i mean my client should be able to update the softawere 1.0.0 to 2.0.0]
can u please tell/suggst me how to/accomplish this
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
ClickOnce is part of VS2005 and does this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|