EzDevInfo.com

devexpress interview questions

Top devexpress frequently asked interview questions

Devexpress Xtragrid how to add Combobox editor to column

I want to place a combobox inside one column of a Xtragrid. I can bind the combobox to array values but how do you bind the combobox to the column?


Source: (StackOverflow)

DevExpress Controls not visible in Visual Studio toolbox

I've just installed DXperienceXaf-10.1.7, but the controls do not appear in the VS 2010 toolbox, neither do they show in the VS 2008 toolbox. I have run ToolboxCreator from the 'start menu' shortcut to no avail. This is on Windows 7.

Is there a fix for this? If not, how do I manually add them? There seem to be a zillion dll files.


Source: (StackOverflow)

Advertisements

What does Licenses.licx really do for DevExpress controls?

What does Licenses.licx really do for DevExpress controls? I deleted all the lines in the licenses.licx and there is no difference. I successfully compiled and run my application. I am suprised with this behavior. Can anyone explain me the details about what is happening?


Source: (StackOverflow)

Why would overwriting .GetHashCode clear these databound values in WinForms?

We have run into a strange bug that we're having problems debugging.

We have a MDI workspace that uses Microsoft CAB, DevExpress components, and .Net 3.5.

If users open two windows in the workspace that each contain a UserControl bound to two separate data models, then minimize both of them, the first window to minimize is getting it's bound fields cleared when the second one minimizes.

The .Equals and .GetHashCode methods of the data model have been overridden so that both data models are considered equal. If we change that so they are unique, we do not get this behavior.

Here's some example pseudocode showing the problem

var a = new MyWindow();
a.DataModel = new SomeClass(123);
a.ShowInMdiWorkspace();

var b = new MyWindow();
b.DataModel = new SomeClass(123);
b.ShowInMdiWorksace();

a.Minimize();

// If SomeClass.GetHashCode() is overwritten to consider two objects  
// as equal based on the value passed in, then the data bindings for A
// get cleared on this call. If SomeClass.GetHashCode is unique, then 
// this problem does not happen.
b.Minimize();

Here's the Call Stack when the second window gets minimized:

enter image description here

At the EndEditSession() call in the stack trace above, it is calling EndEditSession for the second window minimized, while by the time the Stack Trace gets past the [External Code] to the OnChange breakpoint I have set, it is firing the change method in the first window.

EndEditSession() is something custom we have implemented which looks something like this

protected void EndEditSession()
{
    IBindingValue bv = null;

    if (_bindingValues == null)
        return;

    if (_data != null)
    {
        foreach (KeyValuePair<string, IBindingValue> kvp in _bindingValues)
        {
            bv = kvp.Value;
            if (bv.IsBindable)
                ((PropertyManager)bv.Component.BindingContext[_data]).EndCurrentEdit();
        }
    }

}

_bindingValues gets populated when the UserControl initializes its data bindings. The key fields are the name of the bound control, and the value fields are a custom object which stores the control itself, its name, its bound value, and default value. bv.Component returns the control that the binding is set on, which in the case of my testing is a customized DevExpress LookupEdit

_data contains the data model for the UserControl, and I can verify that it is set to the instance for the second window.

My original thought was that the BindingContext was shared so the wrong PropertyManager was being returned, however I have verified that the .BindingContext for the two forms and controls are separate.

Is it possible that having two separate copies of a UserControl bound to two separate instances of a data model would get its bindings mixed up when the GetHashCode method has been overridden so that the two objects are considered equal?

I am not very familiar with the inner workings of the WinForms binding system, or with exactly how CAB's MDI workspace gets managed.

My theory is that when the first window minimizes, it is unloading the controls to save on memory, then when the second window minimizes the internal hash table that manages the bindings is incorrectly getting confused and running an update to take data from the first minimized window (which is now blank) and updating its datasource. There are plenty of holes in this theory, however its the only thing I can think of.


Source: (StackOverflow)

Visual Studio 2010 - XAML Editor Extraordinarily Slow

Has anyone else experience incredibly slow performance in the XAML editor in VS 2010? If I have a new project with a limited number of files, the performance is fine. However, if I have a project with a larger number of XAML files, the XAML editor hangs intermittently every few seconds, making it almost impossible to use.

I should also note that the performance is only slow in one particular project where I am referencing DevExpress 2010. I am not certain if this is related.

Any suggestions on solutions to this problem would be greatly appreciated.

Chris


Source: (StackOverflow)

ASPxGridView Group Summary Sorting - It sorts the content inside, not the summary outside

I have done grouping of the grid by giving groupindex to a particular column in aspxgridview.

For example, if I am grouping by means of persons name and the orders details made by that particular person would come in the detailed content when the arrow is clicked to view the content.

When I click on the header fields to sort, it is sorting the data inside the groupContent but it is not used for sorting the data of groupsummary

I am showing all the totals as a part of group summary besides the person's name.

For example if you see in the below link:

https://demos.devexpress.com/ASPxGridViewDemos/Summary/GroupSortBySummary.aspx

If you sort by company name, the content would be sorted, but the summary showing the country and sum has no means to get sorted at outside level.

Please do suggest me options to work out this problem.

Thanks.


Source: (StackOverflow)

How to set datasource for fields in XtraReports without having a dataset at design time?

I'm taking a look now to XtraReports reporting tool and there's something that I don't get it yet.

How do I set the data source for a certain field (showed in the report as a Label I guess), without having to build a connection, adapter and dataset at design time but doing it programatically.

For example, I can have a table called "User" with 3 fields: UserId, Username and Password. In the report designer I place 3 labels (and here's my question) set the datasource for showing the 3 database fields. Then, in the code behind, I create a connection, execute a command, fill a dataset, create a report instance, pass the datatable to it and show the report preview.

Is this possible? Let me know if it isn't clear enough.

Thanks!


Source: (StackOverflow)

How to disable row header in devexpress xtragrid

I want to know how to disable row header in Devexpress xtragrid (grid control ) . In normal we are disabling the property of DataGrid by row header visbile into false.But how to disable in Devexpress.

Please Help

EDIT

enter image description here


Source: (StackOverflow)

c#: how to force trailing zero in numeric format string?

I need to display float as

1.00
1.50
1.55
1.60

The following is what I see using f2 format.

1.
1.5
1.55
1.6

Is there a way to force the trailing 0 to appear?

(I'm using a DevExpress SpinEdit control and trying to set the display and edit format.)


Source: (StackOverflow)

How to get the selected row values of DevExpress XtraGrid?

Consider the following picture

enter image description here

I get the selected row values in the three textboxes shown in the figure when i click a cell using following code.

void dataGridView1_CellClick_1(object sender, DataGridViewCellEventArgs e) {
    TBGRNo.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
    TBSName.Text = dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
    TBFName.Text = dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
}

My Question is: how will I do the same thing in DevExpress XtraGrid control??


Source: (StackOverflow)

ASPxGridView rows per page

How can I set maximum number of rows per page to 5? Default is 10.

<SettingsPager PageSize="5"> 

... doesnt work

thanks for help


Source: (StackOverflow)

How far did DevExpress get with Javascript refactoring?

Over a year ago, I remember watching one of DevExpress evangelists previewing or at least promoting rich Javascript refactoring (beyond just limited intellisense) within the Visual Studio shell, I recall part of CodeRush/DevExpress product line. I was excited.

On checking today (lmgtfy) I can find only very very limited reference to it, just one small italtic line about beta in product description, no videos, no blog posts, no community buzz. Was it dropped? Vapourware? Poor implementation that they dont even promote it?

With Javascript arguably the most popular programming language ever and with a VM for it on practically every machine in last 10 years, why is editor support so poor? (Compared with those for Java and C#)? You see the likes of ScottGu bragging we now have jQuery intellisense but compare this to richness of C# support in the IDE it is a joke.

Someone once said since there are many style of writing Javascript a rich IDE (beyond intellisense) with refactoring support is difficult, but if several engines can interpret/compile JS with same result surely it should be hard to analysis it to support stuff like rename variable, extract method, move to another namespace (or JS minic of it), etc.. Am I wrong?


Source: (StackOverflow)

How to dismiss all WPF menus, popups, etc. by DevExpress programmatically to get around WindowsFormsHost related issue?

I want it to behave such as you clicked somewhere on application. (which collapses all menus, drop downs, etc)

Actually, I'm trying to get around the interoperability related focus issue you get when you are hosting Windows Forms controls in a WPF application using WindowsFormsHost: If a WPF menu/popup by DevExpress is open and you click on a Windows Forms control, the menu/popup doesn't get dismissed automatically.

Now I have a lot of Windows Forms controls in the WindowsFormsHost and also a lot of DevExpress controls in the WPF area. To get around this easily, I have added a message filter to hook all clicks in application and then I see if the clicked control was a Windows Forms control. Then I need to do something to make all WPF menus, etc. by DevExpress dismissed if they were open.

GlobalMouseHandler globalClick = new GlobalMouseHandler();
System.Windows.Forms.Application.AddMessageFilter( globalClick );

GlobalMouseHandler:

public class GlobalMouseHandler : System.Windows.Forms.IMessageFilter
{
  private const int WM_LBUTTONDOWN = 0x201;
  private const int WM_RBUTTONDOWN = 0x204;

  public bool PreFilterMessage( ref System.Windows.Forms.Message m )
  {
    if( m.Msg == WM_LBUTTONDOWN || m.Msg == WM_RBUTTONDOWN )
    {
      var c = System.Windows.Forms.Control.FromHandle( m.HWnd );

      if( c != null )
        // TODO: CLOSE ALL WPF MENUS ETC
        // Didn't work: MainWindow.Instance.ARandomControl.Focus();
    }

    return false;
  }
}

Source: (StackOverflow)

Is this indictment of DevExpress WPF controls valid and what is a good alternative vendor?

My company is starting a major greenfield development project using DevExpress WPF controls. I just read this critical review of their WPF controls:

"... DevExpress developers completely misunderstood WPF when they developed their WPF controls. I really cannot impress upon you sufficiently well just how much of a displeasure it is using their controls. I feel absolutely terrible (almost guilty) about talking about a vendor with such negativity, but they have made a serious mistake in their WPF suite, it has been a singular source of the most abject frustration for me in about a decade of developing software."

Do you agree that DevExpress does not understand the WPF paradigm and will cause our developers grief during development and maintenance? Can you suggest an alternate vendor of WPF controls? I'm looking for a vendor with WPF controls that will enhance our application while fitting well with the WPF API, binding and MVVM.

Edit:

The link (above) to the critical blog post is now broken. The original author has stated:

"I wrote the original article, and have decided to work with DevExpress in a private capacity after speaking with them so I have regrettably decided to remove the post. Regards, Ira"

Edit 2:

As of July 2012 the link to the post has be re-activated.


Source: (StackOverflow)

Devexpress or Telerik Controls comparison [closed]

I am looking into purchasing either dev express or telerik to aid in the development of our applications.

We are mainly an asp.net outfit but we are starting to make more and more use of silverlight and mvc.

I would like to know what people have thought about:

  • Feature set
  • Ease of use
  • Documentation
  • Pricing and Licensing

Source: (StackOverflow)