|
hi ankushmn!
I suggest that you just remove it from the list instead of disabling it.
I also recommend to use a DataView as your DataSource instead of using Items.Add when populating the combobox.
you can use the RowFilter of the combobox to remove the item you want and put this handling on the SelectedIndexChanged event handler of your two comboboxes.
hope that helps!
microsoc
|
|
|
|
|
I found two debugging problems running my program on new operating system. It contains Visual Studio, and I run Debug version. Results of Release versions are the same.
1) Program doesn't report correctly about missing Dll. C# executable depends on C++/CLI Dll, which is linked to unmanaged Dll. Unmanaged Dll is not found, and program reports "Module not found" exception in some completely unrelated code fragment. Message doesn't contain missing Dll name. I fixed the problem, but why error message is not informative?
2) Exception dialog contains two buttons: Debug and Close. I remember that before reinstalling OS this dialog looked different. There was the button "Details" and I could see full exception stack without running debugger. What settings should I change to get such dialog?
Palestine
|
|
|
|
|
We are currently moving from .Net 1.1 to .Net 2.0. We are using an external DLL provided by a hardware supplier. This DLL is written on .Net 1.1. I now want to port it to .Net 2.0 but I don't have source codes so I cannot recompile it (I tried decompiling but the generated code won't compile). Is there a tool or something that can directly port the DLL to 2.0 so that it is all .Net 2.0 based?
Palestine
|
|
|
|
|
You don't need to recompile the DLL to get it to run on .NET 2.0, it should do it without any extra work. Just import and use in your .NET 2.0 application.
WM.
What about weapons of mass-construction?
|
|
|
|
|
i use this code.. but it's not working.
i use visual C# 2005.
in my selection string there are 3 parameters (:PARAM3)
this is just one sampje
the error is :
The best overloaded method match for 'string.this[int]' has some invalid arguments
so i have to put it to string somewhere.. but i don't know how and where
can anyone help me?
if (textBox2.Text == string.Empty)<br />
{<br />
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[":PARAM3"] = "%";<br />
}<br />
else<br />
{<br />
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[":PARAM3"].Value = textBox2.Text;<br />
}
|
|
|
|
|
Int32 x = 10;<br />
String text = x.ToString();
As simple as that
WM.
What about weapons of mass-construction?
|
|
|
|
|
but where should i put this..
my value of my param2 is given while running the application.
this actually i did know.
but how to implent it in my application is the question
|
|
|
|
|
COnnection.ConnectionString returns a string according to the documentation[^]. So trying to use a string-indexer will fail. The error message says:
The best overloaded method match for 'string.this[int]' has some invalid arguments
which is to say you can use a numeric-indexer on a string variable, to retrieve the character at that index.
string myString = "HelloWorld"
char firstChar = myString[0];
firstChar would contain the letter 'H'
You should tell us what you are trying to achieve, rather than how you are trying to achieve it - that way maybe someone can give you more help.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
On what line do you get the error?
You are using the Value property on only one of them. Shouldn't be on both?
---
b { font-weight: normal; }
|
|
|
|
|
both line's give the error
what i'm trying to achieve is the following
i've got one datagrid, 3 textboxes and a button
in the textboxes you can fill in a value wich should be param2, param3, param4.
on this values he will search my database.
select * From Table where (Column like :PARAM2).
if there's no value he fills in a wildcard.
if i don't do that he's got a empty parameter so he won't be able to select something.
the button fill's the database with the parameters.
en show's the data in the datagrid.
that's the idee.
i'de had it working on visual studio 2003.net
also with c# and using a Oracle database
now visual C# 2005 and a acces database.
so once the code did work.
hopefully this make some sense
|
|
|
|
|
The ConnectionString property returns a string. You cannot index into a string with a string value...
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[":PARAM3"] = "%";
As the compiler error told you, you have to index into the string with an integer (a whole number).
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString[4] = '%';
Most likely what you are trying to achieve is something like this:
string val;
if( textBox2.Text != string.Empty )
val = textBox2.Text;
else
val = "%";
dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString = dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString.Replace( ":PARAM3", val );
Josh
|
|
|
|
|
in the last case he doesn't give my param the value of "val"
|
|
|
|
|
|
he is my program
this is the code i use now
<codeval;
if( textbox2.text="" !="string.Empty" )=""
val="textBox2.Text;
else" "%";dbanbm_t075_borgtochttableadapter.connection.connectionstring="dBANBM_T075_BORGTOCHTTableAdapter.Connection.ConnectionString.Replace(" ":param3",="" val="" );<="" code="">
the "val" get's his value form the program. that is the % if the field is empty. or else the value that is typed in the textfield.
but the parameter doesn't get this value
|
|
|
|
|
Hi guys!
need some Help ..
i m trying ti assign values to a resized string array without loosing its old values..
something like this:
string[] myArr=new string[]{"abhinav","gupta"};
Array.Resize(ref myArr, myArr.length+10}
this code increases the length of array
but how to assign the value of the new added Dimensions..without loosing the old values:
i dont want to use :
myArr[3]="some Text";
as the array is dynamic .. and i have to assign more than 50 values in different situations..
is there some other way to asign the values to new increased Dimensions...
abhinav
|
|
|
|
|
Use an ArrayList or if you use 2.0 the equivelant is List<String>
|
|
|
|
|
I am doing a project on binary trees, I need to show very large tree structure graphically on screen, How can make it in c#?
shiva
|
|
|
|
|
Well the easiest way would be with a TreeView control.
You can look at my ThreeTree program to see how you can add nodes to the TreeView control.
Or ware you thinking on drawing the tree yourself?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi, Thanks 4 reply
Yes, I am thinking of drawing tree it self, as it shown in text books.
I hope i can do it with GDI+,..But not sure.
-- modified at 3:23 Tuesday 2nd May, 2006
|
|
|
|
|
You can doo it with GDI+. I was trying to do draw my tree about a week ago, but then I decided to use the TreeView control.
Drawing a tree seems very complex, as nodes would quickly overlap...
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Hi,
Can U please send me some sort of rough code, so i may modify and make it.
It may help me.
Thank U.
Shiva
|
|
|
|
|
Code that does what?
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
|
I think you missunderstood me. I didn't write a program that would manually draw the tree, I just used the TreeView control.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Ok, Sorry i misleaded
Thank U
|
|
|
|