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

How to give custom skin from server side ?

2 Answers 31 Views
Grid
This is a migrated thread and some comments may be shown as answers.
M Kumar
Top achievements
Rank 1
Iron
Veteran
M Kumar asked on 28 Jan 2020, 10:46 AM
Hi,
   In code behind i gave custom skin for grid with following properties Skin ="MaterialGrid" EnableEmbeddedSkins="false" RenderMode="Lightweight", but how to give if grid is created on server side ? 
I am created grid in server side like 
 Dim grid As New RadGrid
        grid.ID = "ListReportGrid"
        ' grid.RenderMode = RenderMode.Lightweight
        grid.AutoGenerateColumns = False
        grid.EnableViewState = False

        'grid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top
        'grid.MasterTableView.CommandItemSettings.ShowPrintButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToPdfButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToCsvButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToExcelButton = True
        'grid.MasterTableView.CommandItemSettings.ShowExportToWordButton = True
        'grid.MasterTableView.CommandItemSettings.ShowRefreshButton = False
        'grid.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = False
        'grid.EnableEmbeddedSkins = False
        'grid.RenderMode = RenderMode.Lightweight
        'grid.Skin =


        grid.AllowSorting = True
        grid.ClientSettings.Scrolling.AllowScroll = True
        grid.ClientSettings.Scrolling.UseStaticHeaders = True
        grid.ClientSettings.Scrolling.SaveScrollPosition = True


        'paging and virtualizaton

        grid.ClientSettings.Virtualization.EnableVirtualization = True
        grid.ClientSettings.Virtualization.InitiallyCachedItemsCount = 2000
        grid.ClientSettings.Virtualization.ItemsPerView = 100
        grid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced

        grid.AllowPaging = True
        grid.PageSize = 1000

        grid.MasterTableView.TableLayout = GridTableLayout.Fixed
        grid.MasterTableView.PagerStyle.Visible = False

So in this how to skin as MaterialGrid ?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 29 Jan 2020, 12:10 PM

Hi M Kumar,

The Skin property expects a string as a value so you can set the custom skin as:

grid.Skin = "MaterialGrid"

 

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
M Kumar
Top achievements
Rank 1
Iron
Veteran
answered on 03 Feb 2020, 01:20 AM
ok Thanks
Tags
Grid
Asked by
M Kumar
Top achievements
Rank 1
Iron
Veteran
Answers by
Rumen
Telerik team
M Kumar
Top achievements
Rank 1
Iron
Veteran
Share this question
or