To accomplish this task, call the PdfDocumentProcessor.FlattenForm method.
To accomplish this task, call the PdfDocumentProcessor.FlattenForm method.
This example demonstrates how to create a helper class that allows you to enable/disable rows with ease. A disabled row is a row that has a specific appearance, and its in-place editors can't be activated.
This seems like a bug in RowStateHelper.cs:
public GridView GridView
{
set { UnSubscribeEvents(value); _GridView = value; SubscribeEvents(value); }
}
Shouldn't it be this:
public GridView GridView
{
set { UnSubscribeEvents(_GridView); _GridView = value; SubscribeEvents(value); }
}
private void UnSubscribeEvents(GridView view)
{
if (view != null)
{
view.RowCellStyle -= view_RowCellStyle;
view.ShowingEditor -= view_ShowingEditor;
}
}
I have a grid and it's showing a list of invoices from the table. If the invoice has been posted then I want the row disabled so a user can't edit it.
I am using vb.net. Can you tell me the steps how to do it? I am new to this grid control.
Thanks
Added By: Dean Martin at: 3/6/2014 12:51:27 PMThis does not handle the situation where rows above a disabled row are deleted. Say I disable rows 5 thru 10. I can delete the rows above row 5 (rows 1 thru 4). And as I do that, what were rows 5 thu 10 now scroll up and I can now edit them or even delete them.
Added By: Dimitros (DevExpress Support) at: 3/6/2014 11:15:04 PMYes, you are right, this example doesn't handle this situation. In this example, we just show the main idea how to accomplish this task. To simplify our code, we use a row datasource index to identify rows. If you want to add/delete rows and save their disabled state, I suggest that you use a key field value to identify rows. In this case, this approach will work correctly.
Added By: Jerzy Rozmyslowicz at: 12/18/2016 11:23:13 AM this example does not explain anything, just adding dataAdded By: Stas (DevExpress Support) at: 12/19/2016 12:41:50 AMHello Jerzy,
The main idea of the approach demonstrated in this example is to store indices of data source rows in the DisabledRows list. Then handle the GridView.RowCellStyle event to assign an appearance object that stores the appearance settings to the e.Appearance parameter if the currently processed row resides in the DisabledRows list. To make a row that is stored in the DisabledRows list read only, you need to handle the ColumnView.ShowingEditor event and check if the currently focused row exists in the DisabledRows list. If so, set the e.Cancel parameter to true.
I hope this explanation is helpful. Should you have additional questions, let me know.
Starting with v16.1, you can create a custom GridView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom GridView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer. Please refer to the How to create a GridView descendant class and register it for design-time use Knowledge Base article for the additional information.
In addition, you can refer to the examples describing how to create GridControl's View descendants:
1. How to create a WinExplorerView descendant class and register it for design-time use;
2. How to create a LayoutView descendant class and register it for design-time use;
3. How to create a CardView descendant class and register it for design-time use;
4. How to create a AdvBandedGridView descendant class and register it for design-time use ;
5. How to create a BandedGridView descendant class and register it for design-time use;
6. How to create a TileView descendant class and register it for design-time use.
Starting with v16.1, you can create a custom WinExplorerView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom WinExplorerView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
Could you please make this example available in VS2010?
Thanks!
Starting with v16.1, you can create a custom LayoutView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom LayoutView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
I need to see your designer code module for the form. Since the control doesn't show up in the toolbox, I'll need to add it manually.
Added By: Yaroslav (DevExpress Support) at: 10/6/2014 1:21:29 PM Hi Don,[C#][ToolboxItem(true)]publicclassMyGridControl:GridControl{}
Starting with v16.1, you can create a custom CardView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom CardView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
Starting with v16.1, you can create a custom AdvBandedGridView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom AdvBandedGridView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
Starting with v16.1, you can create a custom BandedGridView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom BandedGridView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
Starting with v16.1, you can create a custom TileView with all the required classes using our Template Gallery. Use the "Custom Data Grid" template.
This is an example of a custom TileView and a custom control that inherits the DevExpress.XtraGrid.GridControl. Make sure to build the project prior to opening Form1 in the designer.
To obtain general information about creating and registering a custom view descendant class at design time, refer to the following Knowledge Base article: How to create a GridView descendant class and register it for design-time use.
ASP.NET
A complete description for the ASP.NET version is available in the How to: Adjust the Size of Pop up Dialogs displayed in ASP.NET Applications topic.
WinForms
Check out the PopupSizeExample.Module.Win\Controllers\CustomizeFormSizeController.xx file and code comments in it. See also the following product documentation:
Concepts> Extend Functionality> Controllers
DevExpress.ExpressApp> Frame> TemplateChanged
DevExpress.ExpressApp> XafApplication> CustomizeTemplate
DevExpress.ExpressApp.Templates> ISupportStoreSettings> SettingsReloaded
Take special note that certain form templates (e.g., LookupForm, PopupForm, LookupControlTemplate) may have a minimum form size set by default (using the MinimumSize property) or may calculate their size dynamically based on the content. So, if your custom size is ignored using the aforementioned method, you may want to research the source code for each required form template and adjust your default form settings accordingly.
Hello,
I've created a separate ticket on your behalf (T464212: Frame.TemplateChanged property is not static ). It has been placed in our processing queue and will be answered shortly.
At present our MVCxGridView export mechanism has some limitations: it is impossible to export a lot of filtered data, because the mechanism requests all data from a database and then filters it. Thus, a request can be fulfilled, and the 'System.OutOfMemoryException' exception occurs. As a solution, request filtered data yourself and export it using the XtraReports Suite. This example demonstrates how you can do this using LINQ-to-SQL.
To pass the FilterExpression to a Controller's Action, obtain and save it to GridView CustomJSProperties in CustomJSProperties:
[C#]settings.CustomJSProperties=(s,e)=>{ASPxGridViewgrid=(ASPxGridView)s;e.Properties["cpGridFilterExpression"]=grid.FilterExpression;};settings.CustomJSProperties=Sub(s,e)DimgridAsASPxGridView=DirectCast(s,ASPxGridView)e.Properties("cpGridFilterExpression")=grid.FilterExpressionEndSub
When a user clicks the Export data, take the filter expression from GridView CustomJSProperties and add it to the collection of jQuery selector parameters.
[JavaScript]function OnClick(s, e){var actionParams = $("form").attr("action").split("?filterString="); actionParams[1] = gvDataBindingToLinq.cpGridFilterExpression; $("form").attr("action", actionParams.join("?filterString="));}
The XtraReport class instance that's used in this Code Example is added as described in the Lesson 1 - Create a Static Report in ASP.NET MVC tutorial. The report controls are bound to data using the Embedded Fields (Mail Merge) feature.
You can learn more about approaches used in this example in the following resources:
How to: Create a Table Report
How to create a web based report at runtime
How to convert the CriteriaOperator to a lambda expression, so, the latter expression can be used in the IQueriable source
GridView Extension - Provide the capability to export large LINQ data
Walkthrough: Installing the AdventureWorks Database
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T359906: The out of memory exception occurs when GridVIew data in being exported. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.
Hello,
I've created a separate ticket on your behalf (T464479: GridView - How to export data filtered by Search Panel). It has been placed in our processing queue and will be answered shortly.
This example demonstrates how to implement a custom IConnectionStorageService and use it instead of the default one in the data source wizard. This service implementation allows only getting connection parameters from the DashboardDesigner.CustomDataConnection collection. To load the custom service instead of the default one, execute the following code:
[C#]dashboardDesigner1.ServiceContainer.RemoveService(typeof(IConnectionStorageService));dashboardDesigner1.ServiceContainer.AddService(typeof(IConnectionStorageService),newCustomConnectionStorageService(dashboardDesigner1));
Note that starting with version 15.2 the connection from the app.config are not used by default. To enable this functionality use the DashboardDesigner.DataSourceWizardSettings.ShowConnectionsFromAppConfig Property.
This example demonstrates how to create a helper component that allows drawing a logo at the right side of the RibbonControl.
To use this helper in your project, drop it onto the form from the Visual Studio ToolBox (you need to rebuild the project first). Then, set the RibbonControl and Image properties. If you wish to provide more complex logic, for example, draw this logo on a specific Ribbon page, go to the RibbonLogoHelper.DrawRibbonLogo method and add the required condition there.
Our controls are implemented only for Xamarin.Forms projects, and as a result, it is impossible to use them in Xamarin for Android projects and we cannot provide you with such an example.
UPDATED:
Starting with version v2015 vol 1 (v15.1), this functionality is available out of the box. Simply set the GridViewDataBinaryImageColumn.PropertiesBinaryImage.EditingSettings.Enabled property to True to activate it. Please refer to the ASP.NET Data Grid - Binary Image Editor (Coming soon in v15.1) blog post and the Binary Image Column Editing demo for more information.
If you have version v15.1+ available, consider using the built-in functionality instead of the approach detailed below.
The ASPxUploadControl can be used within the ASPxGridView's Edit Form to upload image files to the grid's bound database. In the online sample, the grid's data is stored within the Session object and is obtained/modified by using the ObjectDataSource component.
The project version that employs a SqlDataSource component is also provided in a separate zip file within the example folder.
See also:
How to bind the ASPxBinaryImage to a field which contains image data stored as OLE object
OBSOLETE - Inserting a new row in ASPxGridView with the image preview enabled
It is a nice post... But i cannot understand where and how should i bee using the file.SaveAs to save the file at some place???
Added By: Mehul Harry (DevExpress) at: 1/23/2014 2:26:42 PMZain, you can download this entire project and run it locally in your VS. To see the relevant source files online, just cclick the dropdown above the code which let's you select the files. If you still need help then please contact our support team here: http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question
Thanks.
Added By: Esther Hazan at: 11/22/2016 1:47:50 PM I see that all the posts on this issue are marked obsolete. id there an example of adding a file upload in each row of a grid view that is current?Added By: Vladimir (DevExpress Support) at: 11/22/2016 11:01:50 PM Currently, we recommend using GridViewDataBinaryImageColumn as mentioned in this example description. If it does not work for you, would you please submit a ticket and describe your scenario in detail?Added By: Ryan Manning at: 12/20/2016 4:04:38 PM The recommendation of using GridViewDataBinaryImageColumn assumes that people only want to upload images. Assuming we'd still like to upload other binary types (PDF, etc.), what is the current recommended approach?Added By: Ryan Manning at: 12/20/2016 4:07:02 PM Also, in this example, the only way to insert a record using the modified edit form is to complete an upload, thereby calling the grid.UpdateEdit() method. Is there a way to insert the record if no file was uploaded? Basically, what if the file upload is optional?Added By: Pavlo (DevExpress Support) at: 12/20/2016 11:22:43 PMHello,
I've created a separate ticket on your behalf (T465036: How to implement E95 example with optional file upload). It has been placed in our processing queue and will be answered shortly.
This example illustrates how to provide a custom message to an Assistive Technology (for example, Screen Reader). The main idea of this approach is to add a special helper element to the page, set your custom message as its "aria-label" attribute value, and then focus this element. This will force your screen reader or another assistive technology to read the message.
Here, the task is implemented for a basic ASP.NET ListBox and DevExtreme dxDataGrid widget. The grid displays data depending on the ListBox selection. When the selection is changed, the data in the linked grid is filtered and we send a custom information message. A similar scenario is illustrated in the Accessibility - Linked Controls online demo, but instead of a custom AccessibilityHelper implementation, this demo uses our client API: ASPxClientUtils.SendMessageToAssistiveTechnology.
Main implementation steps:
1. Add a special assistive element to the page using the AccessibilityHelper constructor (its implementation is in the AccessibilityHelper.js file):
[JavaScript]var accessibilityHelper = new AccessibilityHelper();
2. Save the old state for a control or page, when necessary. In this example, the ListBox' onchange event is used for this purpose:
[JavaScript]listBox.change(function(){... oldClientCount = grid.totalCount(); countriesChanged = true;...});
You can handle several events for different controls in your real-life scenario.
3. Handle the event that occurs when changes are complete. Here, the dxDataGrid.onContentReady event is used. Check if there is the difference between the previous and current states, and to pass the corresponding message text as an argument to the AccessibilityHelper.SendMessageToAssistiveTechnology method:
[JavaScript]function OnContentReady(){...var newCount = grid.totalCount();var changesInfo = GetChangesInfo(newCount); accessibilityHelper.SendMessageToAssistiveTechnology(changesInfo);}
The complete implementation of the AccessibilityHelper.SendMessageToAssistiveTechnology method is in the AccessibilityHelper.js file.
To test the example, run it in browser and enable your assistive technology. You can use NVDA or JAWS screen readers for testing purposes. Change the "Countries" list box selection: the assistive software or device should inform you about the changes in the "Clients" grid with a corresponding message.
See Also:
Accessibility - How To: Provide a Screen Reader with Information About Changes on a Page