|
hi
You can use the 'FindControl' option to get the selected values of combo box
lucky
|
|
|
|
|
hi,
Thanks Lucky,
Can you give sample code for that?
Srinivas
|
|
|
|
|
hi,
foreach(DataGridItem item in DataGrid1.Items)
{
DropDownlist ddl = (DropDownList) e.Item.Cells[1].FindControl("ddl1");
string value = ddl.Selectedvalue;
}
Above 'ddl1' is id of the combo that you want to get the value of.
all the best
lucky
-- modified at 6:50 Friday 3rd February, 2006
|
|
|
|
|
My application has a system tray icon. I havent used the NotifyIcon class in .Net, but a different system tray class. I want to display a context menu when the user right clicks on the icon. How can I do this? I havent used the NotifyIcon class because my aplication requires me to show balloon popups too which I haven't been able to achive using the NotifyIcon class. The system tray class that im using has a MouseUp and MouseDown event throught i can get the button that was clicked.
|
|
|
|
|
|
i guess that wouldnt be possible cause the code im using is from planet-source-code.com.
|
|
|
|
|
|
Is there any way, in C# to make an appilcation similar to Rainlender in terms of transparency? If you aren't familiar, you can check it out here
Rainlender[^]
Basically, what I want to do is have the background semi-transparent, but the foreground completely opaque. Is this possible in C#?
|
|
|
|
|
It's possible. But exactly how is buried in the source code for Rainlender, all you have to do is download it. The source code comes with it, but it's in Visual C++ 6.0. You'll have to follow the code and see how it creates its windows and what attributes it's modifying.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can you give me some tips as what to look for? I haven't done c++ in about 5 years. I'm guessing I can't use any controls and I'd have to render all text in gdi or use images like rainlender.
|
|
|
|
|
Probably something to do with Layered and Transparent windows. Also, modifications to the windows EXSTYLE (Extended Style) attributes, like Alpha and ColorKey.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do you spin a process off onto another thread and wait for it to complete? I'm looking for something like when you call ShowDialog and the process stops until the dialog has been closed.
|
|
|
|
|
|
Cool, thanks. I'll take a look at it.
|
|
|
|
|
If your question was how to kick off a seperate process (e.g. another application) from within you current program then the previous answer will be the key, however it looked from your question as if you wanted to kick off a seperate THREAD from within your program, in that case you would create a new thread, start it off and then call Join to wait for it to finish.
e.g
<br />
ThreadStart ts = new ThreadStart(StartExtrapolation);
Thread thThread = new Thread(ts);<br />
thThread.Start();<br />
thThread.Join();
<br />
<stuff><br />
|
|
|
|
|
Yeah, a separate thread yes. I've known how to start different threads and whatnot, just didn't ever know how to wait for one to finish without some kind of event. Thanks.
|
|
|
|
|
This is part of a class libary that I am creating for a web site. I've created a class for a HtmlGenericControl that I want to use on my pages. It creates a box object that I can format easily (via the use of built in methods) and use on my ASP.net web site.
I've created the class, and it all compiles correctly, I can set it's properties and access it's methods, but when I create an instance of the class and try to add the control to the page I get a "null object" error.
Here's my code for the object:
public class ContentBox : HtmlGenericControl<br />
{<br />
HtmlGenericControl BoxTop;<br />
HtmlGenericControl BoxHeader;<br />
HtmlGenericControl BoxBottom;<br />
<br />
<br />
public string BoxHeaderText;<br />
<br />
public HtmlGenericControl BoxContent;<br />
<br />
<br />
string BoxStyle;<br />
public void SetToContentWide() { BoxStyle = "box-wide"; }<br />
public void SetToContentLeft() { BoxStyle = "box-left"; }<br />
public void SetToContentRight() { BoxStyle = "box-right"; }<br />
public void SetToContentRightSidebar() { BoxStyle = "box"; }<br />
<br />
<br />
string BoxHeaderStyle;<br />
public void SetHeaderImportant() { BoxHeaderStyle = "header"; }<br />
public void SetHeaderNotImportant() { BoxHeaderStyle = "top"; }<br />
<br />
<br />
public ContentBox()<br />
{<br />
BoxStyle = "box-wide";<br />
BoxHeaderStyle = "header";<br />
BoxHeaderText = "";<br />
<br />
this.TagName = "div";<br />
this.Attributes["class"] = BoxStyle;<br />
<br />
BoxTop = new HtmlGenericControl("div");<br />
BoxTop.Attributes["class"] = BoxHeaderStyle;<br />
this.Controls.Add(BoxTop);<br />
<br />
BoxHeader = new HtmlGenericControl("h2");<br />
BoxHeader.InnerText = BoxHeaderText;<br />
BoxTop.Controls.Add(BoxHeader);<br />
<br />
BoxBottom = new HtmlGenericControl("div");<br />
BoxContent = new HtmlGenericControl("div");<br />
this.Controls.Add(BoxBottom);<br />
}
When I add the box to the page I simply use:
ContentBox _thebox = new ContentBox();
I can create an instance of the class, I can access it's methods, I can set it's properties, but when I try and use it on the page I get a null object error.
I think that the problem is that although when I create an instance of the class "ContentBox" it isn't being created as a new HtmlControl, but rather a null object.
Can anybody tell me how I get the object itself to become a new HtmlGenericControl when I create an instance of it?
Thanks
|
|
|
|
|
Ok just so I can clarify this.
When I defined the class, I defined it as a an extension of the "HtmlGenericControl" class (as you can see in my above code). I want it to behave like a HtmlGenericControl, I want to manipulate it like a HtmlGenericControl, I basically want it to be a regular HtmlGenericControl.
Since "ContentBox" inherits from the "HtmlGenericControl" class I assume that I am just missing some code that will make the system initialise it as a regular "HtmlGenericControl" (eg. "InitializeComponent()" ).
That's the info that I'm after, how do I tell ASP.net to initialise instances of the class "ContentBox" as a "HtmlGenericControl", so that I can treat it as a HtmlGenericControl in my application?
Thanks
|
|
|
|
|
VS 2005 C# Class Wizard - it is gone? Should I be able to use the class wizard or is it no longer an option?
|
|
|
|
|
I think they removed it in the Express editions to be honest
|
|
|
|
|
Is there an SQLDMO like product for Oracle? I want to be able to manage tables and views from C# code.
Thanks.
|
|
|
|
|
Hi.
I'm trying to hook on to an event which my remote object provides. client and server share the same common library where the event and delegate is defined in an interface.
Anyway, the remoting works, but when I try to use delegates (+=), I get the following message:
"Type System.DelegateSerializationHolder and the types derived from it (such as System.DelegateSerializationHolder) are not permitted to be deserialized at this security level."
I've been searching a lot and see that in 1.1 this could be fixed by setting the 'typeFilterLevel=Full'. However, I can not figure out to set this in .net 2.0 as the 'RegisterChannel' method has changed
|
|
|
|
|
Hi all,
I am very new to DirectoryServices. I created an ActiveDirectory user by using DirectoryServices. I can find that added entry later-on aswell. But I still couldnt figure out that how can I delete an added user later.
I tried
DirectoryEntries.remove("username", DirectoryEntry.SchemalClassName);
as mentioned on MSDN, but its keep on givng me an error like:
Invalid DN name assigned
Can anybody help me?
Thanks in Advance!!!!
|
|
|
|
|
Hi,
I have a form and I don't want it to get focus. Is there a possibility with .net (like setting the focus to a certain window) or do I have to use the win32 api? I'm using visual c# 2005 express edition, so I could make use of .net 2.0.
Thanks
|
|
|
|
|
my tabcontrol's selectedindexchanged event handler runs some code and if an exception is thrown, i set my selectedindex to 0 (the first tab page). but only the tab changes, not the page. the page remains on what was originally changed to. what is going on? i also tried .selectedtab = tpStart; and .selecttab(0); which produces the same weird effect.
|
|
|
|