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

How to send authenticated requests to the OData service

$
0
0

This example demonstrates how to send authenticated requests to the OData service. The main idea is to handle the ODataContext.beforeSend event and add login information to the header of your request.

The How to process authenticated requests on the OData service example demonstrates how to process requests on the server side.

Question Comments

Added By: Phil Jenson at: 1/28/2013 3:12:21 AM    

I believe 'beforeSend' function should be a member of the ODataContext and not a member of the CategoryList object.

Added By: Hasan Baidoon at: 7/9/2013 10:33:08 PM    

Hi,

I want to know if this method for Basic Authorization works when JSONP is enabled.

Thanks.

Added By: Onkelinx Ghislain at: 2/13/2014 2:06:23 PM    

Which version of visual studio works this example?

Added By: surekha at: 11/3/2015 2:26:49 AM    

THis code is not worrking. error comes app not defined. how i can resolve this error.

Added By: Mark Hartmann at: 11/3/2015 2:34:36 AM    

Change line "app.navigate('Login');" to navigate to your login page according to your other code.

Added By: Nikolai (DevExpress Support) at: 11/3/2015 7:32:12 AM    Hi Guys,

Surekha, please follow the recommendations from the Mark's comment. If this does not help, describe how we can reproduce the issue with this example. We will do our best to assist you.Added By: Luong Tu at: 11/29/2015 6:16:39 PM    

this example  isn't working for me

Added By: MohammedFarooq at: 11/29/2015 9:41:15 PM    

Hi Nikolai,

This example seems to be incomplete as it doesn't have the OData Service project included in it to demonstrate the functionality.

I would appreciate if you can create the ODataService project and demonstrate the example fully.

Added By: Nikolai (DevExpress Support) at: 11/29/2015 11:45:37 PM    Hi Guys,

Please take a closer look at the example description. It contains a link to the required examaple that demonstrates how to process requests on the server side.Added By: saliha mali at: 12/27/2015 7:22:19 AM    

please I'm getting this error
"Error: 'ReferenceError: app is not defined', line 14, file 'http://localhost:64254/views/login.js'"

Can you help me for this?

Added By: Nikolai (DevExpress Support) at: 12/28/2015 1:03:28 AM    

Hello Saliha,

To process your recent post more efficiently, I created a separate ticket on your behalf: T328732: Cannot test the E4460 example due to the "app is not defined" error. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: saliha mali at: 12/29/2015 12:41:55 AM    

It's ok. I prefixed the "app" with the name of my application. Now the error is not displayed. (Guess I get it)
but i'd like to know where should I put the db.js?  Is it in the same folder as "login" and "index" ?
Because I got this error :
"Error: 'TypeError:  TestApp.db is undefined', line 4, file 'http://localhost:54294/views/index.js'."

Added By: Nikolai (DevExpress Support) at: 12/29/2015 1:01:42 AM    Saliha,

You can place the db.js file into any folder. The main requirement is that a reference to this file should be placed before a reference to index.js. 

Added By: saliha mali at: 12/29/2015 1:33:42 PM    

I did not understand what does "db.js" really do?

Here are the sequence of ideas in my head:

1- User enter his (UserName & password) then click LoginButton
2- the index page is shown and it is expected to display a list of categories. The data source of this page is the "CategoryList"

Now I don't understand what is exactly the "categoryList". Is it a table in the DB which is linked to My OdataService?
what do this two lines mean :
key: "CategoryID",
name: "Categories"

So briedfly I need more explanation to make the db.js clear in my head?
thks to help.

Added By: Nikolai (DevExpress Support) at: 12/30/2015 12:36:45 AM    Saliha,

I kindly ask you not to post the same comments in different tickets. Let's discuss this issue in the Cannot test the E4460 example due to the "app is not defined" error ticket.Added By: Şule ışık at: 4/22/2016 12:40:20 AM    Hi,
I try login app. But  I  receiving error. this error is 

Uncaught ReferenceError: Unable to process binding "dxTextBox: function (){return { value:txtUsername} }"
 What is the problem? Added By: Şule ışık at: 4/22/2016 12:59:00 AM     When I wrote "value: anything" , I'm getting error .  Why?

Added By: Nikolai (DevExpress Support) at: 4/22/2016 3:52:42 AM    

Hello Şule,

I've created a separate ticket on your behalf (T370893: The E4460 example throws error). It has been placed in our processing queue and will be answered shortly.

Added By: Hari Setyawan 2 at: 6/5/2016 7:44:25 PM    Hi, I've tried the example, but it gave me this error
Error: 'Uncaught TypeError: Cannot read property 'disable' of undefined', line 9, file 'http://localhost:61289/js/dx.all.js'. Added By: Nikolai (DevExpress Support) at: 6/6/2016 6:22:07 AM    

Hello Hari,

I've created a separate ticket on your behalf (E4460: How to send authenticated requests to the OData service). It has been placed in our processing queue and will be answered shortly.


How to store data to a local file using PhoneGap API

$
0
0

This example demonstrates how to store data to a local file using PhoneGap API. To access a corresponding API, it is necessary to add a link to the cordova.js file.

This example can be tested only on a mobile device.

See also:
PhoneGap Documentation - File
How to build a native package in Visual Studio
How to test PhoneGap API via the Courier tool

Question Comments

Added By: Andrea Tatone at: 7/25/2013 11:14:40 AM    

Many thanks for the example. I've tried it in the simulator and the courier, but it doesn't work (i'm working on a android 2.3.4 device). It fails with the message "File system is not accessible", either in read and write. Is there anything I can do?

Added By: Nikolai (DevExpress Support) at: 7/25/2013 11:18:07 PM    

Hi Andrea,

I have created a separate ticket regarding this issue. Please post all messages here Q377803.

Added By: Rakesh Parab at: 5/28/2014 12:15:35 AM    

plz help me 4.......
how to store .csv file to particular path in mobile like /mnt/sdcard/csvfiles .
???

Added By: Nikolai (DevExpress Support) at: 5/28/2014 7:09:53 AM    Hi Rakesh,

I have created a separate ticket for this issue How to store a file to a particular folder. Please post all comments in this ticket.Added By: User name 5 at: 2/10/2016 1:56:40 PM    I just have a couple questions on how this works: 

1. what exactly does this function do
app.fileSystem.root.getFile("test.txt", { create: true }, GetFileEntryWriter, FileSystemFail);

2. and when you are calling the GetFileEntryWriter function you aren't passing any parameters, when it is expecting the fileEntry argument. So wouldn't that make the fileEntry.createWriter(WriteFile, FileSystemFail) function not work, as it would say cannot get method of undefined field fileEntry.

3. Why separate some javascript functions into the app.html page and the others into the index.js page? 

Thanks for the help Added By: User name 5 at: 2/10/2016 1:58:41 PM    4. Plus how do I access the functions in the app.html page from the index.js page, if it is possible 

Thanks again Added By: Nikolai (DevExpress Support) at: 2/11/2016 1:00:50 AM    Hi,

Here are my comments:
1, 2, This is the File plugin API. The decription of this plugin can be found here.
3. This is just an example. There is no specific reason for declaring functions in app.html file. The main requirement is that file syste should be initialized when device is ready. This inquiry is better related to basic PhoneGap concepts rather that to DevExtreme. I suggest that you refer to the PhoneGap Documentation to learn more.
4. If you wish to access functions an any part of your code, declare them in the global context as it is done for the gotFS function.


Added By: User name 5 at: 2/11/2016 5:56:33 AM    Hi Nikolai, 

Thanks for the help, really appreciate it Added By: Nikolai (DevExpress Support) at: 2/11/2016 6:00:59 AM    My pleasure :)Added By: Şule ışık at: 6/16/2016 11:07:39 PM    Hi,
I use the code but  ı take alert 
('File system is not accessible'); why ? what am ı missing ?
Added By: Nikolai (DevExpress Support) at: 6/17/2016 6:17:05 AM    Hi,

Make sure that you are testing the project on a mobile device, not in the DevExtreme simulator.

How to create a Web Dashboard Designer application

$
0
0

This example shows how to create a Web Dashboard Designer application and provide data for dashboards.

The project contains a simple dashboard and two available data sources: the XML and OLAP data sources. You can use these data sources to create a new dashboard. To learn how to create a Web Designer application from scratch, see the following topic: Creating a Dashboard using a Web Designer.

Note that the OLAP data source requires the ADOMD.NET data provider installed on the web server. You can get the latest version of this provider here: https://www.microsoft.com/en-us/download/details.aspx?id=42295.

Question Comments

Added By: Dima Santina at: 4/13/2016 10:46:06 AM    Is there a sample available that works with Visual Studio 2010?Added By: Andrew Aks (DevExpress) at: 4/14/2016 1:44:37 AM    

Hi 

We have converted the example to be able to run it using Visual Studio 2010.

Added By: jacob xu chen at: 5/24/2016 7:57:22 PM    

Thanks Andrew. It's very good web dashboard desginer. I just want to customize it. Is it possible for us to remove some features from this designer? It seems that all things are all in DLL file, is there a way to customize it? Thanks.

Added By: John (DevExpress Support) at: 5/24/2016 10:00:49 PM    Hi Jacob,
I have created a separate topic for your recent question: Iit possible for us to remove some features from Web Dashboard Designer. let's continue our discussion there.

How to import large amounts of data into ListView (Example)

$
0
0

See the K18260 KB Article for more information.

See also:
ORM Magic–Importing from any datasource

Note
This example cannot be automatically converted to VB.NET because of the VB.NET compiler limitations. We apologize for any inconvenience...

Question Comments

Added By: Tony Tadros at: 12/11/2012 4:51:05 AM    

Hello Devexpress ,

do yo have any update about such functionality,do you have a plan to create or update current rows from excel as built in in the future

Added By: Dennis (DevExpress Support) at: 2/5/2013 10:55:49 PM    

@Tony: Here is a recent blog post on this functionality:
http://community.devexpress.com/blogs/eaf/archive/2012/12/29/orm-magic-importing-from-any-datasource.aspx

You can find more solutions in www.devexpress.com/issue=AS10553

Added By: Andreas Mummenhoff at: 8/22/2013 7:50:48 PM    

Hello Dennis,

regarding VB conversion and porting to 13.1, here a short guide:

At first you have to fix one line in the C# project to convert it to 13.1
...
RuleSetValidationResult validationResult =
                                    Validator.RuleSet.ValidateTarget(
                                    nestedImportObjectSpace, obj, new ContextIdentifiers(DefaultContexts.Save.ToString()));

After that you can use a converter to create a VB solution.
Then in the VB project Dennis.ImportData, you have to fix the delegate definitions:
...
Public Delegate Function ImportDataDelegate(Of T)(
               ByVal objectSpace As IObjectSpace, <[ParamArray]> ByVal args() As Object) As T

Public Delegate Function ValidateDataDelegate(Of T)(
               ByVal data As T, <[ParamArray]> ByVal args() As Object) As Boolean

and at least you have to be correct in creating a delegate in

Public Shared Function CreateCoolPersonImportDataFromExcelDelegate() As ImportDataDelegate(Of Person)
     Return Function(os As IObjectSpace, args() As Object) As Person
               Throw New NotImplementedException("TODO: you can use the FileHelpers library to ...")
          End Function

End Function

Then the project will run in VB too :-)

Added By: Fernando Minguet at: 6/16/2016 11:34:04 AM    Is this implementation still based on UnitOfWork? I couldn't find any reference to UnitOfWork in the code, as found in K18260.

Per K18260: "...The use of the XAF's ObjectSpace class is not recommended here because it is not as lightweight as the UnitOfWork."

Best Regards,


Added By: Dennis (DevExpress Support) at: 6/17/2016 8:22:11 AM    @Fernando:  I apologize for the confusion, because the K18260 article is outdated. We will consider updating it. It is also correct to use independent (that doesn't belong to a View) XPObjectSpace/XPNestedObjectSpace classes here and this approach is actually demonstrated in this example implementation.

How to bind the grid to Columns and Summaries specified in ViewModel

$
0
0
This example shows how to put columns and data summary definition logic in the ViewModel and setup the Grid Control.
Question Comments

Added By: DavidGG at: 6/20/2016 1:45:26 AM    Hi,

I have downloaded the vb.net version and it does not run.
System.Reflection.TargetInvocationException was unhandled
  
  Message=Exception has been thrown by the target of an invocation.
  
Any ideas?

Thanks
Added By: Elliot (DevExpress Support) at: 6/20/2016 1:57:34 AM    

Hello David,

I've created a separate ticket on your behalf (T393961: VB version of the T273154 code example does not compile). It has been placed in our processing queue and will be answered shortly.

How to create a custom action type with a custom control (BarCheckItem), associated with it

$
0
0

This example demonstrates how to represent an action via the BarCheckItem. For this purpose, an ActionBase descendant (CheckableSimpleAction) is implemented. This is done because it is required to save the checked state of the action. CheckableSimpleAction uses a custom action item (CheckActionItem), which represents it in the UI via a BarCheckItem. Action item is a connector between the abstract entity Action and a particular UI element. When the form's menu is created, XAF creates action items for all actions placed to this form via action containers. This operation is performed by the BarActionItemsFactory and the ActionControlsSiteController. Since we have implemented a custom action type, it is required to implement a custom BarActionItemsFactory to assign an appropriate action item to actions of this type. The custom BarActionItemsFactory is registered via the custom factory provider (MyBarActionItemsFactoryProvider).
Note that in most cases, it is not required to implement a custom action and action item. It is sufficient to customize the existing action item via the BarActionItemsFactory.CustomizeActionControl event. This approach is demonstrated in the How to: Customize Controls Associated with an Action topic.
An example for ASP.NET is available here: How to create a custom action type with a custom control in Web

Note for versions 14.2, 15.1: Currently, custom action types are not supported in our new form templates. Refer to the How to add a checkbox to the toolbar ticket to learn how to add a BarCheckItem to new templates.

Question Comments

Added By: Alexandre Miller at: 6/19/2016 9:15:31 AM    Is this still the same in 16.x? It seems BarActionItemsFactoryProvider.CreateBarActionItemsFactory() is never run.Added By: Alexey (DevExpress Support) at: 6/20/2016 3:18:58 AM    

Hello,

I've created a separate ticket on your behalf (T394010: E1977 with version 16.1). It has been placed in our processing queue and will be answered shortly.

Is it possible to show group column headers in the same line?

$
0
0

This feature is available out-of-the-box starting from version 15.2.4. Use the GridView.OptionsView.ShowGroupPanelColumnsAsSingleRow property. 

For earlier versions:


This example demonstrates how to display group column headers in the same line, so, the group panel's height is as minimal as possible.
  
To accomplish this task, it's necessary to create a custom grid as described in the How to create a GridView descendant class and register it for design-time use KB article. Furthermore, inherit the GridViewInfo and override its CalcGroupPanelRowDrawInfo and CalcGroupPanelHeight methods.

Question Comments

Added By: D. Samsonoff at: 1/3/2014 7:26:38 AM    

But you still end up with a connecting line drawn under. Looks quite nasty.

How to enable the Multi Selection feature in VGridControl

$
0
0

This feature is available out-of-the-box starting from version 16.1

For earlier versions:

These examples illustrate how to enable the Multi Selection feature in the VGridControl. Simply place the SelectionProvider component onto a form. Since this component implements the IExtenderProvider interface, the MultiSelect property will be shown for the VGridControl in the Visual Studio Property Grid. So, you will be able to turn this option on at design time. At runtime, use the SelectionProvider.SetMultiSelect method.


In short, selection operates in a similar manner as in the GridControl. By holding SHIFT, you can select cell ranges while by holding CTRL, you can select individual cells. In addition, category rows can be selected as well.


In the case of a MultiEditorRow, separate cells within this row can be selected by holding CTRL. If you hold SHIFT, a whole MultiEditorRow will be selected.

Question Comments

Added By: Alex B. at: 6/2/2015 10:58:48 PM    

Is it also possible to highlight the header cells, i.e. all selected cells in the left (=first) column?

Added By: Nadezhda (DevExpress Support) at: 6/3/2015 1:17:31 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: How to change cell color when using multi select mode . This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.


How to calculate summary based on the total summary of another column

$
0
0

Within the GridView.CustomSummaryCalculate event handler, it's impossible to access a total summary calculated against another column. The total summary can be obtained within the GridView.CustomDrawFooterCell and GridView.CustomDrawGroupRowFooterCell event handlers. Here, you can obtain a total summary value using the GridSummaryItem.SummaryValue property, and GridView.GetGroupSummaryValue method. For convenience, we suggest that you set the GridGroupSummaryItem.Tag property of group summary items to user friendly values. So, you can use these values to easily obtain a necessary GridGroupSummaryItem from the GridView.GroupSummary collection.

Question Comments

Added By: Gunleif Bjartalid at: 4/7/2013 3:48:23 AM    

How can you change the format of calculated value to {0:c2}
now format is 1,40367865433345678789990 - how to make Kr 1,40

Added By: Uriah (DevExpress Support) at: 4/7/2013 11:54:22 PM    

Hello Ganleif,

I have created a new ticket on your behalf to discuss this issue: How to change the format of a summary value?. Please bear with us. We will answer your question as soon as possible.

Added By: Volker Niemeyer at: 6/21/2016 3:08:20 AM    This solution don't work for me.

I have create two Items (Gut and Schlecht) and one item to calculate (Anteil):
[VB.NET]
Dim item1 As GridGroupSummaryItem = New GridGroupSummaryItem() item1.FieldName = "Gut" item1.SummaryType = DevExpress.Data.SummaryItemType.Sum item1.DisplayFormat = "{0:#.##} kg" item1.ShowInGroupColumnFooter = .tblReport.Columns("Gut") .tblReport.GroupSummary.Add(item1)Dim item2 As GridGroupSummaryItem = New GridGroupSummaryItem() item2.FieldName = "Schlecht" item2.SummaryType = DevExpress.Data.SummaryItemType.Sum item2.DisplayFormat = "{0:#.##} kg" item2.ShowInGroupColumnFooter = .tblReport.Columns("Schlecht") .tblReport.GroupSummary.Add(item2)Dim item4 As GridGroupSummaryItem = New GridGroupSummaryItem() item4.FieldName = "Anteil" item4.SummaryType = DevExpress.Data.SummaryItemType.Average item4.DisplayFormat = "{0:0.##} %" item4.ShowInGroupColumnFooter = .tblReport.Columns("Anteil") .tblReport.GroupSummary.Add(item4)
Now I wan't to calculate them:

[VB.NET]
PrivateSub gridView1_CustomDrawRowFooterCell(ByVal sender AsObject, ByVal e As FooterCellCustomDrawEventArgs) Handles tblReport.CustomDrawRowFooterCellIf e.Column.Name = "colAnteil"ThenDim view As GridView = CType(sender, GridView)Try e.Info.DisplayText = Convert.ToDecimal(view.GetGroupSummaryValue(e.RowHandle, CType(view.GroupSummary("Schlecht"), GridGroupSummaryItem))) / Convert.ToDecimal(view.GetGroupSummaryValue(e.RowHandle, CType(view.GroupSummary("Gut"), GridGroupSummaryItem))) * 100Catch ex As Exception MsgBox(Err.Description)EndTryEndIfEndSub

I've got a NULL exception. Can you help?

Regards
Volker



Added By: Sasha (DevExpress Support) at: 6/21/2016 3:42:34 AM    

Hello,

I've created a separate ticket on your behalf (T394457: The NullReferenceException occurs in the "How to calculate summary based on the total summary of another column" example). It has been placed in our processing queue and will be answered shortly.

How to get visible items in ViewModel when working with TreeListView

$
0
0

By default, TreeListView does not have a property where you can bind an item collection from a ViewModel and get visible (not filtered) items. This example demonstrates how to create such a property in a custom TreeListView. To implement this, it is necessary to create GridControl, TreeListView, and TreeListDataProvider descendants. This sample is applicable only when TreeListView uses Key Field and Parent Field to create its hierarchy.

Drag-and-drop data rows from one grid to another

$
0
0

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.

Question Comments

Added By: Carlos Arias at: 10/9/2012 1:52:58 PM    

GridControl grid = sender as GridControl;
grid always null ???

Added By: Amit Ghuge 1 at: 3/12/2015 8:12:15 AM    

Thanx Dear fro reply me i'll do it

Added By: david ola at: 11/5/2015 5:41:44 AM    

1. 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?

Added By: Brendon Muck [DevExpress MVP] at: 11/5/2015 7:44:57 AM    

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 AM    

Hello 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 AM    

Thanks 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.

Added By: Sasha (DevExpress Support) at: 11/6/2015 8:35:08 AM    

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.

Added By: Javier Martinez Llinás at: 6/21/2016 9:28:33 AM    
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 localize WPF Scheduler UI with the Localizer class descendant

How to keep master and detail view column widths synchronized

$
0
0

When you have a master-detail view and for some reason don't want to use the AutoColumnWidth option, the detail view is still stretched to accommodate the entire master view's width. So, in this example we've decided to create a grid view that changes this behavior and synchronizes the detail view's width with the mater view's columns.
We create and register a GridView descendant that introduces the AutoSynchronizeDetailsLayout option by using a descendant of the GridOptionsView class. If this option is enabled and the AutoColumnWidth option is disabled the new behavior takes effect. The detail view's width is now calculated based on the master view columns' width, so, the detail view ends up with the last master view's column.
In addition, if the number of detail and master view columns is equal, the detail view's columns are aligned with that of the master view for even a smoother view.

Question Comments

Added By: andrei shannou at: 8/9/2013 5:46:31 AM    

Thanks,

It works, but a little buggy. Try to group a grid by any column, then change the width of any column. I seems to fall in infinite loop. Tried to find out why, but failed. Will appreciate your help if any.

Added By: andrei shannou at: 8/9/2013 6:39:35 AM    

Got it. Should be

                        rowVisibleIndex = GetNextVisibleRow(rowVisibleIndex);
                        rowHandle = GetRowHandle(rowVisibleIndex);

Added By: andrei shannou at: 8/9/2013 7:00:51 AM    

by the way, horizontal scrolling is also broken :-(

Added By: Mona Ghanathe 1 at: 6/22/2016 2:17:57 AM    In the example application, the master row does not expand. As a result I'm unable to determine if there is a scrollbar that comes up and if the columns are aligned.
In our application, we have one grid control consisting of 3 grid views under it. When the 3rd grid view (detail view) has been expanded, the vertical scrollbar takes up some space and as a result the detail view columns are not aligned with the master view. 
I'm unable to take reference from this ticket to resolve my issue because the master row does not expand when I run the example application attached with this ticket. Added By: Svetlana (DevExpress Support) at: 6/22/2016 3:20:11 AM    

Hello,

I've created a separate ticket on your behalf (T394960: A master row is not expanded). It has been placed in our processing queue and will be answered shortly.

How to use editors with Server Mode data sources

$
0
0

Starting with version 15.2ComboBoxEditLookUpEdit, and ListBoxEdit support synchronous server mode data sources out of the box.

If you are using an older version or prefer asynchronous (Instant Feedback) data sources, use a custom PopupBaseEdit descendant implemented in this example.
Please take special note that the custom editor from this example uses non-documented methods intended for internal use. Thus, the implementation for different DevExpress versions may be different. This example contains projects for multiple major releases - please make sure that you have chosen the correct version before downloading the project.

Question Comments

Added By: Andrew Thornton at: 7/19/2013 10:32:51 AM    

Hi,

Just upgraded to 13.1.5, and this no longer compiles. Quite a few undocumented things looked to have changed.
Can we have a 13.4/5 version that works please?

Thanks.

Added By: Justin Zeng at: 4/17/2014 4:32:51 AM    

It seems many problem, can this function to be support in new version ?

Added By: Ivan (DevExpress Support) at: 4/27/2014 10:42:28 PM    

Hi Justin,

We cannot guarantee that this functionality will be available in the latest version. For now, you can try to extend this example manually. If you face difficulties doing this, do not hesitate to contact us.

Added By: Viktor Faerman at: 5/9/2014 1:57:04 AM    

Hi Alex,

how to implement this custom editor with MVVM?
Thanks, Viktor

Added By: Michael Ch (DevExpress Support) at: 5/9/2014 4:14:02 AM    Hello,

I have created a separate thread for your questions: How to implement a custom editor from the E4560 example with MVVM. Please refer to it for future discussion.

Thanks,
Michael

Added By: David Lemieux at: 8/12/2015 10:09:43 AM    

This probably does the trick for standalone lookup editors, but I have doubts about using this inside a grid. If my understanding of both the code below and the grid's mechanics is correct, a query will be issued for each and every cell for which such an editor is present. Therefore, if you have 20 records on screen with five columns each having such an editor, that's a hundred of connections opening, querying and closing right there. And EVEN with just ONE column, it will still be under-performing when it will be sorted, grouped or filtered. Even for the non-virtualized rows.

This needs a proper solution. Urgently.

Added By: Ivan (DevExpress Support) at: 8/13/2015 3:01:37 AM    

David, you are correct. The editor we implemented in this example is not designed to be used inside GridControl. With the current implementation, a new source/context will be created for each visible grid cell. Please refer to my comment in the LookUpEdit - server mode support ticket, where I clarified our plans regarding this feature.

Added By: Alexei Corduneanu 2 at: 9/4/2015 7:27:11 AM    

I'm trying to use this approach together with WcfInstantFeedbackDataSource.
As SelectedItem I'm setting the Item I've saved in the database previously. And I'm having a problem with loading the LookUpEdit value back because I'm getting "Value cannot be converted" error. I guess it's happens because the Item is not present in the datasource.
What should be a correct way to load the value back to this control?

Added By: Ilya (DevExpress Support) at: 9/4/2015 12:30:46 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T286248: How to modify E4560 so it properly works with a WcfInstantFeedbackDataSource. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Alexei Corduneanu 2 at: 10/6/2015 7:57:35 AM    

How could I achieve multiple selection using this control?

Added By: Ilya (DevExpress Support) at: 10/6/2015 11:27:36 AM    

Hi,
I have extracted your inquiry into a separate thread: How to enable multiple row selection in the LookUpEdit implementing Server Mode (E4560). Let's continue the discussion there.

Added By: Billy P at: 10/26/2015 7:40:23 PM    

How can I assign a null value when the text is cleared, like the behavior of AssignNullValueOnClearingEditText for ComboBoxEdit?

Added By: Michael Ch (DevExpress Support) at: 10/26/2015 10:07:05 PM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T304633: How to assign a null value when the text is cleared. This ticket is currently in our processing queue. Our team will address it as soon as we can.

ASPxDashboardDesigner - How to save dashboards to a data base

$
0
0

This example shows how to create a custom dashboard storage that allows storing dashboards in a data base. It uses the System.Data.SqlClient members to connect and operate an MS SQL server data base. 

A custom dashboard storage should implement one of the following interfaces: IDashboardStorage or IEditableDashboardStorage.

IDashboardStorage provides functionality to open and edit dashboards available in the storage. 
XDocument LoadDashboard(string dashboardID) - returns a dashboard by its ID in the XDocument format, which describes an object model of the dashboard.
IEnumerable<DashboardInfo> GetAvailableDashboardsInfo() - returns a list of IDs and Captions of dashboards available in the data storage.
void SaveDashboard(string dashboardID, XDocument dashboard) - updates the dashboard with new settings by its id.

IEditableDashboardStorage inherits the IDashboardStorage interface and contains one additional method that allows adding new dashboards to the storage.
string AddDashboard(XDocument dashboard, string dashboardName) - takes a dashboard definition with its caption, saves it to the data storage, and returns the ID of a new saved dashboard.

Additionally, this example contains an SQL Server data base backup file and SQL query, which can be used to recreate a data base used in this example on your side. 

See also: How to save dashboards created in ASPxDashboardDesigner to a DataSet.

This example applies to the Web Dashboard Designer starting from v2016 vol 1. To learn how to achieve this goal in previous versions, refer to the OBSOLETE - ASPxDashboardDesigner - How to save dashboards to a data base example.


GridView - How to use Callback Mode for the ComboBox column

$
0
0

UPDATED:

Starting with version v2016 vol 1 (v16.1), a built-in combo box editor can operate in callback mode. 

For earlier versions:
At this moment, GridView does not support Callback Mode for the built-in combobox editor in ComboBoxDataColumn: GridView - Support callback mode for the built-in editor of the MVCxGridViewColumnType.ComboBox column. However, in some scenarios it is required to use ComboBoxDataColumn in Callback Mode, for instance, when the ComboBox' data source is too large. In this case it is necessary to use templates. This example demonstrates how to implement Callback Mode ComboBox in Edit Form and in Auto Filter Row of the GridView.
See also:
Using Callbacks

OBSOLETE - ASPxDashboardDesigner - How to save dashboards to a data base

$
0
0
Note: This example applies to Community Technology Preview (or alpha) version of the Web Dashboard Designer introduced in version 15.2.9. Starting from v2016 vol 1, the dashboard storage architecture is changed. To learn how achieve this goal in newer versions, refer to the ASPxDashboardDesigner - How to save dashboards to a data base  example.
This example shows how to create a custom dashboard storage that allows storing dashboards in a data base.
Custom dashboard storage should implement the IDashboardStorage interface, that contains the following public methods:

string CreateNewDashboard() - creates a new dashboard and saves it to a storage. Returns an ID of the created dashboard.
XDocument GetDashboard(string id) - returns a dashboard by its id in the  XDocument format that describes an object model of the dashboard. 
IEnumerable<string> GetDashboardIDs() - returns a list of IDs of dashboards available in the data storage .
void UpdateDashboard(string id, XDocument document) - updates the dashboard by its id with new settings.
Question Comments

Added By: David Ösztreicher at: 5/26/2016 10:15:07 AM    I'm trying to apply this to the recent 16.1.2 release but it seems that the IDashboardStorage signatures have changed.
Can you provide a link to updated documentation or code examples?
Added By: John (DevExpress Support) at: 5/27/2016 4:29:46 AM    Hi David,
I have created a separate ticket for your question: ASPxDashboardDesigner - How to save dashboards to a data base in 16.1 Let's continue our discussion there.

How to display custom controls instead of the standard cell editor

$
0
0
This example demonstrates how to display custom controls instead of a cell's in-place editor.
• If an end-user tries to edit a cell located in the "Order Date" column of a worksheet table, the DateEdit control is displayed, so that the user can select the required date in the drop-down calendar.
• If the end-user tries to edit a cell in the "Category" column of a table, the LookUpEdit appears allowing the user to select one of predefined values.
• And finally, if the end-user activates a cell located in the "Discount" column, the CheckEdit control is displayed. It gives the user the true/false option to apply a 10% discount to the total amount.

To implement this behavior, subscribe to the SpreadsheetControl.CellBeginEdit event that is raised before the cell editor is activated, and then use the SpreadsheetControl.GetCellBounds method to obtain boundaries of the currently edited cell. Cell boundaries are defined by an instance of the System.Drawing.Rectangle class. Display the custom control over the cell editor by assigning the returned rectangle to the Control.Bounds property to specify the custom control's size and location.

Starting from v16.1, this method of supplying custom cell editors is outdated. For details and an updated example, refer to How to: Assign Custom In-Place Editors to Worksheet Cells.
Question Comments

Added By: Mani Duraisamy at: 7/2/2015 8:36:53 AM    

Can I implement the above in a ASP.NET MVC application? Thanks.

Added By: Oleg (DevExpress Support) at: 7/3/2015 12:12:39 AM    

Hello Mani,
To process your recent post more efficiently, I created a separate ticket on your behalf: T263003: How to use custom controls for editing cell values in the ASP.NET MVC Spreadsheet control. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

How to display a custom control over the worksheet cell

$
0
0

This example demonstrates how to use the SpreadsheetControl.GetCellBounds method to display the ComboBox control over a worksheet cell preventing end-users from entering a wrong value in a cell. Each time an end-user clicks a cell in a particular column, the ComboBox appears, allowing the user to select one of the predefined values.

Starting from v16.1
, this method of supplying custom cell editors is outdated. For details and an updated example, refer to How to: Assign Custom In-Place Editors to Worksheet Cells.

Question Comments

Added By: Joe Sherwood 1 at: 1/7/2016 11:25:47 AM    

How can I do this in ASP.NET Spreadsheet?

Added By: Andrey (DevExpress Support) at: 1/8/2016 12:50:21 AM    

Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T331857: How to use the approach described in the 'How to display a custom control over the worksheet cell' example for ASPxSpreadsheet. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

XL Export API - Examples

$
0
0

This example demonstrates how to use the XL Export API to create spreadsheet files in XLSX, XLS and CSV formats.

This project introduces API properties and methods used to perform the following operations:
- Create a workbook, worksheets, rows, columns and particular cells
- Apply predefined, themed and custom formatting to worksheet cells
- Apply conditional formatting rules
- Enable filtering and group data
- Apply data validation rules
- Assign formulas to worksheet cells
- Specify page settings
- Specify print options
- Insert pictures
- Insert hyperlinks
- Specify document properties

Starting from v2015 vol.2:
- Insert and modify sparklines
- Apply different fonts to specific text regions within a cell
- Create image hyperlinks
- Display a worksheet from right to left

Starting from v2016 vol.1:
- Create a table
- Apply a table style to a table
- Format the table elements
- Total data in a table
- Create calculated columns

Question Comments

Added By: Piotr Tworek at: 12/21/2015 11:34:23 PM    

Hi
This project not compatible with version VS 2010 pro
Piotr

Added By: George (DevExpress Support) at: 12/22/2015 12:55:53 AM    Hi,

Thank you for your message!
We will update this example as soon as possible. Please bear with us.Added By: George (DevExpress Support) at: 12/22/2015 1:01:58 AM    

Hi,

I've updated this example, so now it is available for the Visual Studio 2010 application.
If you need further assistance, let me know.

Added By: Piotr Tworek at: 12/22/2015 1:25:38 AM    

Thx

Added By: Piotr Tworek at: 12/22/2015 1:27:11 AM    

Still example not working in VS 2010

Added By: Piotr Tworek at: 12/22/2015 1:29:48 AM    

See attached screen
Ups; I do not add attach

Added By: George (DevExpress Support) at: 12/22/2015 2:26:34 AM    Hi,

It seems that there was some internal technical problem. I've tested it again and now it is working correctly. Please try to download this example once more time and let us know your results.
I look forward to your response.
Viewing all 7205 articles
Browse latest View live


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