Custom Field property c# - getting the table based bo to see the column


Author
Message
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
w00t

I'm missing something basic.  I have a CFP. Is there anything wrong with this? ( the four columns referenced are part of the BO )

After this BO is populated from a browsedialog, should I see a mykey column populated as shown below? 

If not, what do I have to do to make that happen? 



     #region Custom Field Properties

        [Description("mykey"), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
        public string mykey
            {
            get
                {
                string _mykey = this.Symbol + this.Cntry_code + this.from_date.ToString() + this.thru_date.ToString();
                return _mykey;
                }      
            }

        /// <summary>
        /// Provider property descriptors for the custom bindable fields
        /// </summary>
        protected override FieldPropertyDescriptor[] GetCustomBindablePropertyDescriptors()
            {
            //-- Return the array of property descriptors
            return new MicroFour.StrataFrame.Business.FieldPropertyDescriptor[]
            { new ReflectionPropertyDescriptor("mykey", typeof(boiSource100Symbology))};
            }
        #endregion
        }

Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Charles,

Sorry, but I don't see anything wrong with the CFP.  Check your Browser Dialog, it should work straight forward.

Edhy Rijo

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
The problem I'm seeing is that my currentview for the BO does not have the mykey column.  I thought creating the CFP would create that column in the view??
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Charles R Hankey (2/2/2012)
The problem I'm seeing is that my currentview for the BO does not have the mykey column.  I thought creating the CFP would create that column in the view??

It should have the CFP.  Put a break in the CFP Get and see what are the values of  this.Symbol, this.Cntry_code,  this.from_date.ToString() and  this.thru_date.ToString()
If you don't get any value, see if the BO has any record, if so, try using this.CurrentRow.Item("Symbol") instead of the property.

Edhy Rijo

Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
Thanks, Eddy,  I think I'll try the Currentrow thing as I seem to remember that was the way to make it work ( boy it's been a long time since i did serious SF )
Charles R Hankey
Charles R Hankey
Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)Advanced StrataFrame User (764 reputation)
Group: Forum Members
Posts: 524, Visits: 30K
PLEASE !

I have a CFP, mykey.  It works fine.  The bo sees when I use it for the the browse dialog.  When I fill the bo from the browse dialog and requery my listview the column mykey is there with the proper values.

The mykey property is there on the BO with the proper value.

BUT there is no column in the datatable, the currentdatatable or the tableview, so I cannot navigate in the business object to the row with the value I seek in mykey.  (Again, I am trying to navigate in the BO based on moving in the listview.  Like autonavigate except I can't use that here as it wan't a PK and this bo has a 4 column compound pk which is why i am doing this in the first place)

If I base my BO on a view,  so I can manufacture the column, how do I use the BO for CRUD? 

I imagine I could use getenumerable and iterate the BO looking for the property, but that seems pretty ugly.

Is there are good place to slap an additional column on the BO right after it instantiates so the CFP has a place to put the data?

Danny Doobay
Danny Doobay
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search