本文整理匯總了C#中ASPxGridView類的典型用法代碼示例。如果您正苦於以下問題:C# ASPxGridView類的具體用法?C# ASPxGridView怎麽用?C# ASPxGridView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ASPxGridView類屬於命名空間,在下文中一共展示了ASPxGridView類的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: InitDetailsAndPageHeader
void InitDetailsAndPageHeader(ASPxGridView aspxGridView1)
{
ReadOnlyCollection<GridViewDataColumn> groupedColumns = aspxGridView1.GetGroupedColumns();
int pagewidth = (report.PageWidth - (report.Margins.Left + report.Margins.Right)) - groupedColumns.Count * subGroupOffset;
List<ColumnInfo> columns = GetColumnsInfo(aspxGridView1, pagewidth);
CustomizeColumnsCollection(report, new ColumnsCreationEventArgs(pagewidth) { ColumnsInfo = columns });
report.Bands.Add(new DetailBand() { HeightF = bandHeight });
report.Bands.Add(new PageHeaderBand() { HeightF = bandHeight });
XRTable headerTable = new XRTable();
XRTableRow row = new XRTableRow();
XRTable detailTable = new XRTable();
XRTableRow row2 = new XRTableRow();
for (int i = 0; i < columns.Count; i++)
{
if (columns[i].IsVisible)
{
XRTableCell cell = new XRTableCell();
cell.Width = columns[i].ColumnWidth;
cell.Text = columns[i].FieldName;
row.Cells.Add(cell);
XRTableCell cell2 = new XRTableCell();
cell2.Width = columns[i].ColumnWidth;
ControlCustomizationEventArgs cc = new ControlCustomizationEventArgs() { FieldName = columns[i].FieldName, IsModified = false, Owner = cell2 };
CustomizeColumn(report, cc);
if (cc.IsModified == false)
cell2.DataBindings.Add("Text", null, columns[i].FieldName);
detailsInfo.Add(columns[i].GridViewColumn, cell2);
row2.Cells.Add(cell2);
}
}
headerTable.Rows.Add(row);
headerTable.Width = pagewidth;
headerTable.LocationF = new PointF(groupedColumns.Count * subGroupOffset, 0);
headerTable.Borders = BorderSide.Bottom;
detailTable.Rows.Add(row2);
detailTable.LocationF = new PointF(groupedColumns.Count * subGroupOffset, 0);
detailTable.Width = pagewidth;
report.Bands[BandKind.PageHeader].Controls.Add(headerTable);
report.Bands[BandKind.Detail].Controls.Add(detailTable);
}
示例3: MostrarResultadoOperacionBd
public static void MostrarResultadoOperacionBd(ref ASPxGridView grilla, string texto, bool resultado)
{
var color = COLOR_RESULTADO_MAL;
if ((resultado))
color = COLOR_RESULTADO_BIEN;
grilla.Controls.Add(new LiteralControl(string.Format("<span style='color:{0}; font-weight:bold; width:100%; text-align:center;'>{1}</span>", color, texto)));
}
示例4: GridApplyTheme
public static void GridApplyTheme(ASPxGridView Grid, string theTheme)
{
Grid.CssFilePath = "~/App_Themes/Glass/{0}/styles.css";
Grid.CssPostfix = "Glass";
Grid.Styles.CssFilePath = "~/App_Themes/Glass/{0}/styles.css";
Grid.Styles.CssPostfix = "Glass";
Grid.Styles.Header.SortingImageSpacing = 5;
}
示例5: LayoutMasterDetail
ASPxSplitter LayoutMasterDetail(Control detailControl, ASPxGridView gridView, IModelSplitLayout splitLayout) {
ASPxSplitter splitter = CreateSplitter(splitLayout, PaneResized(gridView));
var listPane = CreateSplitterListPane(splitter);
listPane.Controls.Add(gridView);
var callbackPanel = CreateSplitterDetailPane(splitter);
callbackPanel.Controls.Add(detailControl);
return splitter;
}
示例6: GridColDesign
public void GridColDesign(ASPxGridView gridView, string fieldName, string Caption, int Width , int Index, bool isVisible)
{
GenerateGridParams GridSetup;
GridSetup = new GenerateGridParams(fieldName);
GridSetup.Caption = Caption;
GridSetup.Width = Width;
GridSetup.Visible = isVisible;
GridSetup.Index = Index;
gridView.cxGenerateGrid(GridSetup);
}
示例7: DeleteFile
public void DeleteFile(ASPxGridView gv, DevExpress.Web.Data.ASPxDataDeletingEventArgs e)
{
try{
string path = gv.GetRowValuesByKeyValue(e.Keys[0], "Path").ToString();
File.Delete(Server.MapPath(path));
}
catch (Exception)
{
}
}
示例8: GetEditFormComboValue
/// <summary>
/// Searchs for combo by FindEditFormTemplateControl and returns selected value
/// </summary>
/// <param name="grid"></param>
/// <param name="controlName"></param>
/// <returns></returns>
public static object GetEditFormComboValue(ASPxGridView grid, string controlName)
{
ASPxComboBox cbo = (ASPxComboBox)grid.FindEditFormTemplateControl(controlName);
if (cbo != null)
if (cbo.SelectedItem == null)
return null;
else
return cbo.SelectedItem.Value;
return null;
}
示例9: GenerateGrid
public void GenerateGrid(ASPxGridView grid, GenerateGridParams generateGridParams)
{
//if (sender == null) return;
//var grid = sender as ASPxGridView;
//if (grid == null) return;
//var grid = ((ASPxGridView)sender);
var fieldname = grid.Columns[generateGridParams.FieldName];
fieldname.Visible = generateGridParams.Visible;
fieldname.Width = generateGridParams.Width;
fieldname.Caption = generateGridParams.Caption;
fieldname.Index = generateGridParams.Index;
}
示例10: SetupGridView
public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
_gridView = gridView;
gridView.SettingsBehavior.AllowFocusedRow = true;
gridView.Load += (s, e) => OnFocusedObjectChanged();
gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
gridView.ClientSideEvents.FocusedRowChanged =
@"function(s,e) {
var up = window.DetailUpdatePanelControl;
if (s.firstRowChangedAfterInit!==true && up && up.GetMainElement()) {
up.PerformCallback(s.GetFocusedRowIndex());}
s.firstRowChangedAfterInit = false; }";
gridView.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;
}
示例11: SetupGridView
public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
_gridView = gridView;
gridView.SettingsBehavior.AllowFocusedRow = true;
gridView.Load += (s, e) => OnFocusedObjectChanged();
gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
gridView.ClientSideEvents.FocusedRowChanged =
@"function(s,e) {
var up = document.getElementById('DetailUpdatePanel');
if (s.firstRowChangedAfterInit!==true && up && up.ClientControl) {
up.ClientControl.PerformCallback(s.GetFocusedRowIndex());}
s.firstRowChangedAfterInit = false; }";
gridView.Settings.ShowVerticalScrollBar = true;
}
示例12: SetupGridView
public void SetupGridView(ASPxGridView gridView, Action OnFocusedObjectChanged) {
_gridView = gridView;
gridView.SettingsBehavior.AllowFocusedRow = true;
gridView.Load += (s, e) => OnFocusedObjectChanged();
gridView.ClientSideEvents.Init = "function (s,e) { s.firstRowChangedAfterInit = true;}";
gridView.ClientSideEvents.FocusedRowChanged =
@"function(s,e) {
var parentSplitter = XpandHelper.GetParentControl(s);
var up = XpandHelper.GetFirstChildControl(parentSplitter.GetPane(1).GetElement().childNodes[0]);
if ((s.firstRowChangedAfterInit!==true || !XpandHelper.IsRootSplitter(parentSplitter)) && up && up.GetMainElement()) {
up.PerformCallback(s.GetFocusedRowIndex());}
s.firstRowChangedAfterInit = false; }";
gridView.Settings.VerticalScrollBarMode = ScrollBarMode.Visible;
}
示例13: ExibirBotao
public bool ExibirBotao(ASPxGridView grid, int visibleIndex)
{
object row = grid.GetRow(visibleIndex);
string arquivo = "";
if (visibleIndex != 0)
{
arquivo = grid.GetRowValues(visibleIndex, "ARQUIVO").ToString();
}
if (string.IsNullOrEmpty(arquivo))
{
return false;
}
else
{
return true;
}
}
示例14: 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();
}
示例15: CreateControlCheckBoxes
private void CreateControlCheckBoxes()
{
if (string.IsNullOrEmpty(this.GridID))
throw new NullReferenceException("GridID property is null.");
grid = NamingContainer.FindControl(GridID) as ASPxGridView;
if (grid == null)
throw new InvalidOperationException("ASPxGridView control was not found in NamingContainer.");
foreach (GridViewDataColumn column in this.grid.Columns)
{
ASPxCheckBox columnCheckBox = new ASPxCheckBox();
columnCheckBox.ID = "chb" + column.VisibleIndex.ToString();
ASPxPopupControlDemo.Controls.Add(columnCheckBox);
columnCheckBox.AutoPostBack = true;
columnCheckBox.Text = column.Caption;//FieldName;
columnCheckBox.Checked = column.Visible;
columnCheckBox.CheckedChanged += new EventHandler(columnCheckBox_CheckedChanged);
}
}