本文整理汇总了C#中ASPxGridView.DataBind方法的典型用法代码示例。如果您正苦于以下问题:C# ASPxGridView.DataBind方法的具体用法?C# ASPxGridView.DataBind怎么用?C# ASPxGridView.DataBind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ASPxGridView
的用法示例。
在下文中一共展示了ASPxGridView.DataBind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RefreshGrid
private void RefreshGrid(ASPxGridView gv)
{
GridViewDataComboBoxColumn c = (GridViewDataComboBoxColumn)gv.Columns["IdentifTecno"];
c.PropertiesComboBox.TextField = "Name";
c.PropertiesComboBox.ValueField = "IdentifTecno";
c.PropertiesComboBox.DataSource = Business.TecnologiaSoporte.ReadAll("");
gv.DataSource = Business.MediosPublicitarios.ReadAllTipo("");
gv.DataBind();
}
示例2: gridProductDetailsAddInCallback
/// <summary>
/// Xử lý khi Save Callback kết thúc
/// </summary>
/// <param name="result">kết quả trả về khi callback xong</param>
/// <param name="param">tham số e.Parameter của Callback Event</param>
/// <param name="tblTemp">Tên bảng cần xóa dữ liệu tạm sau khi callback xong. Chỉ dành cho trường hợp lưu thành công</param>
/// <param name="sessionname">Tên session lưu giữ sessionkey của bảng temp</param>
///
public static void gridProductDetailsAddInCallback(string parameter, ASPxGridView gv)
{
object tempID = -1;
if (parameter.StartsWith("reorderlevel"))
{
object typeReorder = parameter.Split(';')[1];
tempID = parameter.Split(';')[2];
if (tempID != null)
{
EU.SALE_temp_reorderLevel(tempID, typeReorder);
//LogAction(4, tempID + ";ReorderLevel :" + parameter);
//throw new Exception("gridProductDetailsAddInCallback;" + tempID + ";param:" + parameter);
}
}
gv.DataBind();
}
示例3: RefreshAbmGrid
private void RefreshAbmGrid(ASPxGridView gv)
{
var lineas = Lineas;
lineas = lineas.OrderBy(p => p.Dia).ThenBy(r => r.Hora).ThenBy(s => s.Salida).ToList();
gv.DataSource = lineas;
gv.DataBind();
}
示例4: RefreshAbmGrid
private void RefreshAbmGrid(ASPxGridView gvABM)
{
gvABM.DataSource = Productos;
gvABM.DataBind();
}
示例5: RefreshGrid
private void RefreshGrid(ASPxGridView gv)
{
gv.DataSource = CRUDHelper.ReadAll("", BusinessMapper.GetDaoByEntity(Entity));
gv.DataBind();
}
示例6: EndEditing
protected override void EndEditing(ASPxGridView gridView, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true;
gridView.CancelEdit();
gridView.DataBind(gridView.DataSource as XPCollection);
}
示例7: RefreshHomeGrid
private void RefreshHomeGrid(ASPxGridView gvHome)
{
//cargar con pautas
gvHome.DataSource = mycert;
gvHome.DataBind();
}
示例8: RefreshAbmGrid
private void RefreshAbmGrid(ASPxGridView gv)
{
var lineas = new List<CertificadoDetDTO>();
if (mycert != null)
{
mycert = mycert.OrderBy(t => t.Dia).ThenBy(u => u.Hora).ThenBy(v => v.Salida).ToList();
}
lineas = mycert;
lineas = lineas.OrderBy(t => t.Dia).ThenBy(u => u.Hora).ThenBy(v => v.Salida).ToList();
gv.DataSource = lineas;
gv.DataBind();
}
示例9: LoadSearch
private void LoadSearch(int _type, int _status, ASPxGridView grv)
{
try
{
if (idGroup != 1 && idGroup != 2 && idGroup != 4 && idGroup != 10 && idGroup != 14)
{
var listPlus = (from a in db.PROFILE_NEWs where a.USER_ID == idUser select a)
.Union(from a in db.PROFILE_NEWs
join b in db.WORKFLOW_USERs on a.ID equals b.PROF_ID
where b.USER_ID == idUser
select a).OrderByDescending(n => n.PROF_DATE);
if (listPlus.Count() > 0)
{
if (_status == 0)
{
var listNew = listPlus.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS != 12 );
grv.DataSource = listNew;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listNew.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listNew.Count(n => n.PROF_STATUS == 12);
}
else
{
var listNew = listPlus.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS == 12 );
grv.DataSource = listNew;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listNew.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listNew.Count(n => n.PROF_STATUS == 12);
}
}
else
{
if (_status == 0)
{
var listDom = db.PROFILE_NEWs.Where(n => n.USER_ID == idUser && n.PROF_TYPE == _type && n.PROF_STATUS != 12).OrderByDescending(n => n.PROF_DATE);
grv.DataSource = listDom;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listDom.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listDom.Count(n => n.PROF_STATUS == 12);
}
else
{
var listDom = db.PROFILE_NEWs.Where(n => n.USER_ID == idUser && n.PROF_TYPE == _type && n.PROF_STATUS == 12).OrderByDescending(n => n.PROF_DATE);
grv.DataSource = listDom;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + listDom.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + listDom.Count(n => n.PROF_STATUS == 12);
}
}
}
else
{
if (_status == 0)
{
var list = db.PROFILE_NEWs.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS != 12).OrderByDescending(n => n.PROF_DATE);
grv.DataSource = list;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + list.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + list.Count(n => n.PROF_STATUS == 12);
}
else
{
var list = db.PROFILE_NEWs.Where(n => n.PROF_TYPE == _type && n.PROF_STATUS == 12).OrderByDescending(n => n.PROF_DATE);
grv.DataSource = list;
grv.DataBind();
Session["DangTienHanh"] = Utils.CIntDef(Session["DangTienHanh"]) + list.Count(n => n.PROF_STATUS != 12);
Session["DaHoanThanh"] = Utils.CIntDef(Session["DaHoanThanh"]) + list.Count(n => n.PROF_STATUS == 12);
}
}
}
catch //(Exception)
{
//throw;
}
}
示例10: RefreshGrid
private void RefreshGrid(ASPxGridView gv)
{
gv.DataSource = CRUDHelper.ReadAll("", DAO);
gv.DataBind();
}
示例11: RefreshAbmGrid
private void RefreshAbmGrid(ASPxGridView gvABM)
{
gvABM.DataSource = Atencion;
gvABM.DataBind();
}
示例12: RefreshGrid
private void RefreshGrid(ASPxGridView gridView)
{
if (gridView.ID == "gv")
gridView.DataSource = Business.Costos.ReadAll("");
else
if (pnlVersiones.Attributes["RecId"] != null)
gvVersiones.DataSource = Business.Costos.ReadAllVersiones(Business.Costos.Read(Convert.ToInt32(pnlVersiones.Attributes["RecId"])));
gridView.DataBind();
}
示例13: RefreshAbmGrid
private void RefreshAbmGrid(ASPxGridView gvABM)
{
if (gvABM.ID == "gvABMFrecuencia")
gvABM.DataSource = CostosFrecuencia;
else
gvABM.DataSource = CostosProveedor;
gvABM.DataBind();
}
示例14: RefreshGrid
private void RefreshGrid(ASPxGridView gv)
{
gv.DataSource = Business.TecnologiaSoporte.ReadAll("");
gv.DataBind();
}
示例15: gridCallBackOption
//.........这里部分代码省略.........
{
for (int i = 0; i < listid.Count; i++)
{
SiAuto.Main.LogColored(System.Drawing.Color.Purple, "key so :" + i.ToString() + "----" + listid[i]);
string currentCode = "isDeleted=1 AND " + grid.KeyFieldName + "=" + listid[i];
bool check = EU.CheckByModuleD(globalModuleID, currentCode);
if (check == true)
{
string rowDeleted = EU.deleteMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", listid));
listKeyValueOK.Add(listid[i]);
}
}
if (listKeyValueOK.Count > 0)
{
WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "DELETED", string.Join(";", listKeyValueOK));
listKeyValueOK.Clear();
}
}
else
{
object currentFocused = grid.GetRowValues(grid.FocusedRowIndex, grid.KeyFieldName);
if (currentFocused != null)
{
string currentCode = "isDeleted=1 AND " + grid.KeyFieldName + "=" + currentFocused.ToString();
bool check = EU.CheckByModuleD(globalModuleID, currentCode);
if (check == true)
{
string rowDeleted = EU.deleteMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", currentFocused.ToString()));
if (int.Parse(rowDeleted) > 0)
{
SiAuto.Main.LogColored(Color.Green, "Chuan bi workflow DELETED");
WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "DELETED", currentFocused.ToString());
SiAuto.Main.LogColored(Color.Green, "End workflow DELETED");
SiAuto.Main.LogColored(Color.Green, "ghi vao tray - bảng SY_audit_trail DELETED");
UserUtils.Log(CU.getLoginID(), globalModuleID, -1, int.Parse(currentFocused.ToString()), "", "Xóa thành công !", "DELETED");
SiAuto.Main.LogColored(Color.Green, "end tray DELETED");
}
}
}
}
}
else if (param.IndexOf("RestoreSelect") >= 0)
{
List<object> listid = grid.GetSelectedFieldValues(new string[] { grid.KeyFieldName });
if (listid.Count > 0)
{
for (int i = 0; i < listid.Count; i++)
{
SiAuto.Main.LogColored(System.Drawing.Color.Purple, "key so :" + i.ToString() + "----" + listid[i]);
string currentCode = "isDeleted=0 AND " + grid.KeyFieldName + "=" + listid[i];
bool check = EU.CheckByModuleD(globalModuleID, currentCode);
if (check == true)
{
string rowDeleted = EU.restoreMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", listid));
listKeyValueOK.Add(listid[i]);
}
}
if (listKeyValueOK.Count > 0)
{
WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "RESTORED", string.Join(";", listKeyValueOK));
listKeyValueOK.Clear();
}
}
else
{
object currentFocused = grid.GetRowValues(grid.FocusedRowIndex, grid.KeyFieldName);
if (currentFocused != null)
{
string currentCode = "isDeleted=0 AND " + grid.KeyFieldName + "=" + currentFocused.ToString();
bool check = EU.CheckByModuleD(globalModuleID, currentCode);
if (check == true)
{
string rowDeleted = EU.restoreMultiTblScript(globalModuleID, grid.KeyFieldName, string.Join(",", currentFocused.ToString()));
if (int.Parse(rowDeleted) > 0)
{
SiAuto.Main.LogColored(Color.Green, "Chuan bi workflow RESTORED");
WorkFlowManager.BuildTaskByWhenExecute(globalModuleID, "RESTORED", currentFocused.ToString());
SiAuto.Main.LogColored(Color.Green, "End workflow RESTORED");
SiAuto.Main.LogColored(Color.Green, "ghi vao tray - bảng SY_audit_trail RESTORED");
UserUtils.Log(CU.getLoginID(), globalModuleID, -1, int.Parse(currentFocused.ToString()), "", "Phục hồi thành công !", "RESTORED");
SiAuto.Main.LogColored(Color.Green, "end tray RESTORED");
}
}
}
}
}
grid.DataBind();
if (myCookie != null) Response.Cookies.Set(myCookie);
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}
}