Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to add new project in the solution?
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01316637
Message ID:
01316677
Views:
15
Hi Paul,

I'm sorry, I can not get it to work.

Here is what I have
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
//using System.Drawing;
//using System.Design;  
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
I commented out two using sections (added them) because I was getting some errors to Image class otherwise.
  #region ArrowUpImageUrl
        [Description("The url of the image shown when a column is sorted in ascending order."), DefaultValue(""), Themeable(true), Category("Appearance")]        
        [Editor(typeof(System.Web.UI.Design.ImageUrlEditor), typeof(System.Drawing.Design.UITypeEditor))]
        public string ArrowUpImageUrl
        {
            get
            {
                string str = ViewState["ArrowUpImageUrl"] as string;
                if (str == null)
                    return string.Empty;
                else
                    return str;
            }
            set
            {
                ViewState["ArrowUpImageUrl"] = value;
            }
        }

        protected virtual string ArrowUpImageUrlInternal
        {
            get
            {
                if (string.IsNullOrEmpty(ArrowUpImageUrl))
                    return Page.ClientScript.GetWebResourceUrl(this.GetType(), "skmControls2.ArrowUp.gif");
                else
                    return ArrowUpImageUrl;
            }
        }
        #endregion
>>
>>I have a problem. The Down and Up arrows images look like simple properties and don't allow me to Browse for the images as, for instance, other native image properties allow. What should I do to make them "Browsable" ?
>>
>
>It's not required - you can edit the code directly via an attribute in the ASPX file for that control. But if you really want to add it, it's done via attributes.
>
>Add an attribute something like this to the property:
>
>
>[Category("Appearance")]
>[Browsable(true)]
>[Bindable(false)]
>[DefaultValue("")]
>[PersistenceMode(PersistenceMode.Attribute)]
>[Editor("System.Web.UI.Design.ImageUrlEditor", "System.Drawing.Design.UITypeEditor")]
>public string PropertyNameHere
>{
>   get {} // Whatever
>   set {}
>}
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform