|
sindhutiwari wrote: foreach(Control c in this.Controls)
if(c is TextBox)
( c as TextBox).Clear();
Hi,
here in this loop you have to check for tab control abd then you have to again loop for controls in tab control. like this
foreach(Control c in this.Controls)<br />
if(c is TextBox)<br />
( c as TextBox).Clear(); <br />
if(c is TabControl)<br />
{<br />
foreach(Control c1 in this.Controls)<br />
if(c1 is TextBox)<br />
( c1 as TextBox).Clear(); <br />
<br />
}<br />
Thanks,
Sun Rays
Rate this post if you like answer.
My Articles
|
|
|
|
|
thanks allot sir
its me sid
|
|
|
|
|
We are going to need to go on a field trip for this one.
Go to: http://finance.google.com/finance?q=.DJI%20.IXIC%20.INX
If that link doesn't work you can go to: http://finance.google.com/finance and click on the graph
on the right side of the page under "Market Summary"
What you see when you get there is a brilliant little flash applet that creates a real-time interactive graph. Play around with it a little. You can grab the sliders at the bottom of the graph and adjust the period of time that you want to look at. Pretty nifty.
I would love it if I could find either a .Net, MFC, Java (or even Flash) control/component/module/library that would allow me to have this sort of functionality in a stand alone application. The one at the link is made by Google apparently but I don't think they have released the source.
I have seen tons of graphing/charting libraries (nevron, dundas, dotnetcharting, ZedGraph, ChartFX...). None of them provide this interactive capability. Does anyone out there know of such a thing? I'll go commercial or free which ever provides the functionality.
If not, someone should make one. It's money in the bank.
|
|
|
|
|
maizhiming wrote: Does anyone out there know of such a thing?
Not sure. You named all the ones I use ( dundas, ChartFX, etc ).
maizhiming wrote: If not, someone should make one.
No kidding.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I found the flash code for the applet on the Google finance site. They call it a time-series graph and it is written in actionscript 3.
http://code.google.com/p/time-series-graph/
I don't know how to make standalone apps that embed flash so I am still looking for a .Net or MFC control. If anyone knows of a way to embed flash into a .Net or MFC application. I would love to know about it.
|
|
|
|
|
hi i have one doubt , i have one dropdownlist and i populating state_names from database, now my problem is i want to update to state_name ,plz.. tell me how can i do...( i means how to select state_name and send to database)..
thanks 2 all..
|
|
|
|
|
With SQL. The drop list is irrelevant, the way you update a database is always the same,
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i m using this code..
string strStateId = ddlStateID.SelectedItem.ToString();
and i have 10 statenames in dropdownlist but and i m selecting fifth statename but it is selected as a first statename only it is not taking fifth statename.. so now i want to send fifth statename, so wht can i do brother...
thanks 2 all..
|
|
|
|
|
If you have selected the 5th item and the 1st is being shown as selected, odds are this is an ASP.NET question and you're databinding the control in page load on postback.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I don't know that how are you binding your dropdownlist. But the proper way is to bind the dropdown as valuefield property is set by stateid and displayfield should be set by name of state. Now get ddl.selectedvalue and pass it to database and update by the help of value field. Hope this will help you.
Regards,
Arslan Ilyas
|
|
|
|
|
I used WebBrowser to get an html Document, in which there was a "Submit" button. I can get this HtmlElement. How to emulate a click in a program?
Call the elem's Click is invalid, cause it's a delegate , can only appear in the leftside of a + or +=.
Thanks.
|
|
|
|
|
I guess .PerformClick() is the answer!
|
|
|
|
|
No such method. I guess you are kidding me.
|
|
|
|
|
Hi All,
I don't know what my major malfunction is with C# and using some of it's GUI components. If someone would please explain to me what I am not understanding, I would be very appreciative.
According to TreeView.SelectedNode Property[^]:the specified node is scrolled into view and any parent nodes are expanded so that the specified node is visible. Below, I had to explicity set the previously SelectedNode to null to get the desired behavior. I'm spending hours wadding through documentation. When I believe I find the solution, it does not work. Most frustrating is that Remarks do not tell me why it does not work as expected. Could someone point me to the correct documentation? I really don't know what I am missing here. I am using version 2.0 of the Framework.
Thanks,
Jeff
if (0 == Tree.Nodes.Count) { return; }
TreeNode node = Tree.SelectedNode;
if (null == node) { return; }
Tree.SelectedNode = null;
Tree.BeginUpdate();
node.Expand();
Tree.EndUpdate();
Tree.SelectedNode = node;
|
|
|
|
|
Hello
I try to check if the database is empty or not, if it's i should begin a new sequence of Id when storing the new data.
else i should continue in the same sequence.
how can i check the data in the database with the dataAdapter, i try to count the row in the dataset after i fill it but ut always return 1, if i have no data or if i have just one row of data.
This an example:
"
if (c.ds.Tables["TransID"].Rows.Count.ToString() == "0")<br />
TrID = 1;<br />
else<br />
foreach (DataRow r in c.ds.Tables["TransID"].Rows)<br />
{<br />
TrID = int.Parse(r["TransID"].ToString()) + 1; <br />
} "
Assaf
|
|
|
|
|
If you can take help of SqlDataReader it might help you to do this. it has function call HasRow.....
I hope can help...
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
Hi,
I am just starting to use gridview and have encounter problem when using it. I have 2 columns for my gridview which is the product number and product description.
I would have to get the old product number so that I can update the database with the latest record. Would appreciate if someone can help me with this.
Thanks in Advance.
Regards,
Jo
|
|
|
|
|
Could please tell me you want to update Gridview when you are Editing your OLD ProductID with New Product ID.
I mean edit mode.. or what
Thanks
"Good Thing Goes With Good People..."
|
|
|
|
|
I have solved this problem already. Thanks.
Regards,
Jo
|
|
|
|
|
I have a struct which describes the attributes (properties, really) of a property. So:
struct TrackProperty(int PropertyIndex)<br />
{<br />
<br />
string Name;<br />
string DataTypeAsString;<br />
int MaxStringLength;<br />
int MinStringLength;<br />
int MaxIntValue;<br />
int MinIntValue;<br />
bool IsEnumerated;<br />
string EnumerationTypeAsString;<br />
<br />
}
Note that I am passing the name of the enumeration in the final field EnumerationTypeAsString (ie, "iTunesLib.VideoKind"). I want the code which instantiates this object to be able to use the name of the enumeration to get the valid values for this attribute of the specified property.
Is that possible? Can I go from a string containing the name of the enum type to the values in the enum itself? Or is there a better piece of data to use in that final field?
Having read MSDN on GetType(), and because the enum type I want to pass is from a DLL (they say don't use GetType on DLL assemblies), I think I want to pass the string description instead of calling GetType() myself. But how, on the other side, does the object instantiator go from the string to the Enum?
-- modified at 21:09 Tuesday 20th November, 2007
|
|
|
|
|
Dear JoeRip: Here is your answer.
Your final field should read:
Type EnumType;
In your constructor, fill it with:
EnumType = typeof(iTunesLib.ITVideoKind);
When the caller wants to use the Type you've passed, he'll do something like this:
TrackProperty tp = new TrackProperty(4);<br />
<br />
string names[] = Enum.GetNames(tp.EnumType)<br />
I want to think everybody who helped me. You've been great.
|
|
|
|
|
Many thanks.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use PRE tags to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi,
This might seem quite basic to you guys, but I'm not a c# developer (actually im not much of a developer at all!). I was looking to build a simple windows app that lets me link a couple of 2d shapes together with a line (think flowchart). I'd like to be able to drag these shapes around and have them stay linked - I've only done backend programming so I know very little about graphics/gdi+/activex etc. Somebody in my class is looking to expand on this but I'm only really interested in the basic principles as a learning excersise. What libraries should I look into?
Thanks
|
|
|
|
|
If you get the graphics object from your canvas (either the form or user control), you can call methods as follows...
Graphics g = ...;
g.DrawLine(...)
As for the shapes themselves, I would make a usercontrol called Shape, export an enumerated property that could be set to the shapes you want (say, RECT, TRI, and CIRCLE), then override the onpaint method to draw the shape you want within the bounds of that usercontrol...
g.DrawRectangle(...);
g.FillRectangle(...);
g.DrawPolygon(...);
g.FillPolygon(...);
Then you can connect whatever points you want with the drawline method. Hope this helps.
Jeff
|
|
|
|
|
Hi,
Thanks for your quick reply Jeff. Would that just connect up the two shapes at fixed locations and then redraw the line as/when a shape moves causing lots of flicker etc?
I'd like to expand on that sort of method to keep dynamically connected - like when you drag things around in visio but without using visio components. Maybe that is something outside of c#'s draw methods?
-Colm
|
|
|
|