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

Add New Record functions

1 Answer 170 Views
Grid
This is a migrated thread and some comments may be shown as answers.
soo
Top achievements
Rank 1
soo asked on 23 Apr 2008, 05:50 AM
Hi,

May i know what is the function calling by InitInsertButton when we click on it?

if(e.Item is GridCommandItem)
{
    LinkButton LinkButton1 = e.Item.FindControl("InitInsertButton");
    LinkButton1.Enabled = false;
    LinkButton LinkButton2 = e.Item.FindControl("RebindGridButton");
    LinkButton2.Enabled = false;
}

I want to know its function name so that i can call it again after i successful inserted a new row, and allows me to insert new item again wihout click on the "add new record" link.

Please help.

Thanks.

Regards,
Soo

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Apr 2008, 12:20 PM
Hi Soo,

The CommandName For the AddNewRecord button is InitInsert and of Insert button is PerformInsert.

CS:
 protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)  
    {   
      //On clicking the AddNewRecord button  
        if (e.CommandName == "InitInsert")  
        {   
          
        }  
      //On clicking the Insert button   
        if (e.CommandName == "PerformInsert")  
        {   
          
        }  
   } 


Princy.
Tags
Grid
Asked by
soo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or