[CLOSED] PropertyGrid editor issue

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] PropertyGrid editor issue

    Hi every one,

    I'm trying to set the editor for each property by code-begind but doesn't work. The editor is TextFied for all attributes.

    Here is my code.

                                    <ext:PropertyGrid runat="server" 
                                    ID="UserCustomAttributes"
                                    Title="<%$ Resources:Resource,CustomAttributes %>"
                                    >
                                    <Source>
                                        <ext:PropertyGridParameter></ext:PropertyGridParameter>
                                    </Source>
                                    </ext:PropertyGrid>

    protected void LoadCustomAttributes(int USERID)
        {
            DataTable dt = SigmaSportUser.UserSelect_AllCutomAttributes(USERID,1);
            PropertyGridParameterCollection pList = new PropertyGridParameterCollection();
            
            foreach (DataRow dr in dt.Rows)
            {
                PropertyGridParameter param = new PropertyGridParameter();            
                param.Value = dr["VALUE"].ToString();
                param.DisplayName = dr["ATTRIBUTEID"].ToString();
                param.Name = dr["ATTRIBUTEID"].ToString();
    
                switch(dr["DATATYPE"].ToString())
                {
                    case "System.String":
                        {
                            TextField tf = new TextField();
                            tf.AllowBlank = false;                        
                            param.Editor.Add(tf);
                            break;
                        }
                    case "System.DateTime":
                        {
                            DateField df = new DateField();
                            df.AllowBlank = false;
                            param.Editor.Add(df);
                            break;
                        }
                }
                pList.Add(param);
            }
            UserCustomAttributes.SetSource(pList);
            UserCustomAttributes.DoLayout();
        }
    Wha am I doing wrong?

    Thank you very much.
    Last edited by Daniil; Nov 19, 2012 at 9:21 AM. Reason: [CLOSED]

Similar Threads

  1. HTML Editor Issue
    By GKG4 in forum 2.x Help
    Replies: 0
    Last Post: May 15, 2012, 6:44 AM
  2. [CLOSED] PropertyGrid with combobox editor
    By Marcelo in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 14, 2012, 11:16 PM
  3. [CLOSED] HTML editor issue in v1.0
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 06, 2011, 2:23 PM
  4. [CLOSED] Issue with propertyGrid params viewstate
    By edigital in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 21, 2011, 6:39 PM
  5. PropertyGrid Big Issue.
    By dr.lam in forum 1.x Help
    Replies: 0
    Last Post: Jul 14, 2009, 11:17 PM

Tags for this Thread

Posting Permissions