This is a migrated thread and some comments may be shown as answers.

Is there a way to make default popup editor readonly

3 Answers 467 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 24 Jul 2019, 11:51 AM

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

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Marin Bratanov
Telerik team
answered on 26 Jul 2019, 02:36 PM
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.
0
Muhammad
Top achievements
Rank 1
answered on 17 Aug 2020, 05:21 PM
Is there a read only popup for Blazor to show the details.  Something like https://demos.telerik.com/aspnet-core/grid/custom-command
0
Marin Bratanov
Telerik team
answered on 17 Aug 2020, 05:55 PM

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

Tags
Grid
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Muhammad
Top achievements
Rank 1
Share this question
or