|
Hello every 1
I am trying to make certain row of a datagridview invisible through my program but i am receiving following
InvalidOperatoinException:
"Row associated with the currency manager's position cannot be made invisible."
I have noticed that this problem occurs only if a row is selected in the datagridview
(My Solution: I have set the row selection property to single row and i deselect the row before making it invisible) even then the error is still coming
<code> private void button1_Click(object sender, EventArgs e)
{
this.dgvActiveHorse.SelectedRows[0].Selected = false;
foreach (DataGridViewRow dRow in this.dgvActiveHorse.Rows)
{
if (isClear(1, dRow.Index))
{
dRow.Visible = false;
Application.DoEvents();
}
}</code>
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
try
dgvActiveHorse.CurrentCell = null;
|
|
|
|
|
Hi,
I am trying to write text data to an xml file via an
XMLTextWriter object. When I try to initialize the
XmlTextReader object, I get an IOException: The process
cannot access the file "path/filename here" because it is
being used by another process. Any idea what could be
causing this?
with regards
prasad
|
|
|
|
|
71 wrote: IOException: The process
cannot access the file "path/filename here" because it is
being used by another process.
71 wrote: Any idea what could be
causing this?
It would seem that another process (or even the current process) is already accessing the file. Although the error message told you that... right?
|
|
|
|
|
hi,
how can i release the process
|
|
|
|
|
71 wrote: how can i release the process
I presume you mean the file.
You release the file by closing any file handles open to it. Ensure that no other applications are using the file. Ensure that when you open the file yourself you close it properly.
|
|
|
|
|
Maybe permissions of the file!
Gautham
|
|
|
|
|
gauthee wrote: Maybe permissions of the file!
Then why didn't the error message say that? The error message did mention that another process was using the file already.
|
|
|
|
|
Asalam o Alaikum:
I have made a desktop applicatioon in c# which captures all running instances of VB6 forms and retrive the data of their control.
when i deployed this project,on some machines it is working very fine but on some machines it is error when application calls the funcltion SendMessage()
can anybody help me
thanx
|
|
|
|
|
When you post a problem like this, you need to be a little bit more specific. What error message/code are you getting? Without this vital piece of information, you're on your own.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
i have one number and i want to transform in one string but with one fixed format:
EX:
if i have
int x=10;
int y=999;
my string must be
string sForX="0010";
string sForY="0999";
(i want to do that without to format the string manual (with for, while or.....) )
|
|
|
|
|
You can use String.Format:
int x=10;
int y=999;
string sForX=String.Format("{0:0000}", x);
string sForY=String.Format("{0:0000}", y);
|
|
|
|
|
This is what i want!!!!
Tks
|
|
|
|
|
Hi all, just want to find out what the best method would be.
I have a dataset with a datatable and values, now I want to write that to a xml file. Is it better to use xmlDocument for that or xmlwriter?
Thanks in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
DataSet dset = new DataSet();
dset.WriteXml(path,null);
//this is the better idea
|
|
|
|
|
I knew there had to be an easy way
He who laughs last is a bit on the slow side
|
|
|
|
|
|
What I have done is to set up constraints on the dataset, but how do I catch any exception that are thrown? Which event do I need to check?
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi,
I have two classes A and B, A will have subclasses A1 and A2, B will also have subclasses B1 and B2.
A1 and B1 will reference each other, as will A2 and B2. Think Controller and Window, where we have some commonality in the base classes but the subclasses will almost certainly have distinct behavior.
I wanted to design my classes so that the associations where declared in A and B (and inherited by the subclasses), putting the common properties (accessors etc) in the base classes, and initialising my derived classes with the necessary references. So A would contain a data member of type B with Property accessors, B would contain a data member of type A with Property accessors. When I created an instance of A1 I would supply it with an instance of B1, and supply B1 with a reference to A1.
As I now know/remembered this will not work seamlessly because I will only see the base class's members (not the derived class's). Virtual/Override kind of help but only to see methods that are defined on the base AND derived. My derived classes will have methods that should not have to appear on the base class in order to be seen.
So I am looking for the accepted C# best practice approach to implementing the above scenario.
Regards
|
|
|
|
|
Hello,
An interface will help you.
Search here on CP for Articles about the usage of interfaces!
All the best,
Martin
|
|
|
|
|
first - what is your problem , be more Specific.
if you don't know how to connect to a data base
then bye a book or use google
second - delete the previous posts before they kick your a**
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Butt kicking mode activated.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
jus i want code for accessing MS- Access tables from windows forms in c#. dont excite ok?
|
|
|
|
|
mind ur language. ok?
|
|
|
|
|
easy easy.......
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|