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

How to access the value of "Add New Record" textbox?

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Aamir
Top achievements
Rank 1
Aamir asked on 22 Oct 2013, 08:27 PM
I want to access the value of the inserted item, actually i want to create a folder by the same name programmatically after pressing insert.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Oct 2013, 04:08 AM
Hi Aamir,

I guess you want to get the values inserted to the RadGrid,you can obtain this in the InsertCommand of the radgrid,when using manual CRUD operation

C#:
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
   {          
     try
       {             
        GridEditableItem insert= (GridEditableItem)e.Item; 
        TextBox txt = (TextBox)insert["ID"].Controls[0];// Access BoundColumn        
        string id=txt.Text; //Get the value    
        DropDownList drop = (DropDownList)insert.FindControl("DropDownList1"); // Access Template column DropDownList
        string val = drop.SelectedValue;    //Selected value         
        //Your Code
        }
     catch (Exception ex)
        {
        }      
   }

Thanks,
Princy

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