Search Results

Search found 18900 results on 756 pages for 'custom controls'.

Page 8/756 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Magento - Show Custom Attributes in Grouped Product table.

    - by greencoconut
    I need to find a way to show the value of a custom attribute in place of the "Product Name" shown in the image below. I'm working with /app/design/frontend/default/defaultx/template/catalog/product/view/type/grouped.php The code below doesn't work(the custom attribute is yearmade): <?php if (count($_associatedProducts)): ?> <?php foreach ($_associatedProducts as $_item): ?> <tr> <td><?php echo $this->htmlEscape($_item->getYearmade()) ?></td> Any help would be appreciated. EDIT: So the answer turned out to be quite simple. You see what I failed to mention above was that there was indeed output... but that it was just a number (eg: 52). Turns out this was the ID for that custom attribute value (It was a Dropdown type of custom attribute). So in summary This works for custom attributes of type text: echo $this->htmlEscape($_item->getYearmade()) But for all other types of custom attribute (I think), the following should be used: echo $this->htmlEscape($_item->getAttributeText('yearmade')) I would not have discovered this without the most excellent answer provided by Alan Storm, below. Thank you sir.

    Read the article

  • Add Custom Control to DataGridViewCell

    - by Kovscer
    Hello, I create a custom control inherited from Windows.System.Forms.Controls. This is my code of this control: public partial class MonthEventComponent : Control { private Color couleur; private Label labelEvenement; public MonthEventComponent(Color couleur_c, String labelEvenement_c ) { InitializeComponent(); this.couleur = couleur_c; this.labelEvenement.Text = labelEvenement_c; this.labelEvenement.ForeColor = couleur; this.labelEvenement.BackColor = Color.White; this.labelEvenement.TextAlign = ContentAlignment.MiddleLeft; this.labelEvenement.Dock = DockStyle.Fill; this.Controls.Add(labelEvenement); } public MonthEventComponent() { InitializeComponent(); this.couleur = Color.Black; this.labelEvenement = new Label(); this.labelEvenement.ForeColor = couleur; this.labelEvenement.BackColor = Color.White; this.labelEvenement.Text = "Evénement Initialiser"; this.labelEvenement.TextAlign = ContentAlignment.MiddleLeft; this.labelEvenement.Dock = DockStyle.Fill; this.Controls.Add(labelEvenement); } protected override void OnClick(EventArgs e) { base.OnClick(e); MessageBox.Show("Click"); } } I would like to insert this control or multiple of this control on a DataGridViewCell but i don't know how to do this. Thank you in advance for your answer, Best Regards, PS: I'm french, i'm apologize for any can of language errors.

    Read the article

  • AJAX TabContainer containing user controls

    - by Ali
    Hi all, Wondering if someone here can help. I have an AJAX tabcontainer which has a number of tabs and each tab contains a user control. When I add a new item from one of the tabs, it is not reflected in the user control in another tab unless a postback occurs. (e.g. the first tab has a listview where I add a new record and the second has a simple form which contains a drop-down which I expect to contain value added from first tab). How can I make the tabcontainer to refresh its tabs from a usercontrol? Any help will be most appreciated. Thanks, Ali

    Read the article

  • ASP.net access controls dynamically

    - by c11ada
    hey all, i have a table which looks similar to this <asp:TableRow><asp:TableCell>Question 1</asp:TableCell><asp:TableCell ID ="Question1Text"></asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell ColumnSpan="2"> <asp:RadioButtonList ID="RadioButtonList1" runat="server"><asp:ListItem>Yes</asp:ListItem><asp:ListItem>No</asp:ListItem> </asp:RadioButtonList> </asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell> <asp:TextBox ID="TextBox1" TextMode="MultiLine" runat="server"></asp:TextBox></asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell>Question 2</asp:TableCell><asp:TableCell ID ="Question2Text"></asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell ColumnSpan="2"> <asp:RadioButtonList ID="RadioButtonList2" runat="server"><asp:ListItem>Yes</asp:ListItem><asp:ListItem>No</asp:ListItem> </asp:RadioButtonList> </asp:TableCell></asp:TableRow> <asp:TableRow><asp:TableCell> <asp:TextBox ID="TextBox2" TextMode="MultiLine" runat="server"></asp:TextBox></asp:TableCell></asp:TableRow> i want to be able to systematically acces table cells with ID's for example for (int i = 1; i<3 ; i++) { // i want to be able to access the table cell with the ID Question1Text then Question2Text and so on } is this even possible ??

    Read the article

  • controls layout WPF

    - by jonathan
    i have a LOB application with 30 fields to put in a form. I found it very painful to put them in the window with a grid. is there a productive way to build entry forms in WPF . Thanks John

    Read the article

  • Custom Control Not Playing Nice With PropertyGrid

    - by lumberjack4
    I have a class that is implementing a custom ToolStripItem. Everything seems to work great until I try to add the item to a ContextMenuStrip at design time. If I try to add my custom control straight from the ContextMenuStrip the PropertyGrid freezes up and will not let me modify my Checked or Text properties. But if I go into the ContextMenuStrip PropertyGrid and add my custom control through the Items(...) property, I can modify the custom control just fine within that dialog. I'm not sure if I'm missing an attribute somewhere of if its a problem with the underlying code. Here is a copy of the CustomToolStripItem class. As you can see, its a very simple class. [ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ContextMenuStrip)] public class CustomToolStripItem : ToolStripControlHost { #region Public Properties [Description("Gets or sets a value indicating whether the object is in the checked state")] [ReadOnly(false)] public bool Checked { get { return checkBox.Checked; } set { checkBox.Checked = value; } } [Description("Gets or sets the object's text")] [ReadOnly(false)] public override string Text { get { return checkBox.Text; } set { checkBox.Text = value; } } #endregion Public Properties #region Public Events public event EventHandler CheckedChanged; #endregion Public Events #region Constructors public CustomToolStripItem() : base(new FlowLayoutPanel()) { // Setup the FlowLayoutPanel. controlPanel = (FlowLayoutPanel)base.Control; controlPanel.BackColor = Color.Transparent; // Add the child controls. checkBox.AutoSize = true; controlPanel.Controls.Add(checkBox); ContextMenuStrip strip = new ContextMenuStrip(); } #endregion Constructors #region Protected Methods protected override void OnSubscribeControlEvents(Control control) { base.OnSubscribeControlEvents(control); checkBox.CheckedChanged += new EventHandler(CheckChanged); } protected override void OnUnsubscribeControlEvents(Control control) { base.OnUnsubscribeControlEvents(control); checkBox.CheckedChanged -= new EventHandler(CheckChanged); } #endregion Protected Methods #region Private Methods private void CheckChanged(object sender, EventArgs e) { // Throw the CustomToolStripItem's CheckedChanged event EventHandler handler = CheckedChanged; if (handler != null) { handler(sender, e); } } #endregion Private Methods #region Private Fields private FlowLayoutPanel controlPanel; private CheckBox checkBox = new CheckBox(); #endregion Private Fields }

    Read the article

  • VB.NET dynamic use of form controls

    - by Marcx
    I have 10 labels named lbl1, lbl2, ... lbl10 I'd like to change their propriety (using a cicle) with the cicle index for i as integer=1 to 10 step 1 lbl (i) = PROPRETY 'I know this is wrong but it's what I would do... end for I'm using a workaround, but I'm looking for a better way.. Dim exm(10) As Label exm(1)=lbl1 exm(2)=lbl2 ... exm(10)=lbl10 for i as integer=1 to 10 step 1 exm (i) = PROPRETY end for

    Read the article

  • How to use a viewstate'd object as a datasource for controls on a user control

    - by user557325
    I've got a listview on a control. Each row comprises a checkbox and another listview. The outer listview is bound to a property on the control (via a method call, can't set a property as a SelectMethod on an ObjectDataSource it would appear) which is lazy loaded suchly: Public ReadOnly Property ProductLineChargeDetails() As List(Of WebServiceProductLineChargeDetail) Get If ViewState("WSProductLineChargeDetails") Is Nothing Then ViewState("WSProductLineChargeDetails") = GetWebServiceProductLineChargeDetails() End If Return DirectCast(ViewState("WSProductLineChargeDetails"), Global.System.Collections.Generic.List(Of Global.MI.Open.WebServiceProductLineChargeDetail)) End Get End Property The shape of the object referenced by the data source is something like this: (psuedocode) Product { bool Licenced; List<Charge> charges; } Charge { int property1; string property2; bool property3 . . . } The reason for the use of viewstate is this: When an one of the checkboxes on one of the outer list view rows is checked or unchecked I want to modify the object that the ODS represents (for example I'll add a couple of Charge objects to the relevant Product object) and then rebind. The problem I'm getting is that after every postback (specifically after checking or unchecking one of the rows' checkbox) my viewstate is empty. Thiss means that any changes I make to my viewstate'd object is lost. Now, I've worked out (after much googling and reading, amongst many others, Scott Mitchel's excellent bit on ViewState) that during initial databinding IsTrackingViewState is set to false. That means, I think, that assigning the return from GetWebServiceProductLineChargeDetails() to the ViewState item in my Property Get during the initial databind won't work. Mind you, even when the IsTrackingViewState is true and I call the Property Get, come the next postback, the viewstate is empty. So do you chaps have any ideas on how I keep the object referenced by the ObjectDataSource in ViewState between postbacks and update it and get those changes to stay in ViewState? This has been going on for a couple of days now and I'm getting fed up! Cheers in advance Steve

    Read the article

  • Prevent deferred creation of controls.

    - by Scott Chamberlain
    Here is a test framework to show what I am doing, just create a new project add a tabbed control, on tab 1 put a button on tab 2 put a check box (default names) and paste this code for its code public partial class Form1 : Form { private List<bool> boolList = new List<bool>(); BindingSource bs = new BindingSource(); public Form1() { InitializeComponent(); boolList.Add(false); bs.DataSource = boolList; checkBox1.DataBindings.Add("Checked", bs, ""); } bool updating = false; private void button1_Click(object sender, EventArgs e) { updating = true; boolList[0] = true; bs.ResetBindings(false); Application.DoEvents(); updating = false; } private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (!updating) MessageBox.Show("CheckChanged fired outside of updating"); } } The issue is if you run the program and look at tab 2 then press the button on tab 1 the program works as expected, however if you press the button on tab 1 then look at tab 2 the event for the checkbox will not fire untill you look at tab 2. The reason for this is the controll on tab 2 is not in the "created" state, so its binding to change the checkbox from unchecked to checked does not happen until after the control has been "Created". checkbox1.CreateControl() does not do anything because according to MSDN CreateControl does not create a control handle if the control's Visible property is false. You can either call the CreateHandle method or access the Handle property to create the control's handle regardless of the control's visibility, but in this case, no window handles are created for the control's children. I tried getting the value of Handle(there is no CreateHandle for Button) but still the same result. Any suggestions other than have the program quickly flash all of my tabs that have data-bound check boxes when it first loads?

    Read the article

  • sharing web user controls across projects.

    - by Kyle
    I've done this using a regular .cs file that just extends System.Web.UI.UserControl and then included the assembly of the project that contains the control into other projects. I've also created .ascx files in one project then copied all ascx files from a specified folder in the properties-Build Events-Pre-build event. Now what I want to do is a combination of those two: I want to be able to use ascx files that I build in one project, in all of my other projects but I want to include them just using assembly references rather than having to copy them to my "secondary" projects as that seems a ghetto way to accomplish what I want to do. It works yes, but it's not very elegant. Can anyone let me know if this even possible, and if so, what the best way to approach this is?

    Read the article

  • Create Personalized Controls For Java ME

    - by Nathan Campos
    I'm starting to develop a eBook reader for mobile using Java ME, but for the control were the book will be shown I need a personalized control. For this I need to first know how to do one, to workaround with my needs. Then I need to know how can I do a personalized control as we do with Visual Basic. PS: I want to do a personalized TextBox, that in some parts can be in bold, italic, sublined, that supports topics(as the Edit, the MS-DOS Text Editor) and many other things that make a eBook better viewed than a simple plain text

    Read the article

  • How to set margin for inner controls of WrapPanel

    - by Andrey Tagaew
    Hi Guys! I'm new in WPF and have a question. Here is an example that I'm using: <Window x:Class="WpfApplication2.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <StackPanel> <WrapPanel Orientation="Horizontal" > <Button Content="test1" Margin="10,0" Padding="10,10" /> <Button Content="test2" Margin="10,0" Padding="10,10" /> <Button Content="test3" Margin="10,0" Padding="10,10" /> <Button Content="test4" Margin="10,0" Padding="10,10" /> <Button Content="test5" Margin="10,0" Padding="10,10" /> </WrapPanel> </StackPanel> As you can see, my wrap panel has several buttons. Each button has the same margin and padding. The question is, is there a way of setting margin and padding for wrap panel, so each element inside the wrap panel may use it values? This make the code shorter and let me specify Margin and Padding only one time instead of setting it for each control in the panel. Thank you!

    Read the article

  • Events on controls in web server control

    - by MarkyMarc
    Hi All, I'm creating a web server control that has an image button on it. The html for the control is done in the RenderControls of the code, the control devrives from WebControl, IScriptControl, INamingContainer. The button is coded as follow in the RenderControls: System.Web.UI.WebControls.ImageButton img = new System.Web.UI.WebControls.ImageButton(); img.ImageUrl = "Url of the image"; img.Click += new ImageClickEventHandler(img_Click); img.ID = this.ClientID + "_img"; img.CausesValidation = false; imgLock.RenderControl(output); The button apreas in the browser but when i click on it, the page postsback but the event handler for the button doesn't get fired, from what i can figure out, since the control goes throught RenderControls eachtime the page is posted back, the button gets redrawn and the event handling disapears. This server control is in a master page. Anyone can help me on this? Thanks

    Read the article

  • Creating controls in ASP with dynamic IDs

    - by mattdell
    Hi, I'm creating a chat widget that will be dropped into CommunityServer. The widget works great, but I just discovered that if I drop two of these widgets onto the same page, only one of them works! And I'm quite certain the reason is because the chat window is defined in ASP, and now there are two instances of the chat window, with the same ID, on the same page. I am doing this with straight ASP & Javascript (not by choice), so my chat window is defined as: <telerik:RadListBox ID="rlbMessages" runat="server" > (don't mind that it's a telerik control). So I was hoping I could do something like this: <telerik:RadListBox ID="<%= 'rlbMessages' + chatRoomID %>" runat="server" > But from what I've gathered, apparently you can't assign ID's this way? What is the alternative?

    Read the article

  • Detect changes to user input controls in Silverlight?

    - by code
    I have a childwindow with a number of Textboxes, Comboboxes, and DatePickers. I want to know if a user has changed any value in these (to know if I need to save to db) One way I could think of doing this are in the 'on chg' event handlers and set bool. But if a user changes the value, in say a combobox, then changes back to the original this would still be seen as a change. Are there other alternatives? (note the project is not set up as MVVM) Thanks

    Read the article

  • Dragging Controls on Form at runtime

    - by j-t-s
    Hi All I've just started using WPF. But I'm trying to add my code that (from Winforms) enables the user to drag any control whereever they wish at runtime. But I can't seem to get the current Location of the mouse... Eh? There is no Location for Mouse? :(

    Read the article

  • WPF Custom Control containing a List of Objects

    - by Cecile
    Hi, I have an object Trip in my object model containing a list of Nodes (e.g. NodeName, StartDate and EndDate) and I am trying to build a Custom control in WPF that draws list of rectangles: one for each Node contained in the Trip object (based on StartDate en EndDate) Would you have any hint on how the Custom Control should be structured so that I can bind a Trip object to it and draw the rectangles properly, please?

    Read the article

  • Panel in Windows Forms Application not clearing

    - by SwiftStriker00
    I'm working on my project: [Beer Pong Management System][1], a Windows Forms application. I am currently trying to add a whole tournament mode to it. In a nutshell, I've created a TabControl, with the first tab page with the settings and setup and the second page the brackets. There is a feature for each of the match-ups, that once there is a winner is decided, a yellow cancel button will appear in order to revert the tournament. However my issue is when i click the button the next match-up does not get removed in the series is going. See below: Image Here(not high enough rep to insert image) I have tried to set the MatchUp to null, I've tried dispose(), close(). even Parent.Controls.Remove(). Even after I switch tabs which is supposed to clear all, they still sit there when i come back. I have a feeling I might be loosing a reference or something because I can't even push new teams into them, they just sit there with their buttons. Does anyone have any tips or know of any known issues that might be causing this? Thanks. [1] _http://www.cs.rit.edu/~rmb1201/pages/code.shtml

    Read the article

  • Tomcat Custom MBean

    - by Darran
    Does anyone know how to deploy a custom MBean to Tomcat? So far I`ve found this http://www.junlu.com/list/3/8871.html. I copied my jar with my MBean to Tomcat lib directory so the Custom class loader should pick it up. I then followed the instructions but I kept getting the exception below. My MBean does definitely have a public constructor. If I removed the jar from the tomcat lib directory I get the same message which suggests its not picking up my jar or my jar is being loaded after the Apache MBean Modeler is running in Tomcat. 06-Aug-2010 12:14:23 org.apache.tomcat.util.modeler.modules.MbeansSource execute SEVERE: Error creating mbean Bean:type=Bean javax.management.NotCompliantMBeanException: MBean class must have public constructor at com.sun.jmx.mbeanserver.Introspector.testCreation(Introspector.java:127) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:2 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:1 at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:393) at org.apache.tomcat.util.modeler.modules.MbeansSource.execute(MbeansSource.java:207) at org.apache.tomcat.util.modeler.modules.MbeansSource.load(MbeansSource.java:137) at org.apache.catalina.core.StandardEngine.readEngineMbeans(StandardEngine.java:517) at org.apache.catalina.core.StandardEngine.init(StandardEngine.java:321) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:411) at org.apache.catalina.core.StandardService.start(StandardService.java:519) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:581) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

    Read the article

  • Can I add custom methods/attributes to built-in Python types?

    - by sfjedi
    For example—say I want to add a helloWorld() method to Python's dict type. Can I do this? JavaScript has a prototype object that behaves this way. Maybe it's bad design and I should subclass the dict object, but then it only works on the subclasses and I want it to work on any and all future dictionaries. Here's how it would go down in JavaScript: String.prototype.hello = function() { alert("Hello, " + this + "!"); } "Jed".hello() //alerts "Hello, Jed!" Here's a useful link with more examples— http://www.javascriptkit.com/javatutors/proto3.shtml

    Read the article

  • Win a set of Infragistics Silverlight Controls with Data Visualization!

    - by mbcrump
    Infragistics recently released their new Silverlight Data Visualization Controls. I saw a couple of samples and had to take a look. I headed over to their website and downloaded the controls. I first noticed the hospital floor-plan demo shown on their site and started thinking of ways that I could use this in my own organization. I emailed them asking if I could give away the Silverlight Data Visualization controls on my site and they said, Yes! They also wanted to throw in the standard Silverlight Line of Business controls. (combined they are worth about $3000 US). I am very thankful they were willing to help the Silverlight community with this giveaway. So some quick rules below: ----------------------------------------------------------------------------------------------------------------------------------------------------------- Win a FREE developer’s license of Infragistics Silverlight Controls with Data Visualization ($3000 Value) Random winner will be announced on January 1st, 2011! To be entered into the contest do the following things: Subscribe to my feed. Leave a comment below with a valid email account (I WILL NOT share this info with anyone.) For extra entries simply: Retweet a link to this page using the following URL [ http://mcrump.me/iscfree ]. It does not matter what the tweet says, just as long as the URL is the same. Unlimited tweets, but please don’t go crazy! This URL will allow me to track the users that Tweet this page. Don’t forget to visit Infragistics because they made this possible. ---------------------------------------------------------------------------------------------------------------------------------------------------------- Before we get started with the Silverlight Controls, here is a couple of links to bookmark: The Silverlight Line of Business Control page is here. You can also check out the live demos here. The Data Visualization page is here. You can also check out the live demos here. Don’t worry about the Samples/Help Documentation. You can install all of that to your local HDD when you are installing it. I am going to walk you through the Silverlight Controls recently released by Infragistics. Begin by downloading the trial version and running the executable. If you downloaded the Complete bundle then you will have the following options to pick from. I like having help documentation and samples on my local HDD in case I do not have access to the internet and want to code. After it is installed, you may want to take a look at your Toolbox in Visual Studio 2010. Look for NetAdvantage 10.3 Silverlight and you will see that you now have access to all of these controls. At this point, to use the controls it’s as simple as drag/drop onto your Silverlight container. It will create the proper Namespaces for you. I wanted to highlight a few of the controls that I liked the most: Grid – After using the Infragistics grid you will wonder how you ever survived using the grid supplied by Microsoft standard controls.  This grid was designed to get your application up and running very fast. It’s simple to bind, it handles LARGE DataSets, easy to filter and allows endless possibilities of formatting data. The screenshot below is an example of the grid. For a real-time updating demo click here. SpellChecker- If your users are creating emails or performing any other function that requires Spell Checking then this control is great. Check out the screenshots below: In this first screen, I have a word that is not in the dictionary [DotNet]. The Spell Checker finds the word and allows the user to correct it. What is so great about Infragistics controls is that it only takes a few lines of code to have a full-featured Spell Checker in your application. TagCloud – This is a control that I haven’t seen anywhere else. It allows you to create keywords for popular search terms. This is very similar to TagCloud seen all over the internet.  Below is a screenshot that shows “Facebook” being a very popular item in the cloud. You can link these items to a hyperlink if you wanted. Importing/Exporting from Excel – I work with data a majority of the time. We all know the importance of Excel in our organizations, its used a lot. With Infragistics controls it make importing and exporting data from a Grid into Excel a snap. One of the things that I liked most about this control was the option to choose the Excel format (2003 or 2007). I haven’t seen this feature in other controls. Creating/Saving/Extracting/Uploading Zip Files – This is another control that I haven’t seen many others making. It allows you to basically manipulate a zip file in any way you like. You can even create a password on the zip file. Schedule – The Schedule that Infragistics provides resembles Outlook’s calendar. I think that it’s important for a user to see your app for the first time and immediately be able to start using because they are already familiar with the UI. The Schedule control accomplishes that in my opinion. I have just barely scratched the surface with the Infragistics Silverlight Line of Business controls. To check all of them then click here. A quick thing to note is that this giveaway also comes with the following Silverlight Data Visualization Controls. Below is a screenshot that list all of them:   I wanted to highlight 2 of the controls that I liked the most: xamBarcode– The xamBarcode supports the following Symbologies: Below is an example of the barcode generated by Infragistics controls. This is a high resolution barcode that you will not have to wonder if your scanner can read it. As long as you have ink in your printer your barcode will read it. I used a Symbol barcode reader to test this barcode. xamTreemap– I’ve never seen a way of displaying data like this before, but I like it. You can style this anyway that you like of course and it also comes with an Office 2010 Theme. Thanks to Infragistics for providing the controls to one lucky reader. I hope that you enjoyed this post and good luck to those that entered the contest.  Subscribe to my feed

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >