Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all 7205 articles
Browse latest View live

ASPxDropDownEdit - How to select Year and Month only

$
0
0

This example demonstrates how to create a DateEdit analog based on ASPxDropDownEdit with a custom DropDownWindowTemplate that allows you to select Year and Month only.

Question Comments

Added By: Julien Joubert at: 2/8/2013 6:57:14 AM    

Hello,
Could you please provide a similar code for razor please?
Indeed, when I look at the events available inside settings.Properties.ClientSideEvents for @Html.DevExpress().DropDownEdit mvc extension, I don't have PrevClick, NextClick or OkClick and the closest for OnClick is ButtonClick.

Added By: Daniel Alvarado 2 at: 5/12/2014 8:20:26 AM    

Awesome, with this kind of thing devexpress shows it really cares for the suscribers. Thanks.


How to use the dxChart in an ASP.NET WebForms application

$
0
0

This example is an illustration of the KA20011: DevExtreme Mobile - Technical FAQ KB Article. Refer to the Article for an explanation.

See also:
Pros and cons of CDN usage in projects with ChartJS
How to bind dxChart to AJAX-enabled WCF service in an ASP.NET application

Question Comments

Added By: raj mani at: 3/25/2014 12:43:27 AM    

Hi,

The example given below doesn't seem to work. Could you pls help me out here...

Added By: Marion (DevExpress Support) at: 3/25/2014 1:27:00 AM    

I've checked the sample (the Run Online option), and it works properly on my side. Please submit a new Support Center ticket and provide us with steps to reproduce the issue.

Added By: Jose Bobadilla at: 5/12/2014 2:26:57 AM    

Very helpful! However, I'd like to update the datasource on a server side combobox selectedindexchanged, what can I do? Thanks.

Added By: Marion (DevExpress Support) at: 5/12/2014 4:59:47 AM    @Jose,
Please submit a new Support Center ticket and describe your scenario in greater detail. What do you mean by "update the datasource on a server side"? Do you wish to assign a new datasource to a chart and modify the existent one? What type of data source are you using?Added By: Jose Bobadilla at: 5/12/2014 3:46:29 PM    

Yes, I wish to assign a new datasource to a chart and modify the existent one. Ticket : T105188. Thanks

How to silently pass a parameter's value to a report

$
0
0

This example demonstrates how to pass a parameter's value to a report, prior to its generation and without prompting end-users to enter this value manually.

When there are no visible parameters in a report, their values are passed "silently" (without exposing the Parameters UI to end-users).

See also: E960.

Question Comments

Added By: James Borland at: 5/13/2014 2:30:35 AM    

Hi,
Can someone explain how to get this working. It just gives me an error that "catID" is not defined. I think this is exactly what I need to do. I have a report which I've bound to a list and they all print correctly I just want to pass one field ( A company name ) to print at the top of the report.
Thank,
Jim.

Added By: Andrew L (DevExpress Support) at: 5/13/2014 3:09:37 AM    

Hello Jim,

I noticed that you have posted your question in the Using Parameters on a report thread. We will process it there.

How to perform a drill-down in ASPxDashboardViewer

$
0
0

The following example demonstrates how to perform a drill-down in ASPxDashboardViewer on the client side.


In this example, the ASPxClientDashboardViewer.PerformDrillDown method is used to perform a drill-down for the specified row in the Grid dashboard item. This method is called in the Click event handler of the ASPxButton1.


How to create and display a BarCode in a web application

$
0
0

This example illustrates how you can use our new Bar Code Library in ASP.NET to generate and display a barcode image on the webpage. The best approach implies creating a custom HTTP Handler that will generate and output an image. Here is a code of this handler:

[C#]
publicclassBarCodeHandler:IHttpHandler{publicvoidProcessRequest(HttpContextcontext){BarCodebarCode=newBarCode();barCode.Symbology=Symbology.QRCode;barCode.CodeText="123";context.Response.ContentType="image/png";barCode.Save(context.Response.OutputStream,ImageFormat.Png);context.Response.End();}publicboolIsReusable{get{returnfalse;}}}

The img tag in the main aspx page is defined as follows:

[ASPx]
<imgsrc="BarCodeHandler.ashx"alt="QRCode"width="200px"height="200px"/>

See Also:

HTTP-handler for image

Question Comments

Added By: ABRAMO ABRAMO at: 6/14/2013 2:12:48 AM    

I get Server Error in '/E4716' Application when I click "Run Online"

Added By: mariah sharp at: 5/13/2014 7:06:37 PM    

here i just know this asp.net barcode
http://www.keepautomation.com/guide/aspnet_barcode_generator.html
http://www.keepautomation.com/products/net_barcode_aspnet/

BandedGridView - How to hide particular Bands

$
0
0

This example illustrates how to hide a particular Band and draw on its place column captions that belong to this Band.

Question Comments

Added By: Fajar Taufik at: 11/26/2013 11:56:14 PM    

I copied MyPaintHelper.vb to my project but can't run becouse error in MyBase.New(view) line, how to solve this problem

Added By: Hieu Nguyen 3 at: 5/13/2014 9:41:54 PM    

Thanks, this's very very helpful!

How to use the FrameNavigationService with the Managed Extensibility Framework (MEF)

$
0
0

The FrameNavigationService allows navigating between Views within a NavigationFrame. This example shows how this service can be used along with the Managed Extensibility Framework (MEF).


In this example, we've defined a custom ViewLocator for the FrameNavigationService. This ViewLocator uses MEF and can load views dynamically from the external libraries. The MainWindow contains a NavigationFrame, which shows a MenuPage view at startup. The MenuPage contains tiles, which invoke a command to navigate to child views when clicked. Each child view contains the Back button for backward navigation.

Question Comments

Added By: RishiSharma at: 5/13/2014 4:47:48 AM    

Hi,

This is the great example but.. Can you please send me some sample where same thing can be implemented with UnitFramework..

Regards
Rishi Sharma

Added By: Ivan (DevExpress Support) at: 5/13/2014 11:28:50 PM    

As I can see, you have posted the same question in the How to use the FrameNavigationService with the Unityframework ticket. We will answer you there.

How to get additional search results using the Bing Map Search service

$
0
0

This example demonstrates how to provide the capability for end-users to search for location and keywords using the BingSearchDataProvider.Search method.

In this example, the built-in Search panel is disabled (the BingSearchDataProvider.ShowSearchPanel property is set to false), because a custom panel is used instead.

To start search, specify search parameters (location and a keyword) in the custom Search panel and click the Search button. All search parameters are passed to the Search method and you can see the result in the rich text box element.

The results contain a display name, and address associated with the search location. In addition, the SearchRequestResult.AlternateSearchRegions property returns results of searching for alternate regions.

Note that if you run this sample as is, you will get a warning message saying that the specified Bing Maps key is invalid. To learn how to register a Bing Maps account and create a key for it, refer to the How to: Get a Bing Maps Keytutorial.


How to show the progress of loading image tiles

$
0
0

This example shows how to visualize the progress of loading image tiles using a progress bar.

To accomplish this task, handle the ImageTilesLayer.RequestDataLoading event and specify how the progress bar should be updated using the UpdateProgressBar method. Then, handle the LayerBase.DataLoaded event to specify the final state of the progress bar when the data load is finished.

How to export selected map items to an image

How to load image tiles from another source

$
0
0

This example illustrates how to create a custom data provider for the Map control. For this, it is necessary to implement a MapDataProviderBase class descendant and assign it to the ImageTilesLayer.DataProvider property.

In this example a custom LocalTileSource class is implemented to get local tiles from tile images stored in the local cache.

How to create an editor similar to Outlook Attachment Editor

$
0
0

This example demonstrates how the RichEditControl component can be used to emulate the Outlook Attachment Editor behavior.

The main idea of the approach demonstrated in this sample is to use the DOCVARIABLE field to display corresponding RTF content for each inserted file.

Question Comments

Added By: maulik shah 5 at: 5/14/2014 9:10:23 PM    

Hi
     This is a good example for attachment. I have implemented  in my project. Now i want if i click on that file, file download on selected folder.

How to represent an enumeration property via a drop-down box with check boxes

$
0
0

Scenario:


There is an enumeration property and the FlagsAttribute is applied to the enumeration, i.e., several values can be written to this property. An editor allowing you to select several values is required.


Steps To Implement:


This functionality can be implemented via a custom property editors. There should be two separate editors - for Win (EnumPropertyEditorEx) and for Web (ASPxEnumPropertyEditorEx).


Win:

1. Create an EnumPropertyEditorEx class inherited from the built-in EnumPropertyEditor.

2. Override the CreateControlCore method and return the CheckedComboBoxEdit control if the FlagsAttribute is applied to the enumeration type.

3. Return the RepositoryItemCheckedComboBoxEdit object in the overridden CreateRepositoryItem method.

4. Add items to RepositoryItemCheckedComboBoxEdit in the SetupRepositoryItem method based on the possible enumeration values.

5. Subscribe to the RepositoryItemCheckedComboBoxEdit.ParseEditValue event to handle the situation when all items are unselected in the dropdown.

6. Subscribe to the RepositoryItemCheckedComboBoxEdit.CustomDisplayText event to show localized values.


Web:

1. Create an ASPxEnumPropertyEditorEx class inherited from the ASPxPropertyEditor class. The ASPxEnumPropertyEditor cannot be used as a base class, because it can work properly only with the ASPxComboBox editor which does not provide the multi-selection capability.

2. Return the ASPxGridLookup control in the overridden CreateEditModeControlCore method. Configure the ASPxGridLookup control to bind its Text property to the business object's enumeration property. To do this, perform the following steps:

2.1. Hide unnecessary UI elements from the embedded grid - grid lines and column headers, disable the selected row highlighting.

2.2. Create two columns - one for the row selection, and another to display values.

2.3. Use the in-memory data source (DataTable) to display grid rows based on the possible enumeration values.

2.4. Subscribe the inherited EditValueChangedHandler event handler to the ASPxGridLookup.TextChanged event to notify property editor when the control's value is changed.

3. Override the ReadEditModeValueCore method to set the lookup editor's text based on the enumeration property value.

4. Override the GetControlValueCore method to return the enumeration value based on the lookup editor's text.

See Also:
Implement Custom Property Editors
E444
S35490
S30849

Question Comments

Added By: Pawel Rymarczyk 1 at: 7/6/2013 1:11:36 AM    

Hello,

How can I filter by flags enum property in the server mode? I mean filtering the ListView by AutoFilterRow.

Added By: Alex Silva 4 at: 4/4/2014 2:35:40 PM    

would that same code for WEB

Added By: Dennis (DevExpress Support) at: 4/8/2014 12:45:41 AM    

@Alex: While we do not have a ready Web version of this example, you may find the code from the E1807 example helpful. Thanks.

Added By: Anatol (DevExpress Support) at: 4/9/2014 9:32:02 AM    

Web version is added.

Added By: Leong Vai Long at: 5/14/2014 3:22:04 AM    

Hi, I had try this method for the XAF web version. The question is how i want to use the XAF Display Name to show in the lookup? bcos I only see the enum values.
Thanks.

Added By: Dennis (DevExpress Support) at: 5/14/2014 9:09:47 AM    

@Leong: This particular functionality is not implemented in this example solution. You would need to modify the E689.Module.Web.Editors.EnumPropertyEditorEx class to achieve this. While we do not have a ready sample, feel free to contact our ASP.NET team on how to implement your task with the ASPxGridLookup component used in this example. Once you receive a solution for this component, it can be easily integrated in XAF.

Added By: Leong Vai Long at: 5/14/2014 10:46:46 PM    

Hi Dennis,

1. Is it possible to change the ASPXGridLookup with the ASPXDropDownEdit? This is the link http://blog.zerosharp.com/three-ways-to-store-a-list-of-currency-codes-in-xaf/#disqus_thread, but this example use the string, how to convert it to enum?
2. How to contact your ASP.NET team to implement my task with the ASPXGridLookup?

Thanks.

How to customize the appearance of a map shape title

$
0
0

This example demonstrates how to change the appearance of a map dot title.

To do this you should handle the MapControl.DrawMapItem event and customize some drawing parameters using its event arguments.

How to implement CRUD operations when Entity Framework 5 is used

$
0
0

This example illustrates how to implement CRUD operations with XtraGrid and EF 5. To get a possibility to commit changes it is necessary to store DbContext instance that is used to get the grid's data source. Than when necessary, you can commit changes to the data base using the DbContext.SaveChanges method 


OBSOLETE: ASPxMemo - How to limit the length of text that can be entered into the control using MaxLength

$
0
0

This approach is now obsolete. Starting with version v2013 vol 1 (13.1) this functionality (the ASPxMemo.MaxLength property) is available out-of-the-box.
Please refer to the S91467: ASPxMemo - Support MaxLength report for more information.

This example demonstrates how to limit the length of text that can be entered into the control using the MaxLength property.

See also:
How to implement the "characters remaining" functionality for ASPxTextBox and ASPxMemo using MaxLength
How to set the text max length in the ASPxMemo control

How to navigate through views by using NavBarControl control and NavigationFrame class

$
0
0

This example demonstrates how to implement navigation between views by using the NavBarControl control and NavigationFrame class.

Question Comments

Added By: Shabra J Dowson at: 5/15/2014 3:02:24 AM    

I have only been able to extract the code of the XAML to see the Design view for this sample.  It may suit our needs.   I can't run the project - I'm just downloading 13.2.9 version of the DX Components to upgrade my development environment

Added By: Andrew K (DevExpress Support) at: 5/15/2014 7:41:53 AM    

Hello,

I have checked this example, and it works correctly on my machine (I also have 13.2.9). Please clarify what problem you faced. Can't you open the downloaded example or can't build it?

Thanks,
Andrew

How to use XtraSpellChecker in XAF

$
0
0

Scenario
This example demonstrates how to incorporate the XtraSpellChecker to XAF applications.

Steps to implement
1. Copy the Spelling.Win project into your solution and build it;

2. Invoke the Application Designer for your executable WinForms project (YourSolutionName.Win) or the Module Designer for your WinForms module project (YourSolutionName.Module.Win) and open the Toolbox (Control+Alt+X);
3. Drag the SpellingWindowsFormsModule item from the Toolbox;
4. Build and run your project.

Question Comments

Added By: Dennis (DevExpress Support) at: 6/1/2012 7:17:15 AM    

See also:
Q405371

Added By: Louis Z at: 5/15/2014 8:04:47 AM    

1. Copy the Spelling.Win project into your solution and build it;
2. Invoke the Application Designer for your executable project and open the Toolbox (Control+Alt+X);
3. Drag the SpellingWindowsFormsModule item from the Toolbox;
4. Build and run your project.

How to load a gauge control layout from an XML file and display it in an MVC application

$
0
0

The example demonstrates how to load the ASPxGaugeControl layout (created in the WebForms application) and then render an appropriate image in the MVC application.

The sample is based on the blog post where Charts are created in a similar manner: Charts In ASP.NET MVC

See also:
Implement the MVC extension for the ASPxGaugeControl

Question Comments

Added By: Olena at: 5/15/2014 2:04:37 PM    

This example does not work with the latest DevExpress version.

Added By: Olena at: 5/15/2014 2:56:55 PM    

The topic is saying how to add gauge to MVC application, but you are using aspx file to demonstrate that. Is it possible to add gauge control to cshtml?

Added By: Sergi (DevExpress Support) at: 5/15/2014 10:48:27 PM    Hi Olena,

I have created a separate ticket regarding the issue you mentioned: T106975 - How to load a gauge control layout from an XML file and display it in an MVC application using Razor View Engine. We will reply you there.

ASPxTreeList - How display Report Header and Report Footer in an exported document

Viewing all 7205 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>