Is there a way to make default popup editor readonly

4 posts, 1 answers
  1. Randy Hompesch
    Randy Hompesch avatar
    148 posts
    Member since:
    Nov 2008

    Posted 24 Jul 2019 Link to this post

    I want to display 4 or 5 columns and 3 or 4 columns that are hidden in the grid. I want to create a custom command to show the all the columns in a readonly fashion. 

     

    Basically, use the default dialog for popups and make it readonly. Can it be done?

    Thanks … Ed

     

  2. Answer
    Marin Bratanov
    Admin
    Marin Bratanov avatar
    5792 posts

    Posted 26 Jul 2019 Link to this post

    Hello Ed,

    Generally you can make a field non-editable by setting its .Editable(false) setting in the grid model. You can find an example of the syntax in the following demo - see the ProductID field: https://demos.telerik.com/aspnet-core/grid/odatav4. If you use the popup editing mode, you won't be able to edit such fields and you'll get their details as read-only. Here's a basic example of how that would look like base off our demos (the ProductName is the column in question): https://dojo.telerik.com/@bratanov/eHEQabip.

    If you want to display details only without editing, I think that starting off from this demo will be easier, as it already does the same thing: https://demos.telerik.com/aspnet-core/grid/custom-command.


    Regards,
    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Muhammad
    Muhammad avatar
    1 posts
    Member since:
    Aug 2020

    Posted 17 Aug 2020 in reply to Marin Bratanov Link to this post

    Is there a read only popup for Blazor to show the details.  Something like https://demos.telerik.com/aspnet-core/grid/custom-command
  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5792 posts

    Posted 17 Aug 2020 Link to this post

    Hello Muhammad,

    In Blazor, the Editable parameter of the column removes it from the built-in popup editor altogether.

    If you want to show certain details, you should implement a custom command that shows the desired details in, for example, a TelerikWindow. That's very similar to implementing a custom edit popup (just remove the editors, of course, and put the desired content in the dialog - say, a component that will receive a record ID as a parameter and fetch the necessary data on demand through its OnParametersSetAsync lifecycle method).

    Another very similar approach is to use a tooltip to show the row details and load them on demand (it shows the approach I outlined above for using a component and its OnParametersSetAsync method).

    You may also find interesting this feature request for a property grid that will display all fields of an object. If so, Vote for it to raise its priority, and Follow it for email status updates.

     

    Regards,
    Marin Bratanov
    Progress Telerik

Back to Top