Monday, October 31, 2011

Load RadGrid on Click event

Problem: I Am Using Need data Source, For Binding Telerik Rad Grid,But  I don't Want To Load Rad Grid ,On Page Load Event,Because I want To Load Grid On Click_Button Event.

Solution: First you have to make your RadGrid Visible False on "PageLoad" Event.Then make Visible True on "Click" event of your button. Then Call Function Rebind() it will automatically call Need Data Source and Will Bind Your Rad Grid.

Example:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If IsPostBack = False Then
    'Enter The Code Just First Time When Page Is Load
    RadGrid1.visible=false       
    End If
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
    RadGrid1.visible=True
    RadGrid1.rebind()
End Sub

Note: Need Data Source Function Is Necessary Here

Importance of NeedDataSource event

For advanced features such as Grouping, Sorting, Paging, RadGrid must be bound using declarative data sources or through the NeedDataSource event. When using declarative data sources or the NeedDataSource event, RadGrid can automatically accommodate the appropriate database operations without the need for you explicitly handle any sorting, paging, grouping, and so on.
Also note that you should never call the Rebind() method in a NeedDataSource event handler.You should never call DataBind() as well when using advanced data-binding through NeedDataSource.

Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified


Problem: You have created web application and using telerik controls. Its working fine at your local environment and even at staging. But when you deployed the application on server it throws error "Could not load file or assembly 'Telerik.Web.UI' or one of its dependencies. The system cannot find the file specified."

And suppose ,You have another application on the same server using Telerik controls and it's working fine. But the new application is not.

Solution: After the project fails in runtime this means that your web site is not referencing properly the Telerik.Web.UI.dll assembly. First check the version of dll and then Check if Telerik.Web.UI.dll assembly is located in the bin folder of your web site. If deployed in GAC check your web.config file for a reference of Telerik.Web.UI.dll within the <assemblies> tag.

Problem with RadLoadingPanel


Problem: When you are using RadAjaxManager and RadLoadingPanel for RadGrid ,Sometimes the Loading Panel Icon appears forever.
For example, when You click on the next page, the LoadingPanel Icon appears forever.
But some days later, it runs smoothly.

Solution: Make sure you are not showing the loading panel manually over the updated control OnRequestStart client-side event. If this is the case, please make sure that you hide it OnResponseEnd client-side event.

More Help >>

Monday, October 24, 2011

RadFormDecorator not working in some controls

Problem: RadFormDecorator is working in some controls and not working in some controls.
Solution: This is because of css. If you have applied inline css to any control it over-writes the css of RadFormDecorator ,so it appears that it is not working. Remove the CssClass property in your control and then it will work.

For Example:

<telerik:RadTextBox ID="txt" runat="server" Width="270px" CssClass="bold">
</telerik:RadTextBox>

Two different languages on same page

Problem: How can we write two different languages on same page.
Solution: Suppose you have two text boxes in the first one you want to write English but in the second one you want to write French. Remember that controls have no property to set the language. So you have to download install the keyboard first and then enter the data.