Getting the selected item:
protected void approvalsubmit_Click(object sender, EventArgs e)
{
foreach (GridViewRow gvrow in orderapproved.Rows)
{
//CheckBox chkChild = (CheckBox)gvrow.FindControl("chkChild");
CheckBox chkChild = (CheckBox)gvrow.FindControl("chkChild");
if (chkChild.Checked == true)
{
string skucode = gvrow.Cells[10].Text;
Guid chid = new Guid();//Guid.Empty();
chid = new Guid(skucode);
ColumnSet colu = new ColumnSet(true);
var orderdetails = service.Retrieve("salesorder", chid, colu);
orderdetails["new_venderorderstatus"] = "Accepted";
service.Update(orderdetails);
}
}
for pagination:
give the coding in c # :
protected void ordershipped_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
ordershipped.PageIndex = e.NewPageIndex;
ordershipped.DataBind();
}
<asp:GridView ID="ordershipped" runat="server" AllowPaging="True"
OnPageIndexChanging="ordershipped_PageIndexChanging">
getting radgrid data:
foreach (Telerik.Web.UI.GridDataItem dataItem in grdCUGPublic0.MasterTableView.Items)// grd.MasterTableView.Items)
{
if (((CheckBox)dataItem.FindControl("Chk1")).Checked == true)
{
// Int32 ID = (Int32)dataItem.GetDataKeyValue("ID");
Int32 ID = Convert.ToInt32(dataItem.GetDataKeyValue("Mobile Number"));
//return ID;
}
}
No comments:
Post a Comment