---
title: "Error on binding the grid with a list"  
description: "Error on binding the grid with a list"  
author: "Mark Devid"  
published: 2014-08-26  
updated: 2014-08-26  
canonical: https://www.mindstick.com/forum/2151/error-on-binding-the-grid-with-a-list  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Error on binding the grid with a list

```
List<business.clspluginsprp> objprp = new List<business.clspluginsprp>();business.clsplugins obj = new business.clsplugins();for (Int32 i = 0; i < k.Length; i++){   Int32 z =Convert.ToInt32(k.GetValue(i));  
objprp.Add(obj.fnd_plugins(z));}GridView2.DataSource = objprp;GridView2.DataBind();
```

An [error](https://yourviews.mindstick.com/view/88527/fixing-quickbooks-error-4120-reinstalling-vs-repairing) arrived which is as:

The best overloaded [method](https://www.mindstick.com/forum/166/webservice-method) [match](https://www.mindstick.com/forum/159713/regex-match-attribute-in-an-html-code) for 'System.Collections.Generic.List.Add(business.clspluginsprp)' has some invalid [arguments](https://answers.mindstick.com/qa/92535/what-are-the-different-types-of-arguments) while the other error is : Argument 1: [cannot convert](https://www.mindstick.com/forum/12809/error-cannot-convert-from-object-to-string-when-filling-a-asp-dropdownlist-dynamically) from 'System.Collections.Generic.List' to 'business.clspluginsprp'

## Replies

### Reply by Sumit Kesarwani

Hi Mark, \

Try changing this:

objprp.Add(obj.fnd_plugins(z));

to this:

objprp.AddRange(obj.fnd_plugins(z));

Since it seems fnd_plugins returns a list in and of itself. This will also error if fnd_plugins does not return a List generic implementation. Posting the signature of fnd_plugins will help debug this.


---

Original Source: https://www.mindstick.com/forum/2151/error-on-binding-the-grid-with-a-list

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
