Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
67 views
Hi,

I am using Master/Details Client-side Data Binding in latest teletik version - RadControls for ASP.NET AJAX Q1 2011 

'This is my WCF service 
 <OperationContract()> _
    Public Function GetdataSelect(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As String, ByVal filterExpression As String) As MyData
        Dim data As GridBindingData = RadGrid.GetBindingData("LinqToSql.DataClassesDataContext", "TrnApproval", startRowIndex, maximumRows, sortExpression, filterExpression)
        Dim result As New MyData()
        Dim db As New DataClassesDataContext
        result.Data = From c In db.TrnApprovals Select c.TrnID, c.ApproverID
       
        result.Count = data.Count
        Return result
    End Function

While connecting with WCF service i am getting below error.

System.InvalidOperationException: Could not find the type specified in the ContextTypeName property of LinqDataSource ''. ---> System.Web.HttpException: Could not load type 'LinqToSql.DataClassesDataContext'. at System.Web.UI.WebControls.LinqDataSourceView.get_ContextType()
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTable(DataSourceOperation operation)
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTableForSelect()
   at System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.WebControls.LinqDataSourceView.Select(DataSourceSelectArguments arguments)
   at Telerik.Web.UI.GridLinqDataSource.GetData()
   at Telerik.Web.UI.RadGrid.GetBindingData(String contextTypeName, String tableName, Int32 startRowIndex, Int32 maximumRows, String sortExpression, String filterExpression)
   at GridBind.GetdataLoad() in E:\Developments\demowcf\App_Code\Gridbind.vb:line 145

Please do the needful.
Princy
Top achievements
Rank 2
 answered on 30 Jun 2011
3 answers
59 views
Hello,

I have a radgrid, which has 25 records displayed.  In the grid is a GridTemplateColumn with a RadComboBox in it.  The combo box has enabled loading on demand.  What I'd like to do is when one combo box loads, load them all.  I don't know if something like that is possible?  It's the same data for all.

Thanks,

Brian
Peter
Telerik team
 answered on 30 Jun 2011
3 answers
123 views
We have found that on pages containing the RadEditor web part, the page references/loads AssetPickers.js and HtmlEditor.js. On our public site, we do not need these files referenced or loaded because the content will only be viewed and will never be edited, therefore we do not need the editor functionality. (We use content deployment to push content to our live site.)

In order to reduce weight and page load time, is there a way to prevent HtmlEditor.js and AssetPickers.js from being referenced or loaded on our public facing site?

Thanks!
Stanimir
Telerik team
 answered on 30 Jun 2011
3 answers
86 views
Hi there,

I'm trying to bind controls in my webApplication to a ViewModel class.
The binding itself works fine, but i got a problem, resolving the correct objects.

I bound a RadGrid to an ObjectDataSource, refering my class "PersonsViewModel"
The select-method is
        public List<Person> GetPersons()
        {
            return DataProvider.GetPeople();
        }

Now I'd like to resolve the selectedItem for example:

        var items = RadGrid1.SelectedItems;
        Person p = items[0].DataItem as Person;

My problem is, that items[0].DataItem is always null.
I don't get why, because the item is databound.



Any help would be apprechiated.
Thanks,

Thomas
Iana Tsolova
Telerik team
 answered on 30 Jun 2011
1 answer
73 views
I am using a LoadOnDemand Combo Box because the amount of data can sometimes be in the 10s of thousands.  I have enabled virtualscrolling and ShowMoreResults.  My question is that when loading data in portions of 100 - when it has to make an ajax call back to the server to get more data - is there a way to show an animated image in the combo box or some type of text like "Loading.." while is retreiving the next batch of data from the server and showing it in the UI?
Princy
Top achievements
Rank 2
 answered on 30 Jun 2011
2 answers
127 views
Hi all,

My project has grown outside the scope of the functionality provided by RadDockLayout. I am hoping to create my own manager class which emulates the functionality currently provided to me by RadDockLayout. 

So, I have classes which inherit from RadDock and RadDockZone, CormantRadDock and CormantRadDockZone. I am letting RadDockLayout manage these objects, but it is a pain to constantly have to cast my RegisteredDocks collection constantly. In addition, I do the same sort of control regeneration that RadDockLayout provides, except applied to more controls. As such, I have a firm understanding of what is needed to manage these controls.

That being said, I would like to make sure I do not miss any hidden dependencies.

So, I use the events for RadDockLayout_SaveDockLayout and LoadDockLayout. I believe I can just append additional code to the Page_Load method to emulate what is occurring in RadDockLayout_LoadDockLayout (please correct me if this is an incorrect belief). I am unsure of how to emulate RadDockLayout_SaveDockLayout -- and would like some advice. How can my manager trigger on this event? 

Other than that, is there anything hidden going on that I should be aware of that would make removing RadDockLayout from a page full of dynamic RadDocks and RadDockZones?

Thanks

Sean
Pero
Telerik team
 answered on 30 Jun 2011
1 answer
49 views

Hi,

We are creating an application that allows users to enter and view news stories. In the news listing screen, we are using a radgrid to display the news stories. Each row shows the news headline and the first two lines of the body of the story. We would like to allow users to click on an icon beside a row to dynamically expand and contract the body of the new story so that the first two lines expands to the full story and then collapses back to the first two lines.

On the initial load of the news listing, we will not load the full body of each story, just the first two lines. So, the expand function will have to retrieve the body. We would prefer to use a Webservice call to retrieve the body of the story.

When the body of the content is expanded, we would like to show some minor animation effects to make the presentation of the story a little more interesting - e.g. have the panel expand downwards a little slower.

What is the best way to accomplish this? We have been using the RadXmlHttpPanel to call the Webservice to get the body of the story, but this control does not provide any effects in displaying the content.

So, in summary, we would like to do the following:

1. Show a list of news stories with the first two lines of the body displayed.
2. The user clicks a button (or "More..." link) to expand the body.
3. A Web Service is called to full body of the story.
4. Once retrieved, the body of the story slowly opens up
5. The user clicks a button (or "Less...") link to contract the body of the story

Any thoughts?
Pero
Telerik team
 answered on 30 Jun 2011
2 answers
236 views
I have created a page with a Master / Detail pair of grids with the help of the excellent tutorial here on the Telerik site.

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/selectedvalue/defaultcs.aspx

I got this working fine from the start. I have the top row in the grid highlighting when the page loads and the details grid responds with the correct data for that grid. Selecting another row on the master works the same way. The details grid updates and joy and happiness abound. :)

The top grid has a simple SqlDataSource that looks like this.

<asp:SqlDataSource ID="dsLocations" runat="server" ConnectionString="<%$ ConnectionStrings:Database_DB1 %>"
        SelectCommand = "select * from GetLocations WHERE loc_User_ID = 44"
        ProviderName="System.Data.SqlClient" >
</asp:SqlDataSource>

As you can see I am hardcoding the userID. This is my test of the system and it works.

It is when I try to set this dynamically the problems start.

First I deleted the SelectCommand parameter from the SqlDataSource above.

<asp:SqlDataSource ID="dsLocations" runat="server" ConnectionString="<%$ ConnectionStrings:Database_DB1 %>"
        ProviderName="System.Data.SqlClient" >
</asp:SqlDataSource>

Then in the Page_PreRender  of the code behind I do this. .

protected void Page_PreRender(object sender, EventArgs e)
{
    dsLocations.SelectCommand = "select * from GetLocations WHERE loc_User_ID = " + user.User_ID.ToString();
 
    if (rgLocations.SelectedIndexes.Count == 0)
    {
        rgLocations.SelectedIndexes.Add(0);
        rgActivities.Rebind();
    }
}

This works in as much as the correct Locations for that UserID are returned.

However there are 3 problems that appear
  • the first row of the grid is no longer longer highlighted ie: rgLocations.SelectedIndexes.Add(0); // fail
  • the details grid is no longer showing the details for the top row on page load id: rgActivities.Rebind(); // fail
  • finally the details grid no longer updates when you select a row from the master table.

I did not bore you with pasting my grids here. Suffice to say they work, as long as I hard code the SelectCommand in the page.

Perhaps Page_PreRender is not the correct place to set the SelectCommand on the data source?

Could someone please shed some light on what is causing this behavior?






Brad
Top achievements
Rank 1
 answered on 29 Jun 2011
2 answers
70 views
http://www.telerik.com/community/forums/aspnet-ajax/grid/setting-the-scroll-height-in-clientside.aspx

broken link inside above thread
http://www.telerik.com/help/aspnet-ajax/grdchangescrollheightatruntime.html
Dan Lehmann
Top achievements
Rank 1
 answered on 29 Jun 2011
1 answer
84 views
Hi,

When I quickly refreshes my webpage, with a set of raddocks that each have a RadXmlHttpPanel with a method to call a webservice to get the content, I get an error foreach RadXmlHttpPanel: 

Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Telerik.Web.UI.RadXmlHttpPanelEventArgs'
cannot be converted to type 'Sys.CancelEventArgs'.
Parameter name: instance

It looks like it is caused by the OnClientResponseError method.
Is this a known issue or can someone explain me why it happens or what I can do to avoid it ?
Pero
Telerik team
 answered on 29 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?