how to get selected values of one grid to another grid in same winform ?
this is what I have but this is a grid to another Checkboxlist. I transformed the checkboxlist in a Radgrid in the ASPX but I dont know what I have to change in the CS Code.
protected void ButtonALL_OnClick(object sender, EventArgs e)
{
ButtonALL.BackColor = System.Drawing.Color.PaleGreen;
ButtonALL.BorderColor = System.Drawing.Color.Green;
ButtonALL.ForeColor = System.Drawing.Color.Black;
if (ButtonALL.Text == "Update")
{
ButtonALL.Text = "Updated";
}
else
{
ButtonALL.Text = "Update";
}
foreach (GridItem item in ChangedList.MasterTableView.Items)
{
GridDataItem dataitem = (GridDataItem)item;
TableCell cell = dataitem["GridClientSelectColumn"];
CheckBoxList checkBox = (CheckBoxList)cell.Controls[0];
if (.Checked)
{
string value = dataitem.GetDataKeyValue("Logging_ID").ToString();
string text = dataitem.GetDataKeyValue("ModuleName").ToString() + ", " + dataitem.GetDataKeyValue("AssemblyVersion").ToString();
}
DataTable dt = new DataTable();
dt.Columns.Add("AssemblyVersion", typeof(string));
dt.Columns.Add("ModuleName", typeof(int));
DataRow dr = dt.NewRow();
dr = dt.NewRow();
dt.Rows.Add(dr);
Updatelist.DataSource = dt;
Updatelist.DataBind();
}
pnlNoItems.Visible = (Updatelist.Items.Count == 0);
pnlTarget.Visible = !pnlNoItems.Visible;
}
Aucun commentaire:
Enregistrer un commentaire