TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dinesh Kudale
1.3k
127
17.7k
DevExpress Gridcontrol shows empty column...
Sep 19 2019 8:04 AM
DevExpress Gridcontrol shows empty column after adding repositoryItemLookUpEdit.
I have created windows VB.Net application using 'Visual Studio Express 2015 for windows' with .Net Framework 4.6. In that I have used Devexpress 19.1.6.0 Gridcontrol on the form. I want to bind Student details to gridcontrol. In 'Name' column of gridview, I want to show combobox to select any Name to update particular cell.
For that purpose I have used repositoryItemLookUpEdit.
'Name' column must contain Name of sutdent. But when I will run the program, then 'Name' column shows empty cells. Why? How to overcome this issue?
Also If I will implement same program Without using repositoryItemLookUpEdit, then all column's correct data will get bind to the gridview and 'Name' column will also not showing empty.
Form1.vb
Imports System.Data.SqlClient
Public Class Form1
Dim cn As SqlConnection = New SqlConnection(
"Data Source=PC161\SQLEXPRESS;Database=Student;Integrated Security=true"
)
Dim da As New SqlDataAdapter
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LoadGrid()
End Sub
Private Function FetchAllDetails() As DataTable
Dim dt As New DataTable
da = New SqlDataAdapter(
"select * from StudentInfo"
, cn)
da.Fill(dt)
Return dt
End Function
Private Function FetchIdName() As DataTable
Dim dt As New DataTable
da = New SqlDataAdapter(
"select ID, NAME from StudentInfo"
, cn)
da.Fill(dt)
Return dt
End Function
Private Sub LoadGrid()
Try
GridControl1.DataSource = FetchAllDetails()
RepositoryItemLookUpEdit1.DataSource = FetchIdName()
RepositoryItemLookUpEdit1.ValueMember =
"ID"
RepositoryItemLookUpEdit1.DisplayMember =
"NAME"
RepositoryItemLookUpEdit1.NullText =
""
RepositoryItemLookUpEdit1.PopulateColumns()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class
In-place Editor Repository option to add RepositoryItemLookupEdit
Added columns after click on Run Design option on Gridcontrol
Form1_Design
Output window after click on cell
Output_after_running_the_project
Reply
Answers (
2
)
if disabled class used but not woked
How to remove domain name from img src in html?