in
Forums
Blogs
DevExpress.com
Client Center
Support Center
DevExpress Channel

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
  • 5/8/2009 3:04 PM

    Data in repositorylookupedit disappear when click on another row or control

    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

     

     

  • 5/8/2009 11:05 PM In reply to

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

    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?

  • 5/8/2009 11:37 PM In reply to

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

    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?

  • 5/8/2009 11:45 PM In reply to

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

    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?

  • 5/9/2009 3:55 AM In reply to

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

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

  • 5/10/2009 12:12 PM In reply to

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

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

Copyright © 1998-2010 Developer Express Inc.
ALL RIGHTS RESERVED