Forums

Data in repositorylookupedit disappear when click on another row or control

Last post 5/10/2009 12:12 PM by Metal Heart. 5 replies.
Sort Posts: Previous Next
  • Metal Heart

    Data in repositorylookupedit disappear when click on another row or control

    5/8/2009 3:04 PM
    • Not Ranked
    • Joined on 4/23/2009
    • Posts 13

    In my grid, i have a column with repositorylookupedit. I bind data form database to this column. My probelm is the value in repositorylookupedit disappear when i click on another row or another control.

    How can i solve this problem?

    I think it's just a little problem, but i'm a newbie in Dev. Hope for help. Thanks

     

     

  • Brendon Muck [DX Squad]

    Re: Data in repositorylookupedit disappear when click on another row or control

    5/8/2009 11:05 PM
    • Top 10 Contributor
    • Joined on 5/16/2007
    • Buffalo, NY
    • Posts 5,810

    The field that your column is bound to in the GridView should match the field that is set as the EditValue in your LookupEdit. Is this how you have it set up?

    Please do not email me directly for support. Use the Support Center or Community Forums so that everyone may benefit.
  • Metal Heart

    Re: Data in repositorylookupedit disappear when click on another row or control

    5/8/2009 11:37 PM
    • Not Ranked
    • Joined on 4/23/2009
    • Posts 13

    I have read this article http://www.devexpress.com/Support/Center/KB/p/A1023.aspx but the problem didn't solve. I set repositoryItemLookUpRoom.ThrowExceptionOnInvalidLookUpEditValueType = true; and it doesn't thown any exception. And i can get ValueMember of repositorylookupedit.

    Can anyone help me?

  • Metal Heart

    Re: Data in repositorylookupedit disappear when click on another row or control

    5/8/2009 11:45 PM
    • Not Ranked
    • Joined on 4/23/2009
    • Posts 13

    Thank Brendon. But can you show me more detail? The LookupEdit has EditValue property, but the repositorylookupedit doesn't

    Here is my code:

    private void XFrmRoomBooking_Load(object sender, EventArgs e)
            {

                   DAO.RoomDAO roomDAO = new HotelManagement.DAO.RoomDAO(_connectionString);
                emptyRooms = roomDAO.GetRoomByRoomTypeID(roomTypeID);
                repositoryItemLookUpRoom.DisplayMember = "MaPhong";
                repositoryItemLookUpRoom.ValueMember = "PhongID";
                repositoryItemLookUpRoom.Columns.Add(new DevExpress.XtraEditors.Controls.LookUpColumnInfo("MaPhong", "Phòng",             40));
                repositoryItemLookUpRoom.DataSource = emptyRooms;
                repositoryItemLookUpRoom.ThrowExceptionOnInvalidLookUpEditValueType = true;

            }

    Did i miss something?

  • Metal Heart

    Re: Data in repositorylookupedit disappear when click on another row or control

    5/9/2009 3:55 AM
    • Not Ranked
    • Joined on 4/23/2009
    • Posts 13

    Sorry, i forgot one thing. lookupedit column is unbound column. What should i do with CustomUnboundColumnData event. I'm really confused with this event

  • Metal Heart

    Re: Data in repositorylookupedit disappear when click on another row or control

    5/10/2009 12:12 PM
    • Not Ranked
    • Joined on 4/23/2009
    • Posts 13

    My problem is still unsolved. Can anyone suggest me something?

More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.