This example demonstrates how to create a ASPxNewsControl-like layout and functionality using the BootstrapCardView control.
For this, create a card template. This template renders images, news texts, news dates, and news headers. Use Style.css for styling a template layout. Use javascript functions to get news text, a cursor position, and show details of text in the BootstrapPopup control window.
BootstrapCardView - How to replicate ASPxNewsControl behavior
How to customize PDF Viewer Toolbar Items
The following example shows how to customize PDF Viewer Ribbon. Starting with version 14.1.5, this can be done using actions.
In previous versions, it is necessary to override the default PdfViewerControl's RibbonTemplate and add the required bar items to the newly defined RibbonControl.
Question Comments
Added By: Daniel FS at: 1/15/2015 9:12:39 AM
Hi,
It seems that in this example you are adding a custom button (MainWindow.xaml.vb):
Private Sub bCustomItem_ItemClick(ByVal sender As Object, ByVal e As DevExpress.Xpf.Bars.ItemClickEventArgs)
Dim w As New WinUIDialogWindow()
w.Content = "Hello world!"
w.ShowDialogWindow(MessageBoxButton.YesNo)
End Sub
But I can't see how it is declared (in MainWindow.xaml it doesn't appear).
How can I add a custom button?
Thanks.
Daniel.
Added By: Andrey Marten (DevExpress Support) at: 1/15/2015 1:09:40 PM
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T197322: How to add a custom button to the PDF Viewer Ribbon. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Thanks,
Andrey
ie Equivalent to this:
[XAML]<dxr:RibbonControlRibbonStyle="Office2010"ShowApplicationButton="False"RibbonTitleBarVisibility="Collapsed"/>
Added By: Elliot (DevExpress Support) at: 4/8/2016 10:25:51 AM
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T365839: How can I hide the PdfViewer RibbonControl ApplicationButton and collapse the title bar? . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Drag-and-drop data rows from one grid to another
This is an example for the Drag-and-drop data rows from one grid to another Knowledge Base article. Please refer to the article for the explanation.
[UPDATED]:
Starting with version 17.2, you can attach Drag And Drop Behavior to two GridControls to implement drag-and-drop without writing additional code.
Question Comments
Added By: Carlos Arias at: 10/9/2012 1:52:58 PM
GridControl grid = sender as GridControl;
grid always null ???
Thanx Dear fro reply me i'll do it
Added By: david ola at: 11/5/2015 5:41:44 AM1. Can you copy instead from the original grid rather than deleting the row being dragged? In other words, after dragging a particular row, let the original grid still have the row, as opposed to the row disappearing.
2. Can you modify the code such that the row being dragged can be captured and displayed, modified before it is dropped?
David,
Just change the DragDrop handler to not import and delete the source and instead create a copy of the DataRow and import that into the second grid.
Added By: Sasha (DevExpress Support) at: 11/5/2015 11:05:33 AMHello David,
Here is a small code that illustrates Brendon's idea:
[C#]privatevoidgrid_DragDrop(objectsender,System.Windows.Forms.DragEventArgse){GridControlgrid=senderasGridControl;DataTabletable=grid.DataSourceasDataTable;DataRowrow=e.Data.GetData(typeof(DataRow))asDataRow;if(row!=null&&table!=null&&row.Table!=table){table.ImportRow(row);table.Rows[table.Rows.Count-1]["Column1"]="modified";}}
Please review it and let me know if it helps.
Added By: david ola at: 11/6/2015 5:07:05 AMThanks guys, but I am still having a problem: the original data in the first grid is still being modified. Here is my code:
GridControl grid = sender as GridControl;
DataTable table = grid.DataSource as DataTable;
DataRow row = e.Data.GetData(typeof(DataRow)) as DataRow;
int newNum = 0;
num += 1;
if (row != null && table != null && row.Table != table)
{
DataRow rowmod = row;
rowmod[0] = "original modified";
MessageBox.Show(rowmod[0].ToString());
newNum = num % 2;
if (newNum == 0)
{
table.ImportRow(rowmod);
}
}
I want only the imported row to be modifiable without any changes to the original data.
My intention is to allow the user to drag the row, display that row in a form for possible modification, before dropping it in the second grid. The user should also be able to cancel the operation without making any changes to either grid, even after displaying the row in the form.
So far I have been able to display and modify the data, and even choosing to cancel mid-operation (using the modulo example). But it keeps making changes to the original data, which I don't want.
Hello David,
I've created a separate ticket for your inquiry: How to modify the 'Drag-and-drop data rows from one grid to another' example so that the row is not deleted after dragging. Let's continue discussing it in that thread.
It would be possible to do this with a CardView ?Added By: Alexey Z (DevExpress Support) at: 6/22/2016 12:49:22 AM
Hello,
I've created a separate ticket on your behalf (T394874: XtraGridControl - How to implement Drag&Drop mechanism between two CardViews). It has been placed in our processing queue and will be answered shortly.
How to use the ASPxSpreadsheet control as a property editor in an XAF ASP.NET WebForms application
I want to display my business object that has a byte array property as an Excel document allowing users to modify the content and save it to the database. ASPxSpreadsheet is an appropriate component for this task, but how to implement a Web Property Editor based on it?
Backgrounds
Unlike regular ASP.NET editors and controls, ASPxSpreadsheet is a front-end to a document service similar to Google Docs that will be running on your web site if you add this component to your application. Because of this, a property editor based on the ASPxSpreadsheet component has some specific features.
1. If a user opens a document, the next user who opens the same document will see the actual document content even if the first user did not save it to the database.
Image may be NSFW.
Clik here to view.
2. The Refresh action does not discard changes made in the document. The actual document state is stored in the service, and the content stored in the database is used as backup.
3. The Save action updates the content stored in the database. If the user closed a document without clicking the Save action, changes made to the document will be stored on the service and another user can save them to the database.
The property editor demonstrated in this example works with properties of a specific type - SpreadsheetDocument, and does not write any changes to a property. Instead, it modifies referenced objects directly. The SpreadsheetExample.Module\BusinessObjects\Report.cs (SpreadsheetExample.Module\BusinessObjects\Report.vb) file contains a class that has a property of the SpreadsheetDocument type. Note that this property is considered a part of the persistent object (that is why it has the Aggregated attribute) and automatically initialized with the value within the AfterConstruction method.
The editor implementation is simple. Refer to the SpreadsheetExample\SpreadsheetExample.Module.Web\Editors\SpreadsheetEditor.cs (SpreadsheetExample\SpreadsheetExample.Module.Web\Editors\SpreadsheetEditor.vb) file for details. It uses the ASPxSpreadsheet.Open and ASPxSpreadsheet.SaveCopy methods to synchronize the opened document with the database. Documents are identified by the persistent object's key property. This allows opening a separate document for each record in the database.
How to bind a dxChart plugin from ChartJS library to ASPxPivotGrid
This example demonstrates how to obtain the chart datasource using the IDataSource interface implemented by the ASPxPivotGrid, convert data to the JSON format and pass it to the client via a custom JS property added to the ASPxPivotGrid.
Question Comments
Added By: (no info) at: 2/14/2013 5:16:06 AM
I tried the below example and I am getting the following exception. I was able to successfully build the project though..
Server Error in '/' Application.
--------------------------------------------------------------------------------
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load file or assembly 'DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.0.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4' or one of its dependencies. The system cannot find the file specified.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DxSample.Default" %>
Line 2:
Line 3: <%@ Register Assembly="DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.0.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4" Namespace="DevExpress.Web.ASPxPivotGrid" TagPrefix="dxpg" %>
Line 4:
Line 5: <!DOCTYPE html>
Source File: /default.aspx Line: 3
Assembly Load Trace: The following information can be helpful to determine why the assembly 'DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.0.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4' could not be loaded.
=== Pre-bind state information ===
LOG: User = JAMOCHAHQ\sathish.rao
LOG: DisplayName = DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.0.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4
(Fully-specified)
LOG: Appbase = file:///D:/workspace/BAP/BAP Application/BAPTestpages/
LOG: Initial PrivatePath = D:\workspace\BAP\BAP Application\BAPTestpages\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\workspace\BAP\BAP Application\BAPTestpages\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.0.0, Culture=neutral, PublicKeyToken=79868b8147b5eae4
LOG: The same bind was seen before, and was failed with hr = 0x80070002.
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
I added the jquery ui resize and drag properties to the div around the charting component. However when the div is resized, the svg chart is not resized, it stays orphaned from the parent div control.
How do I set 'id' to the SVG or set the width and height of the SVG to be 100% so that when I resize the parent div control, even the svg is resized accordingly.
Below is my aspx code.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DxSample.Default" %>
<%@ Register Assembly="DevExpress.Web.ASPxPivotGrid.v12.2, Version=12.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
Namespace="DevExpress.Web.ASPxPivotGrid" TagPrefix="dxpg" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
css/dxtreme.desktop.default-12.2.css
css/site.css
css/jquery-ui-1.10.1.custom.min.css
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/knockout-2.1.0.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.min.js"></script>
<script type="text/javascript" src="js/globalize.js"></script>
<script type="text/javascript" src="js/dxtreme.core-12.2.js"></script>
<script type="text/javascript" src="js/dxtreme.framework-12.2.js"></script>
<script type="text/javascript" src="js/dxtreme.viz-12.2.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script>
$(function () {
$("#charts").resizable();
});
$(function () {
$("#charts").draggable();
});
</script>
</head>
<body style="vertical-align: middle">
<form id="form1" runat="server">
<div style="width: 600px; margin: 0 auto;">
<br />
<dxpg:ASPxPivotGrid Width="600px" runat="server" DataSourceID="salesPersonSource"
ID="pivotGrid" ClientInstanceName="pivotGrid">
<Fields>
<dxpg:PivotGridField FieldName="CategoryName" Area="RowArea" />
<dxpg:PivotGridField FieldName="ProductName" Area="FilterArea" />
<dxpg:PivotGridField FieldName="Country" Area="ColumnArea" />
<dxpg:PivotGridField FieldName="Sales Person" Area="FilterArea" />
<dxpg:PivotGridField FieldName="Extended Price" Area="DataArea" />
</Fields>
<ClientSideEvents EndCallback="function(s, e) { window.DxSample.updateChartData(pivotGrid.cpChartData);}" />
</dxpg:ASPxPivotGrid>
<br />
<asp:AccessDataSource runat="server" SelectCommand="select Country, ProductName, CategoryName, [Extended Price], [Sales Person] from SalesPerson"
ID="salesPersonSource" DataFile="~/app_data/nwind.mdb" />
<div id="charts" style="width:600px;height:400px;background-color: #eeeeff; float: right; border-style: solid; margin: 0px; padding:10px"
data-bind="dxChart: { commonSeriesSettings: { argumentField: 'argument' }, series: series, dataSource: dataSource, tooltip:{enabled:true}}" />
</div>
</form>
</body>
</html>
Hello Sathish,
I have created a Support Center ticket on your behalf to discuss this issue: DXTREME - The Chart is not automatically resized. Please bear with us, we will answer your question as soon as possible.
Added By: david karasek at: 5/8/2013 5:47:06 AMWas this ever resolved? Is there a complete example and guide of inter-operability between DxTreme and and Dxperience? In an AJAX context, what is the best practice for these to work well together?
Wouldn't change events in the grid need to be triggered via AJAX so as not to do a full page refresh?
In addition what is the best process for this working in MVC? The same as ASP web forms? Different?
Hello David,
I have create a new ticket on your behald to discuss your questions: Few question about interaction between DevExpress ASP.NET components and DXTREME Mobile widgets?. Please bear with us, we will ge back to you as soon as possible.
Added By: Xavier Iglesias Santana at: 12/7/2017 12:01:43 AM I've been using this extension with several devexpress versions on the same web, but with the last one(17.2.3), the web frezzes and never finish loading the chart.Debugging the code the app frezzes on the constr uctor of ChartDataSourceCreator. Exactly on the "For Each item In data" line. The debugger never hits de first line inside the for each, and no exception is thrown.
There's something extra we need on this version or is a bug on the last one?
[VB.NET]PublicSubNew(ByVal view As PivotChartDataSourceView) fDataSource.Append("{""dataSource"":[")Dim data = _From i In view.ChartDataSource.Cast(Of PivotChartDataSourceRowItem)() _Group i By i.Argument IntoGroup _Select Argument = Argument, Series = GroupForEach item In data fDataSource.AppendFormat("{{""argument"":""{0}"",", item.Argument)Dim seriesData = _From i In item.Series _SelectNew Tuple(OfString, Object)(CStr(i.Series), i.Value) CreateSeriesData(seriesData) fDataSource.Append("},")Next item fDataSource.Remove(fDataSource.Length - 1, 1) fDataSource.Append("],""series"":[")ForEach s AsStringIn series fDataSource.AppendFormat("{{""name"":""{0}"",""valueField"":""{1}""}},", s, s.ToSeriesFieldName())Next s fDataSource.Remove(fDataSource.Length - 1, 1) fDataSource.Append("]}")EndSub
How to sort stacked bars by total values using QualitativeScaleComparer
How to sort stacked bar chart bars by the sum of the corresponding values
This example demonstrates how to implement a custom sorting algorithm to sort stacked bar chart bars by the total values. Please refer to the ChartStackedSorting.SortChartSeries() method for details on how it can be done.
See Also:
T585190: How to sort stacked bars by total values using QualitativeScaleComparer
How to copy a cell's value to other cells by dragging its right bottom edge
This example demonstrates how to provide the capability to copy cell values like this is done in MS Excel. In this example, when a cell is selected, you can see a small black rectangle at the bottom. If you drag this rectangle and extend GridView's selection, all selected cells will have the same value as that of a source cell.
Question Comments
Added By: Alex Vignola at: 4/19/2016 7:25:12 AM Hi, first i'd like to report an error in one of the version of your code, and also a little addition.
In the v2010 vol1.4 - v2011 vol1.4 sample... In the SelectedCellsBorderHelper class, in the GetCellRect function, GetGridCellInfo should receive column.AbsoluteIndex and not column.VisibleIndex
Also if you want to handle non editable columns, one would need to modify two things
[VB.NET]PrivateSub CopyCellsValues()Dim value AsObject = View.GetRowCellValue(SourceGridCell.RowHandle, SourceGridCell.Column)Dim selectedCells() As GridCell = View.GetSelectedCells()ForEach cell As GridCell In selectedCellsIf cell.Column.OptionsColumn.AllowEdit AndAlsoNot cell.Column.OptionsColumn.ReadOnlyThen View.SetRowCellValue(cell.RowHandle, cell.Column, value)EndIfNext cellEndSub
[VB.NET]PrivateFunction GetSelectionBounds() As RectangleDim width AsInteger = 0Dim height AsInteger = 0Dim rTop As Rectangle = Rectangle.EmptyDim shouldReturn AsBoolean = FalseDim view As GridView = TryCast(GridControl.FocusedView, GridView)Dim info As GridViewInfo = TryCast(view.GetViewInfo(), GridViewInfo)Dim gridCells() As GridCell = view.GetSelectedCells()If gridCells.Length = 0 Then shouldReturn = TrueReturn Rectangle.EmptyEndIfDim hb As Brush = Brushes.BlackDim visibleColl AsNew List(Of GridCellInfo)()ForEach row As GridRowInfo In info.RowsInfoDim coll As GridCellInfoCollection = (TryCast(row, GridDataRowInfo)).CellsForEach cell As GridCellInfo In coll visibleColl.Add(cell)Next cellNext rowDim collection AsNew List(Of GridCellInfo)()ForEach cell As GridCell In gridCellsForEach cellInfo As GridCellInfo In visibleCollIf cellInfo.RowInfo IsNot NothingAndAlso cellInfo.ColumnInfo IsNot NothingThenIf cell.RowHandle = cellInfo.RowHandle AndAlso cell.Column.Equals(cellInfo.Column) AndAlsoNot cell.Column.OptionsColumn.ReadOnlyAndAlso cell.Column.OptionsColumn.AllowEdit Then collection.Add(cellInfo)EndIfEndIfNext cellInfoNext cellIf collection.Count = 0 Then shouldReturn = TrueReturn Rectangle.EmptyEndIf rTop = GetCellRect(view, collection(0).RowHandle, collection(0).Column)Dim rBottom As Rectangle = GetCellRect(view, collection(collection.Count - 1).RowHandle, collection(collection.Count - 1).Column)If rTop.Y > rBottom.Y Then height = rTop.Y - rBottom.BottomElse height = rBottom.Bottom - rTop.YEndIfIf rTop.X <= rBottom.X Then width = rBottom.Right - rTop.XElse width = rTop.X - rBottom.RightEndIfReturnNew Rectangle(rTop.X, rTop.Y, width, height)EndFunction
Added By: Stas (DevExpress Support) at: 4/20/2016 4:30:31 AM Hello,
To address your question, I've created a separate Update the E2621 example ticket. Please refer to it for further discussion.Added By: Shruti Jauhari at: 12/7/2017 2:35:57 PM Is there a similar solution for MVCxGridView?
How to show detail information in a separate ASPxGridView
This example demonstrates how to use two ASPxGridView instances to show the master-detail data. Detail data is displayed in an external ASPxGridView when a master ASPxGridView's focused row index is modified.
MVC Version:
E3891: How to export multiple GridViews into a single print document
See Also:
E2529: How to show the ASPxGridView's detail information in the ASPxDataView
E1285: How to display master-detail tables in two grids on separate tabs of a PageControl
E2193: How to display detail data within a popup window
Question Comments
Added By: Robert Burgan at: 4/1/2015 12:31:34 PM
I copied this code and added it to my grid. When I put a breakpoint at the Protected Sub gvDetail_CustomCallback sub, it does not reach it when I click the select button in the grid.
Added By: Larry (DevExpress Support) at: 4/1/2015 2:02:15 PM Hello,I have provided the answer for this issue in the ASPxGridView - How to show an additional information in second grid when the row is selected in the first one thread. Added By: DSJB at: 7/29/2015 8:56:46 AM
Unless I am missing something the example code appears to have a bug. In the callback handler in the code behind, the first line should use the parameter supplied by the callback as follows:
string categoryId = gvMaster.GetRowValues(Convert.ToInt32(e.Parameters), "CategoryID").ToString();
Added By: Paul (DevExpress Support) at: 7/29/2015 2:00:51 PM Hi,Thank you for the report. It is possible to use both approaches, but our code doesn't require passing the focused row index to the PerformCallback function. We will update the example.Added By: david ola at: 12/7/2017 9:50:41 PM Can you modify this example to one where the datatables/datasources are created at runtime?
Added By: Lanette (DevExpress Support) at: 12/7/2017 11:06:31 PM
Hello,
I've created a separate ticket on your behalf (T585547: How to show detail information in a separate ASPxGridView when the grids are created at runtime). It has been placed in our processing queue and will be answered shortly.
How to show the ASPxGridView's detail information in the ASPxDataView
This example demonstrates how to use the ASPxDataView control to show the ASPxGridView's detail data.
See Also:
How to show detail information in a separate ASPxGridView
How to display master-detail tables in two grids on separate tabs of a PageControl
How to display detail data within a popup window
Question Comments
Added By: david ola at: 12/7/2017 9:52:35 PM It's much easier to follow if the datasources are created at runtime.
My tables don't exist until the user logs in to the application. Added By: david ola at: 12/7/2017 9:54:27 PM Also, is it good practice to store the categoryID in session variable?Added By: Lanette (DevExpress Support) at: 12/7/2017 11:12:35 PM
Hello,
I've created a separate ticket on your behalf (T585550: How to show the ASPxGridView's detail information in the ASPxDataView with dynamic data sources). It has been placed in our processing queue and will be answered shortly.
ASP.NET MVC Dashboard Designer - How to enable users to download a dashboard XML definition
How to get data validation errors count
Starting from v17.2, the SpreadsheetControl provides the DataValidationCollection.GetInvalidCells method to obtain cells that do not meet the data validation criteria.
This example demonstrates how to get data validation errors count after executing the "Circle Invalid Data" command in the SpreadsheetControl's Ribbon.
How to separate data between employees and managers of different departments using security permissions in XPO
Scenario
This example demonstrates how to use the new security system to implement the following security roles:
- Users (Joe, John) can view and edit tasks from their own department, but cannot delete them or create new ones. They also have readonly access to employees and other data of their own department.
- Managers (Sam, Mary) can fully manage (CRUD) their own department, its employees and tasks. However, they cannot access data from other departments.
- Administrators (Admin) can do everything within the application.
All users have empty passwords by default.
Steps to implement
1.Permissions at the type, object and member level (with a criteria) are configured in the MainDemo.Module/DatabaseUpdate/Updater file. Take special note that for building a complex criteria against associated objects, the ContainsOperator together with the built-in CurrentUserId and IsCurrentUserInRole criteria functions. For greater convenience, strongly typed criteria for permissions are accompanied with their string representation.
2. The SecuredObjectSpaceProvider is used in the CreateDefaultObjectSpaceProvider method of the XafApplication descendants located in the WinForms and ASP.NET projects.
3. Permission requests caching is enabled via the IsGrantedAdapter.Enable method in the MainDemo.Module\MainDemoModule.xx file (see the T241873 ticket for more details).
4. The Department, Employee and EmployeeTask classes are implemented in the MainDemo.Module/BusinessObjects folder. To quickly understand relationships between involved business classes, their class diagram is attached.
Image may be NSFW.
Clik here to view.
IMPORTANT NOTES
1. See also the functional tests in the MainDemo.EasyTests folder for more details on the tested scenarios.
2. For versions older than v15.2.5, be aware of the issue described in the Security - The "Entering state 'GetObjectsNonReenterant'" error may occur while saving data if a permission criteria involves a collection property thread.
3.The State of the New Security System
Question Comments
Added By: Raoulw at: 2/11/2013 2:02:04 PM
This is a great sample. There is one error, or it is not clear in the description. 'Users (Joe, John) can do everything with their own tasks and can also view data of their own department;' implies that Joe has read only access to Mary's tasks, which is not true. The code below fixes that.
Raoul.
SecuritySystemObjectPermissionsObject canSeeTasksOnlyFromOwnDepartmentObjectPermission = ObjectSpace.CreateObject<SecuritySystemObjectPermissionsObject>();
//canSeeTasksOnlyFromOwnDepartmentObjectPermission.Criteria = "AssignedTo.Department.Oid=[<Employee>][Oid=CurrentUserId()].Single(Department.Oid)";
canSeeTasksOnlyFromOwnDepartmentObjectPermission.Criteria = new BinaryOperator(new OperandProperty("AssignedTo.Department.Oid"), joinEmployees, BinaryOperatorType.Equal).ToString();
canSeeTasksOnlyFromOwnDepartmentObjectPermission.AllowNavigate = true;
canSeeTasksOnlyFromOwnDepartmentObjectPermission.AllowRead = true;
canSeeTasksOnlyFromOwnDepartmentObjectPermission.AllowWrite = false;
canSeeTasksOnlyFromOwnDepartmentObjectPermission.AllowDelete = false;
canSeeTasksOnlyFromOwnDepartmentObjectPermission.Save();
employeeTaskPermissions.ObjectPermissions.Add(canSeeTasksOnlyFromOwnDepartmentObjectPermission);
Thanks for your update, Raoul!
Added By: Konstantin B at: 10/17/2013 4:47:01 AMI'm tried to apply solution for bug fixing "Security - The "Entering state 'GetObjectsNonReenterant error may occur while saving data if a permission criteria involves a collection property" to this example, but unsuccessfully - always get GetObjectsNonReenterant exception.
Could you please supply the project how can fix it for the current example?
Thanks
Added By: Dennis (DevExpress Support) at: 10/21/2013 6:32:14 AMPlease track https://www.devexpress.com/Support/Center/Question/Details/Q287727 for any updates on this problem. Thanks!
Added By: Aldo G. at: 12/9/2017 1:42:34 PM I don't understand why this says "This example demonstrates how to use the new security system" but still use the old one. Or I'm wrong or the new security system is PermissionPolicy?I know this is 5 years old but was modified on 2/20/2017. What I'm missing?
How Insert, Update and Delete ASPxGridView's records with buttons
To change ASPxGridView's data from the client side, there are appropriate ASPxClientGrid methods:
AddNewRow
DeleteRow
StartEditRow
To save or cancel changes, there are:
UpdateEdit
CancelEdit
The following example implements a custom defined toolbar with ASPxButtons, which perform all the editing capabilities over a grid's data source.
Note: to distinguish records, the property AllowFocusedRow should be enabled for grid.
See Also:
Switch to the edit mode by clicking a status bar button or by double-clicking a row
Editing an in-memory dataset
How to enable/disable command buttons on the client side
Question Comments
Added By: Matthew moore 3 at: 5/24/2012 6:08:25 AM
I am having a hard time getting the buttons to work. Am i missing something on the backend which might stop it from working. Is there a place i can get more direction or post my code ?
Added By: BiBOARD BiBOARD at: 3/15/2016 8:21:01 AM I tried this example, it does not work.In fact the events: RowDeleting, RowInserting, RowUpdating, InitNewRow are not fired at all. Can you explain me what I miss?
Thanks
Added By: Vova (DevExpress Support) at: 3/15/2016 9:20:58 AM
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T356923: ASPxGridView - The RowDeleting, RowInserting, RowUpdating and InitNewRow events aren't fired. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hello Daniel,
I created a separate ticket on your behalf: ASPxGridView - The RowDeleting, RowInserting, RowUpdating and InitNewRow events aren't fired in E1522. Let's clarify the issue there.
using DevExpress.Web.ASPxGridView;
I am getting the error.correct using is
using DevExpress.Web;
OBSOLETE - How to create a Card View with editing capabilities using ASPxGridView
Starting with v15.2, we provide the ASPxCardView control, which supports CRUD operations out of the box:
ASPxCardView - Edit Modes
ASPxCardView - How to implement the CRUD (create, read, update, delete) functionality similarly to FormView and DetailsView
For previous versions:
To provide editing capabilities, you can add the ASPxButton into the DataRow template. Set its AutoPostBack property to False, and attach a script to the client-side Click event. In the script, call the client-side ASPxClientGridView.StartEditRow method and pass the current row visible index as an argument. Use the Container.VisibleIndex property from inline code to get the index.
To add new rows, add a similar button to the StatusBar template and call the ASPxClientGridView.AddNewRow method in its Click event.
How to use the ASPxFileManager metadata property
This new feature (FileManagerItemProperties.Metadata Property, starting from the release 17.2) provides access to a collection of an item's metadata. You could view metadata by clicked "Properties" in the corresponding item context menu. For this, create a custom file system provider, override base GetFiles and GetFolders methods, add key-value dictionary pairs to properties of a corresponding FileManagerFile or a FileManagerFolder object. Handle the client-side event SelectionChanged to get the currently selected element. Use the client-side method GetMetadata to get the metadata dictionary of the element. Then, compose a text from keys and values and assign it as the ASPxPopupControl content.
How to obtain the appointment or time interval selected by an end-user
When an end-user tries to create a new appointment or edit an existing one, the Scheduler checks the selected appointment or time interval and shows necessary notifications.
How to create ASPxFileManager with metadata support using Entity Framework and a database as a filestore
This example illustrates how to get metadata from folders and files.
The ASPxFileManager control provides access to metadata of files and folders starting with the 17.2 version. It has the FileManagerItemProperties.Metadata property that contains a dictionary with metadata. The Metadata property is used to specify the item's metadata using an appropriate FileManagerFile.FileManagerFile or FileManagerFolder.FileManagerFolder constructor.
The ASPxFileManager has the ASPxClientFileManagerItem.GetMetadata method, which is used to get the current File Manager item's metadata on the client side.
ASPxGridView - How to edit a DateTimeOffset column
This example demonstrates how to edit the DateTimeOffset structure using the ASPxGridView control. The DateTimeOffset represents a date-time data structure which defines a point relative to the UTC time zone. Our ASPxDateEdit editor doesn't support the DateTimeOffset type out of the box. However, it is possible to implement this task with two editors: the ASPxDateEdit is used to edit Date and Time parts of a DateTimeOffset value, and the ASPxComboBox is used to edit a time zone. Put these editors into the EditItemTemplate of a column which displays values from the DateTimeOffset field. When a row is updated, it is necessary to combine modified values into the DateTimeOffset structure manually. You can get them via the e.NewValues collection in the RowUpdating event handler. In this example, the UpdateGridDataSet method is used to save the DateTimeOffset value to a data object.
How to implement drag and drop between a legacy scheduler and a grid
Important: This example demonstrates a manual drag-and-drop implementation for DXGrid and a legacy Scheduler control. To learn more on how to implement a similar functionality using our new Scheduler and the built-in Drag-and-Drop functionality which became available in version 17.2, refer to the Data Grid > Scheduler Integrationinteractive demo.
This example illustrates how to implement drag and drop for appointments between a SchedulerControl and a GridControl. Note that we handle the PreviewMouseDown and PreviewMouseMove events of the TableView Class to initiate drag-and-drop operations for the GridControl (we use DragDrop.DoDragDrop Method for this purpose), whereas this operation is initiated automatically for the SchedulerControl (if the OptionsCustomization.AllowAppointmentDrag Property has its default value). The PreviewDrop event of the TableView and SchedulerControl.AppointmentDrop Event are handled to process SchedulerDragData dropped in the GridControl and SchedulerControl respectively.
Note: Rows in the GridControl are dragged via the RowIndicatior (see the screenshot in the TableViewHitInfo Class help section) in this example.
Question Comments
Added By: Prashant Patel 7 at: 5/8/2013 11:55:32 PM
How can we View Stackpanel as fullscreen mode in wpf window ?