This is a migrated thread and some comments may be shown as answers.

Setting value of GridViewComboBoxColumn (bounded) through code

1 Answer 137 Views
GridView
This is a migrated thread and some comments may be shown as answers.
mr_iq73
Top achievements
Rank 1
mr_iq73 asked on 25 Apr 2010, 03:33 AM
I'm using RadGridView in unbound mode. I've added a GridViewComboBoxColumn (bounded) at design time.
Now I want to fill that grid with the data from a database table. I'm using the RadGridView.Rows.AddNew()  
method. When I try to set the value of this column using RadGridView.Rows[index].value i generate an exception
objec reference not set. What is the solution o tthis problem?

1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 29 Apr 2010, 08:59 AM
Hello mr_iq73,

To load data from DataTable you must set the DataSource property of RadGridView control. Do not use the AddNew() method for this scenario. Please review this topic in our online help.

A bit off topic, please ask the person who has purchased our controls in your company to add you as a License Developer to the purchase. This will give you full access to the products your company has purchased, to our downloads section, and to our support ticketing system. Additionally, all your questions will be reviewed according to the license you have. More information on License Developers you can find here: www.telerik.com/account/faqs.aspx.
 
 
Regards,
Julian Benkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
mr_iq73
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or