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

RadCombo Items.Add or DataSource give better performance

1 Answer 45 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Sanjeev
Top achievements
Rank 1
Sanjeev asked on 03 May 2012, 02:56 PM
Hi,
Can any one please suggest which is better from Performance point of view for RADCombo.
Because after 'googling' I found that my first approach is better for small data lets say 100 or 1000 rows.

Example: Here is link what they discuss
http://forums.asp.net/t/1670292.aspx/1


 

 

Dim Item As RadComboBoxItem

 

 

 

For Each row As DataRow In DataTable.Rows
Item = New RadComboBoxItem

 

Item.Text = row("name").ToString()

Item.Value = row("id").ToString()
Combo.Items.Add(Item)

 

 

Next

OR

Combo.DataSource=DataTable
Combo.DataTextField="name"
Combo.DataValueField="id"
Combo.DataBind()


Thanks,
Sanjeev Kumar

 

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 08 May 2012, 11:41 AM
Hello Sanjeev,

When dealing with large amount of data it is preferable to used the build-in binding mechanism of the RadComboBox.

Regards,
Dimitar Terziev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Sanjeev
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Share this question
or