how to hide column from RepositoryItemLookUpEdit
  • hi all i have two column in my cheques table ChequeStatusId and ChequeStatus and i want to fill repository in gridview but when i hide id column so repository not showing in column my code is below please check it.





    repositoryCOACode = New RepositoryItemLookUpEdit
    repositoryCOACode.DataSource = dset.Tables("ChequeStatus")
    repositoryCOACode.DisplayMember = "ChequeStatus"
    repositoryCOACode.ValueMember = "ChequeStatusId"
    repositoryCOACode.ShowFooter = False
    repositoryCOACode.NullText = ""
    repositoryCOACode.Columns("colChequeStatusId").Visible = False

    repositoryCOACode.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
    GridControlJVDetail.RepositoryItems.Add(repositoryCOACode)
    TryCast(GridControlJVDetail.MainView, GridView).Columns.ColumnByName("colStatus").ColumnEdit = repositoryCOACode
  • 1 Comment sorted by
  • Vote Up0Vote Down ithackerithacker
    117.50 Karma Accepted Answer
    hi you try below code for show or hide column in repository




    repositoryCOACode = New RepositoryItemLookUpEdit
    repositoryCOACode.DataSource = dset.Tables("ChequeStatus")
    repositoryCOACode.DisplayMember = "ChequeStatus"
    repositoryCOACode.ValueMember = "ChequeStatusId"
    repositoryCOACode.ShowFooter = False
    repositoryCOACode.NullText = ""
    'repositoryCOACode.Columns("colChequeStatusId").Visible = False
    'Ordering Columns in Repository Item Lookup Edit
    repositoryCOACode.Columns.AddRange(New DevExpress.XtraEditors.Controls.LookUpColumnInfo() {New DevExpress.XtraEditors.Controls.LookUpColumnInfo("ChequeStatusId", "ChequeStatusId", 15, DevExpress.Utils.FormatType.Numeric, "", False, DevExpress.Utils.HorzAlignment.Far, DevExpress.Data.ColumnSortOrder.None), New DevExpress.XtraEditors.Controls.LookUpColumnInfo("ChequeStatus", "Cheque Status", 50, DevExpress.Utils.FormatType.None, "", True, DevExpress.Utils.HorzAlignment.Near)})
    repositoryCOACode.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
    GridControlJVDetail.RepositoryItems.Add(repositoryCOACode)
    TryCast(GridControlJVDetail.MainView, GridView).Columns.ColumnByName("colStatus").ColumnEdit = repositoryCOACode

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Tagged

Popular Posts of the Week

Top Posters Weekly

Optimum Creative