Friday, December 18, 2015

Telerik Controls : Hiding PageSize functionality in Telerik RadGrid Control


Hiding the “PageSize” Option under RadGrid not to change the Page Size in RadGrid
 

Want to share the code snippet to hide the same.

 

protected void rgContractorsListAll_ItemDataBound(object sender, GridItemEventArgs e)

{

            #region GridPagerItem

            if (e.Item is GridPagerItem)

            {

                GridPagerItem pager = (GridPagerItem)e.Item;

                Label lblPageSize = (Label)pager.FindControl("ChangePageSizeLabel");

                if(lblPageSize != null)

                    lblPageSize.Visible = false;

 

                RadNumericTextBox txtPageSize = (RadNumericTextBox)pager.FindControl("ChangePageSizeTextBox");

                if (txtPageSize != null)

                    txtPageSize.Visible = false;

 

                Button btnChangePageSize = (Button)pager.FindControl("ChangePageSizeLinkButton");

                if (btnChangePageSize != null)

                    btnChangePageSize.Visible = false

            }

            #endregion

}

Wednesday, December 2, 2015

Visual Studio : Templates are missing while creating a new project

Missing templates in Visual Studio installed templates

1. Close All the Visual Studio Instances.
2.  Open visual studio command prompt.
2.  Run below command on the prompt.
 
 
devenv /installvstemplates
 
 
After finishing the command, if you will open Visual Studio, your missing templates would be available.