Evaluation questions

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    8 posts
    Member since:
    Nov 2012

    Posted 24 Jan 2013 Link to this post

    Hi

    1) I have a requirement to display numeric data in the grid (this must be read-only), and in the first cell of each column I need to display a "unit of measure" (e.g. "cm", mm", "m", etc). Additionally, when the user clicks on this cell it should display a combobox, allowing the user to change that column's measurement unit (selecting an item will involve recalculating the data that is bound to the grid). So my question is - is it possible to mix content in a column like this, i.e. numeric data in some cells, and a combobox in another cell? Can you suggest a way to achieve this?

    2) I want the ability to right-click a cell and bring up some kind of popup or panel containing a simple form (various controls to manipulate that cell's contents). I've found how to select the cell that has been right-clicked, but is there a way that I can position the popup/panel over that cell? Or am I best just using a WPF Popup control with Placement="MousePoint"?

    3) In some cells we need to provide a visual indication of the validity of the data, but rather than use colours to do this, we would like to display an image/icon alongside the numeric value. Is this possible?

    Thanks in advance
    Andrew
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 25 Jan 2013 Link to this post

    Hello Andrew,


    On your first question :
    As it is not recommended to mix data in such way I may suggest the following approach :

    1. Using the HeaderCellTemplate property you may place the measurement unit cells within the header cells ( e.g. under the header cell). Inside the template you may place an user control of yours that displays the unit and shows a combo on edit.

    Another alternative would be to use secondary headers and place this above the regular headers ( if applicable to your case.

    In short - Yes it would be possible.  I will be glad to assist you in the implementation of this one.


    On your second question : Are you trying to implement some kind of context menu  ? Let me know the details and I am sure we can think of some descent solution.


    Greetings,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Andrew
    Andrew avatar
    8 posts
    Member since:
    Nov 2012

    Posted 25 Jan 2013 Link to this post

    Hi,

    Thanks for your reply. Do you have a link to a sample or documentation regarding the "secondary headers"? I can't find anything about this feature.

    Re the second question: it will be more complex than a context menu. More like a small form with controls like buttons, textboxes, dropdowns, etc. I can probably implement it using a WPF Popup control, but would welcome suggestions if there is a better way!

    Thanks again.
  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 30 Jan 2013 Link to this post

    Hello Andrew,

    You can have a look at this online demo. It is for Silverlight. however exactly the same approach should be applicable to WPF as well. You may find the WPF version of the demo inside your local WPF version of the QSF demos.

    Regarding the second question - you can use the CellTemplate or the CellEditTemplate property of RadGridView in order to place your own user control inside the cell. It may have a popup and some logic to hide show it e.g. on mouse events. 

    Let me know in case you meet any troubles during the implementation.

    Greetings,
    Pavel Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top