pick list


Author
Message
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I would like to bind my BO to lookupedit. However, my table has 46000 records. It caused my form take too long to load. Any workaround?

Thank you

Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Chan.

Isn't it the time to use the BrowseDialog for that?

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Chan, it doesn't matter what type of control you are trying to use....46000 records is too many in most cases.  The problem with allowing this many records to come back is one, it will be VERY slow, and two, you could outstrip the resources available on end-user machines.  Your machine probably has more memory than most end-user machines will which will result in out of memory exceptions.

You need to work within the disconnected data environment.  Ivan is right on the money, you need to bring back smaller data sets.  This would be a good place to use the BrowseDialog.

Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Thank you for reply.

I was thinking to use browsedialog. However, my current design is, user can add/edit data in grid. How to have textbox + "..." button inside devexpress xtragrid column? It might able to be done, but not so easy.

I just want to see any alternative way, or I got to change my design.

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
How to have textbox + "..." button inside devexpress xtragrid column?

This is basic functionality of the DevExpress grid.  You will use an embedded text box control and then set the text editor to have the buttons just as though a regular DevExpress text box would be used when dropped on a form.  You can get more information on this through the DevExpress forum or their documentation.

Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have check out devexpress forum and set to use repositoryItemButtonEdit control.

How could I store the selected record PK to my column field and show custom text? I have code as below. However, it always show same value.

        private void ItemrepositoryItemButtonEdit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (this.ItembrowseDialog.ShowDialog() == DialogResult.OK)
            {
                this.purchaseInvoiceDetailsBO.ItemID = itemsBO.ItemID;
            }
        }
        private void ItemrepositoryItemButtonEdit_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.ConvertEditValueEventArgs e)
        {
            if (itemsBO.SeekToPrimaryKey(purchaseInvoiceDetailsBO.ItemID))
            {
                e.Value = itemsBO.ItemCode;
                e.Handled = true;
            }
        }

Please advide. Thank you

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
It looks like youre code is correct, Chan, however, it could be that the handler fell off of your ItemrepositoryItemButtonEdit_CustomDisplayText() method... there should be a ItemrepositoryItemButtonEdit.CustomDisplayText+= new ConvertEditValueEventHandler(ItemrepositoryItemButtonEdit_CustomDisplayText) somewhere in your designer file.  If that delegate combine call (the +=) is not called, then your method will never be called to return the custom text.  You can tell this pretty easily by placing a breakpoint on the e.Value call in that method and see if the breakpoint is ever hit.
Chan
Chan
Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)Advanced StrataFrame User (965 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I managed to make it works. I left one more problem, which the grid column show my PK - GUID data type instead of my custom display text when I click on the button. It would reverted to custom display text if I leave the column.

I have posted this to devexpress, still waiting for answer. Do you know the solution?

Thank you

StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
No, I'm sorry... I don't know the solution.  Obviously, if the text is reverting back to the GUID, then it is not firing your event.  What you could do (which might be easier) is add a custom property to your business object... say a property with only a get{}.  Copy over all of the attributes from the PK property and put them on this new property.  Then, in the grid, bind the column to the new property, not the PK column (and you can just hide the PK column).  Then, in your new property, return your custom text.  This way, it won't ever have to swap back and forth between the PK value and your custom text.  In fact, you won't even have to handle that CustomDisplayText event at all.
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