controls

Sorting a ListView by multiple columns in C#

With ListView controls, you can specify a column to sort by, and there's a method to sort() whenever you want. However, this only allows for single column sorting. I'm keen to sort by say, Column A first, and then by Column F for when they are the same. I've found a few custom compare classes written online, but wondered if stackoverf...

Getting a dynamic controls value after Page_Load in C#?

Hello. I have two web parts that communicate. The provider can not give a value(an RID) to the consumer until at least the provider's Page_Load event. So the consumer can not know the RID it needs until after Page_Load. So, I hooked into Page_LoadComplete. Now there is a problem. The consumer creates dynamic controls based on this RID. ...

How to loop through nested controls in .net c#?

I have 8 or more Image controls each inside HyperLink and PlaceHolder I need to change parameters of each. It's for a Sitefinity gallery control. Right now I do this times 8: if (String.IsNullOrEmpty(Image_1_File_Name) == true) { Image1_ph.Visible = false; } else { productImageLink1.NavigateUrl = Folder_URL + Image_1_File_Nam...

is there a way to set the days and month names manually in a winform datetimepicker?

hello I want to set the days of a datetimepicker in english but unfortunatly, the datetime picker don't support culture so I think I can inherit the control, and set the days and months name by myself but I don't know how anybody has an idea for that ? thanks in advance Sam ...

Silverlight control locked in runtime

I have a online survey running in Silverlight. Out of more than 1000 onetime users, there are three users than cannot open a combobox on the first page. The control seems disabled and don't react on mouseclick. Since it is one-time user, they don't wan't to help me with debugging and I cannot reproduce the problem myself. Any ideas why...

when creating a asp.net control, how do you enable child tags in the markup?

Say I want to create my own listing control, like a repeater. How can I make it support my own custom tags, i.e. like: <blah:MyRepeater ID="id1" runat="server"> <Blah property1="234324" /> <midTemplate> </midTemplate> </blah:MyRepeater> ...

Small, editable table of strings. Which Forms control do I want? (.NET)

I have a small array of structs, each struct has three fields, all strings. I want to display these structs in a grid, let the user edit the strings a la Excel, and then retrieve the edited strings of course. Which WinForms control is best for this? Tried a DataGridView but setting the DataSource to the array of structs doesn't seem to ...

What's the best way to pass complex data into an ASP.Net control?

I want to pass complex information into a control. The equivalent of an entire XML document. What would be the best way to accomplish something like this: <MyPrefix:MyControl runat="server"> <Actions> <Action Name="Value" SomeParam="SomeValue" AnotherParam="AnotherValue"/> <Action Name="Value"/> </Action> </MyPrefix:MyCont...

Can an ASP.Net control be configued to accept ANY attributes, even ones not defined as properties in the class definition?

Is it possible to define a control to have non-specified set of attributes? For instance: <MyPrefix:MyControl SomeAttribute="SomeValue" runat="server"/> I don't want to define a property on the control class beforehand for "SomeAttribute." I'd really just like a HashTable or some other construct like this: "SomeAttribute" => "SomeV...

Enumerate the VCL controls in a external application

Hello, is possible via the Windows API's to enumerate and iterate the VCL controls on a form (TForm) belonging to a external Win32 application written in C ++ Builder or Delphi. Bye. ...

Address control for web based email application

I am looking for a control to add email addresses for a mailing application. I am not sure what it is called but I saw something similar to it at staples "Share This" link. It should allow to add email address by typing or delete it by clicking the X on its right. Could you please let me know if there are any existing controls for it or ...

Nested Server Controls

I've got a server control that contains nested server controls, <uc1:ArticleControl runat="server"> <HeadLine></HeadLine> <Blurb></Blurb> <Body></Body> </uc1:ArticleControl> Code: [ToolboxData("<{0}:ArticleControl runat=server></{0}:ArticleControl>")] [ParseChildren(ChildrenAsProperties = true)] public class ArticleCon...

Access to WPF control from a non-window class

I am new to WPF and have a problem with a small project. I am building a tester to simulate a device that is controlled by UDP. I have a couple of classes that implement the UDP as an async implementation. I had the main window code-behind polling the receive buffer for data and updating. It worked, but was very clunky. So I moved all th...

How to display managed control on native window?

Using C++/CLI, How to display a managed control (eg. System::Windows::Forms::Panel^) on a window created in native code? An external program calls my native method where i can access it's window via SubclassWindow(hNativeWindow, MyNativeWindowProc); Then I create control with something similar to: MyNameSpace::MyControl^ ctrl = osoz...

Whitebox in menucontrol

Im trying to use the asp.net menucontrol but sadly without any luck. Here is what I have done. First i created a web.sitemap like this <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="Default.aspx" title="qaz.dk" description="" roles=""> <siteMa...

Changing the property of a control on another form.

Basically, I have a settings window, and when you click "OK", it's suppose to apply settings to the main form (eg, set font of a control, etc), and then close. frmmain frm = new frmmain(); frm.OLVAltBackColor = Color.Aquamarine ; I tried that, but it only applies the settings to that instance, and you can see it if you do frm.Show(); ...

What .NET control do i want to use?

What .NET control do i should i use to display this to the user? I have 2 types of elements, a package and item. The data an item contains is id, size and status. The package can have several items (but no packages as its not a tree). It holds status and count. I can think of a 3rd column for this. I will need to right click each item o...

UI for creating invoices

Currently, I'm in the process of making a custom solution for invoicing. I have created multiple ways for customers to create their template (HTML, Word, LaTex) and get invoices according to their template. However, these invoices are party manually generated. So, the process is: Request to create a new invoice An preliminary invoice ...

WPF - Databind dynamic control type

Hi, I have a Person class. A Person can have an associated control. Can I display the control through data binding? e.g: Name: Bill , Control: TextBox Name: Bob, Control: ComboBox Name: Dan, Control: CheckBox I have the following xaml in my resource dictionary <DataTemplate x:Key="PersonTemplate"> <DockPanel > ...

Grouping controls together on an Access form

Hi, I have an Access2003 form where I wanted to group several controls together and change visibility programatically, though VBA code. Is this possible? I do know that I can group items through Format -> Group, but if I do that, how do I refer the the entire group in my code? Thank you ...