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
Bineesh Viswanath
NA
1k
775.3k
Telerik Virtual Grid Displays "Table" in GridView
Jan 16 2017 6:44 AM
Sir,
I am in work to load a huge amount of data into gridview in windows form.
I using Telerik radGridView for this.
Data is coming into dataset and the remaining work is only to display in proper order.
My code is :-
SqlConnection sqlCon = new SqlConnection(strCon);
sqlCon.Open();
SqlCommand cmd = new SqlCommand("SearchCustomerbyMobile", sqlCon);
cmd.Parameters.Add("@asMobile", SqlDbType.NVarChar).Value = tbxMobileNo.Text;
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
adapter.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
this.dgvActiveCustomer.CellValueNeeded += new GridViewCellValueEventHandler(dgvActiveCustomer_CellValueNeeded);
this.dgvActiveCustomer.CellValuePushed += new GridViewCellValueEventHandler(dgvActiveCustomer_CellValuePushed);
dgvActiveCustomer.VirtualMode = true;
dgvActiveCustomer.ColumnCount = ds.Tables[0].Columns.Count;
this.dgvActiveCustomer.RowCount = ds.Tables[0].Rows.Count;
moBileDs = ds;
}
And in CellValueNeed event I worte like this:-
private void dgvActiveCustomer_CellValueNeeded(object sender, Telerik.WinControls.UI.GridViewCellValueEventArgs e)
{
e.Value = moBileDs.Tables[0];
}
Result ="Table" in entire rows and columns in the gridview.
Reply
Answers (
1
)
How to convert web project v s 2008 to v s 2013
In a valid data source must either be deployed IEnumerable I