protected void dg_SelectedIndexChanged(object sender, EventArgs e) { tGroupsTableAdapter sda = new tGroupsTableAdapter(); DstGroups ds = new DstGroups(); sda.FillByCode(ds.tGroups, int.Parse(dg.SelectedValue.ToString())); txtGroup.Text = ds.tGroups.Rows[0][ds.tGroups.fNameColumn].ToString(); }
private void BindGrid() { tGroupsTableAdapter sda = new tGroupsTableAdapter(); DstGroups ds = new DstGroups(); sda.Fill(ds.tGroups); dg.DataSource = ds.tGroups; dg.DataBind(); }