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

ExternalButtonclick

2 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Allen
Top achievements
Rank 1
Allen asked on 06 Oct 2012, 08:40 AM
Hi

I got a situation here where I want to add records in radgrid on external button click. Any ideas?? pleas share

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 06 Oct 2012, 08:42 AM
Hello,

// Your External button Click event
    protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.MasterTableView.IsItemInserted = true;
 
        // If you assigned datasource using NEEDDATASOURCE EVENT
        RadGrid1.Rebind();
 
        //ELSE
 
        RadGrid1.DataSource = ""; // Assign your data source here
        RadGrid1.DataBind();
    }


Thanks,
Jayesh Goyani
0
Shinu
Top achievements
Rank 2
answered on 06 Oct 2012, 08:53 AM
Hi,

Please try the following code snippet.

C#:
protected void button1_Click(object sender, EventArgs e)
{
    RadGrid1.MasterTableView.IsItemInserted = true;
    RadGrid1.Rebind();
}

Thanks,
Shinu.
Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
Share this question
or