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

error with needdatasource

1 Answer 87 Views
Grid
This is a migrated thread and some comments may be shown as answers.
aditi
Top achievements
Rank 1
aditi asked on 22 Oct 2008, 05:56 PM
Hi,

The following line shows me an error  that the number of arguments donot match.

this

.RadGrid1.NeedDataSource+=new Telerik.WebControls.GridNeedDataSourceEventHandler(this.RadGrid1_NeedDataSource);

what is wrong with the above line?

Thank you.

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Oct 2008, 04:28 AM
Hi Aditi,

I tried adding the NeedDataSource event handler on my end and it is working as expected.

CS:
protected void Page_Load(object sender, EventArgs e) 
    { 
        RadGrid2.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid2_NeedDataSource); 
    } 
 
    protected void RadGrid2_NeedDataSource(object source, GridNeedDataSourceEventArgs e) 
    { 
        RadGrid2.DataSourceID = "SqlDataSource1"
    } 


Thanks
Shinu.
Tags
Grid
Asked by
aditi
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or