radiobutton Ϊ datagrid Ä select Ð

  . cs: 
  public void rbSelect_CheckedChanged (object sender, System.EventArgs e) 

  ( 

  RadioButton button; 

  int id = 0; 

  foreach (DataGridItem item in dgList.Items) 

  ( 

  button = (RadioButton) item.FindControl ( "rbSelect"); 
  if (button.Checked) 

  ( 
  id = item.ItemIndex; 

  ) 
  ) 
  Session [ "CorporationName"] = this.dgList.Items [id]. Cells [3]. Text.ToString (); 

  ) 

html:
  <ItemTemplate> <Asp: RadioButton id = "rbSelect" runat = "server" CssClass = "RadioButton" 
  OnCheckedChanged = "rbSelect_CheckedChanged" 
  GroupName = "Select" AutoPostBack = "True"> 
  </ asp: RadioButton> 
  </ ItemTemplate> 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • DZone
  • Netvouz
  • NewsVine
  • Technorati

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Tags: