Radgrid EditFormType="AutoGenerated" 如何获得值

    < radG:RadGrid  ID ="radGridBaseTag"  EnableAJAX ="true"  runat ="server"  AllowPaging ="True"  EnableAJAXLoadingTemplate ="True"  LoadingTemplateTransparency ="15"  OnNeedDataSource ="radGridBaseTag_NeedDataSource"  OnDeleteCommand ="radGridBaseTag_DeleteCommand"  OnInsertCommand ="radGridBaseTag_InsertCommand"  OnUpdateCommand ="radGridBaseTag_UpdateCommand"   >
                
< MasterTableView  AutoGenerateColumns ="False"  CommandItemDisplay ="Top"  DataKeyNames ="ID" >
                    
< Columns >
                        
< radG:GridBoundColumn  DataField ="ID"  HeaderText ="ID"  UniqueName ="ID"  ReadOnly ="true" >
                        
</ radG:GridBoundColumn >
                        
< radG:GridBoundColumn  DataField ="Name"  HeaderText ="Name"  UniqueName ="Name" >
                        
</ radG:GridBoundColumn >
                        
< radG:GridEditCommandColumn ></ radG:GridEditCommandColumn >
                        
< radG:GridButtonColumn  ConfirmText ="Are you sure?"  CommandName ="delete"  Text ="delete" ></ radG:GridButtonColumn >
                    
</ Columns >
                    
< ExpandCollapseColumn  Visible ="False" >
                        
< HeaderStyle  Width ="19px" ></ HeaderStyle >
                    
</ ExpandCollapseColumn >
                    
< RowIndicatorColumn  Visible ="False" >
                        
< HeaderStyle  Width ="20px" ></ HeaderStyle >
                    
</ RowIndicatorColumn >
                    
< EditFormSettings  EditFormType ="AutoGenerated"   ></ EditFormSettings >
                
</ MasterTableView >
                
< PagerStyle  Mode ="NextPrevAndNumeric"   />
            
</ radG:RadGrid >

   protected   void  radGridBaseTag_UpdateCommand( object  source, GridCommandEventArgs e)
    
{
        
int id = (int)e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID"];
        GridEditableItem item 
= e.Item as GridEditableItem;
        GridEditManager editMan 
= item.EditManager;
        GridTextColumnEditor editor 
= editMan.GetColumnEditor("Name"as GridTextColumnEditor;

   protected   void  radGridBaseTag_InsertCommand( object  source, GridCommandEventArgs e)
    
{
        GridEditableItem item 
= e.Item.OwnerTableView.GetInsertItem();
        GridEditManager editMan 
= item.EditManager;
        GridTextColumnEditor editor 
= editMan.GetColumnEditor("Name"as GridTextColumnEditor;

        
string name = editor.Text;

你可能感兴趣的:(form)