|
Hi,
I did something similar in asp.net 2.0
I think it was to do with gridview.column(indexNumber).visible=false
|
|
|
|
|
Hi
I want to find a row in datagrid in order to special value.
It means I want to select a row that it's first column equal to some value.
Now the question is this :
Is there any fast code to do this?
I want this, but it's slow:
<br />
DataSet ds = new DataSet();<br />
ds = (DataSet)myDataGrid.DataSource;<br />
for (int i=0;i<ds.Tables[0].Rows.Count;i++)<br />
{<br />
if (ds.Tables[0].Rows[i][0].ToString() == '19001')<br />
{<br />
myDataGrid.Select(i);<br />
break;<br />
}<br />
}<br />
Please help if you can.
Tank you.
|
|
|
|
|
You Can use The SELECT method Of DataView Meybe this is more faster
MHF
|
|
|
|
|
try this it may help you
ds.Tables[0].Columns[0].Contains("string");
or
ds.Tables[0].Columns.Contains("string");
but for this you may need to create a primary key.
sikandar
|
|
|
|
|
make and other method using thread it will reduce the load
like
replace
call it like this
Thread th =new Thread(new ThreadStart(procedure));
th.start();
void procedure()
{
DataSet ds = new DataSet();
..
..your code
}
}
}
--------------
or use this
ds.Tables[0].Columns[0].Contains("string");
ds.Tables[0].Columns.Contains("string");
ok
sikandar
|
|
|
|
|
I made a Windows form in C# which contains 2 labels and 2 text fields the label name are saved in xml the xml fomat is
<id lbl="label01="firstlabel"/">
<id lbl="label02="secondlabel"/">
and u know to change the name of label we write
label01.Text=string1;
label02.Text=string2;
I do not want to use this. in case I have many labels then??
My question is there any other way so that i change its text (geting label01 from xml and its respective text).throug loping crateria.
thanks in advance.....
Sikandar
sikandar
|
|
|
|
|
You can iterate over the controls collection looking for labels if you prefer, and if that works with the data you need to place into the labels. You could even iterate over the controls collection and create a new collection of only labels, but as soon as a label is added or removed, this would be wrong ( unless you made a private property that did this every time you wanted the labels collection ).
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
My friend! Your request was not in definite.
May be below code can help you :
<br />
int i=1;<br />
foreach (Control ctrl In this.Controls)<br />
{<br />
if (ctrl Is Label)<br />
{<br />
ctrl.Text = "Label" + i.ToString();<br />
i++;<br />
}<br />
} <br />
please contact me if i couldn't help you.
|
|
|
|
|
|
Could anyone help me with the code to find Eigen value and Eigen vector of an image and also the code of SVD (singular value decomposition)?
Vicky
|
|
|
|
|
Follow up on the reply that you got the last time you asked the question, instead of just posting it again. If you just ignore the people that actually are replying, they will think that you are rude, and stop replying to your posts.
---
b { font-weight: normal; }
|
|
|
|
|
sorry man,
I couldn't catch up the reply to the prevoius posting of my problem .
So the question of being rude doesn't arise. If u have the solution to my problem, please resend that.
Thank you.
Vicky
|
|
|
|
|
vickyProgrammer wrote: I couldn't catch up the reply to the prevoius posting of my problem .
What do you mean? You just press the reply button on the post you wish to reply to.
vickyProgrammer wrote: So the question of being rude doesn't arise.
It does if you don't explain why you are breaking the standard etiquette for the forum.
|
|
|
|
|
i want to insert image in varbinary field in database
and redisplay it from select statment to picturebox
thank you
fatma
|
|
|
|
|
Since you didn't ask a question I'm assuming you are stuck on something rather than just wish to announce to the world your intentions. What part of the above would you like help with?
|
|
|
|
|
Hello
i want code for updating UltraWebGrid in c# (Edting option in UltraWebGrid).
Thank u
Uma
|
|
|
|
|
Then you should probably ask Infragistics. Don't they have a support forum ?
Seriously, everyone there will have this library. Most of us ( me included ), don't. So how can we help you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hi All!!
I have a backend order system to place orders offline. It consists of a gridview with 5 rows (as default) with products. Let say I need to add more than 5 products, then I want to have a button that adds a new row to the gridview from which the admin member can choose another product. Something like the old Yahoo mail when you need to add a lot of images.
I have tried searching Google on how to do this, but I am struggling to get this right. Can someone please help me on how to do this please? If there are any articles that you know of, please let me know.
I really am desperate on getting help on this!!
I hope someone can help.
Regards,
ma se
|
|
|
|
|
Hi people,
I was wondering if somebody could point me (a C# novice)in the right direction with a problem I have?!
At work,the people above have told me I cannot install any C# software on my PC.
However, I want to create a form that allows a user to send an email to somebody chosen from a drop-down list. The email should contain all the info from the fields on the form. (We have Microsoft Outlook 2000 at work).
The data from each record would be stored in a Microsoft Access 2000 database.
(1)How would I go about creating a class that sends emails?
(2)How could I ensure the application is stand-alone and could interact with Outlook 2000, without me breaching any company regulations about installing software at work?
Many thanks in advance.
-- modified at 4:26 Monday 21st August, 2006
|
|
|
|
|
Jag77 wrote: At work,the people above have told me I cannot install any C# software on my PC.
So why are you asking here ?
Jag77 wrote: How would I go about creating a class that sends emails?
There's one built into C#, but as you're not allowed to use it, what language do you hope to use instead ?
Jag77 wrote: How could I ensure the application is stand-alone
You can't - it will require the .NET framework, no matter what, if it's C# or VB.NET.
Jag77 wrote: could interact with Outlook 2000
There are MAPI classes for C# on the web.
Jag77 wrote: without me breaching any company regulations about installing software at work?
If you're not allowed to install anything written in C#, you need C++ ( which is going to be a lot harder ). IF you're not allowed to install ANYTHING, no matter what the language ( which your last statement implies ), then you're out of luck, unless you can script something within outlook or Access itself. They can't possibly complain that you're running scripts in a program already installed, right ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
Hi,
I'm kind of stuck with an serializing / deserializing problem using a generic dictionary holding references to various generic types. It goes as follows:
<br />
<br />
class MyBase : IXmlSerializable<br />
{<br />
}<br />
<br />
class MyGeneric<ValueType> : MyBase, IXmlSerializable<br />
{<br />
MyGeneric(Valuetype tVal)<br />
{<br />
val = tVal;<br />
}<br />
ValueType val;<br />
}<br />
<br />
class Program<br />
{<br />
dictionary<string, MyBase> m_Dic = new dictionary<string,MyBase>();<br />
<br />
void FillDictionary()<br />
{<br />
dictionary.Add("Key1", new MyGeneric<int>(10));<br />
dictionary.Add("Key1", new MyGeneric<string>("StringValue"));<br />
dictionary.Add("Key1", new MyGeneric<double>(3.1415));<br />
}<br />
}<br />
Ok, I hope you can see the idea behind it. It's mainly thought to hold a variety of different types whithout specifying a parameter enum which selects the appropiate value via a huge switch statement on lots of overloads to the value Get/Set property.
While I'm able to serialize the dictionary without a problem to an XML file, I'm stuck deserializing it.
The problem: how can I can generate a generic from a textinformation like
<mygenericofint32> or MyApp.MyGeneric`1[System.String] ?
The first classification is generated by the .Net serializer and the second is generated from typeof(...) .
Any ideas are very appreciated.
Thanks,
Florian
|
|
|
|
|
For the interested ones, I found a solution:
<br />
Type t = Type.GetType(typestring);<br />
object o = Activator.CreateInstance(t); <br />
This works, if you serialize the type on saving with GetType().ToString().
|
|
|
|
|
Hello!
I think it's a simple question, but i don't know where to start looking for the answer... I have a program which launches several processes. But, i don't want the program to launch a process if the application (the one the process is supposed to launch) is already running. My problem is checking whether the process must be launched or not. I thought searching the Task Manager, but i have no idea on how to get there.
Thanks a lot!
|
|
|
|
|
string processName = "MyProcess1";
Process[] processes = Process.GetProcessesByName(processName);
if(processes.Length > 0)
{
}
else
{
Process.Start(@"c:\MyProcess1.exe");
}
|
|
|
|