Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
241 views

Ok.. after reading the documentation on binding ado.net data service every example seems reflect everything im doing but its still not working. Here is what i have

Service.svc code

 

 

   Public Shared Sub InitializeService(ByVal config As IDataServiceConfiguration)  
        config.SetEntitySetAccessRule("*", EntitySetRights.AllRead)  
        config.SetServiceOperationAccessRule("*", ServiceOperationRights.All)  
    End Sub 

 

 

 

 

 

 

 

  <WebGet()> _  
    Public Function GetSessions() As IQueryable(Of Session)  
        Return (From Sessions In Me.CurrentDataSource.Session _  
                                             Select Sessions)  
    End Function 
 
    <WebGet()> _  
    Public Function GetCount(ByVal where As String) As Integer 
        Return If([String].IsNullOrEmpty(where), CurrentDataSource.Session.Count(), CurrentDataSource.Session.Where(where).Count())  
    End Function 
 


This service works fine..

Here is my web page code

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<%@ Register assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" namespace="System.Web.UI.WebControls" tagprefix="asp" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
        </telerik:RadScriptManager> 
      
    </div> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
        <telerik:RadGrid ID="RadGrid1" runat="server"   
            GridLines="None" AutoGenerateColumns="False">  
              
             <MasterTableView> 
                  
             </MasterTableView> 
             <ClientSettings> 
                 <DataBinding Location="http://localhost:1687/BCSS.svc/"   
                      SelectMethod="GetSessions" 
                      SelectCountMethod="GetCount" > 
                     <DataService TableName="Session" /> 
                 </DataBinding> 
             </ClientSettings> 
 
        </telerik:RadGrid> 
    </telerik:RadAjaxPanel> 
    </form> 
</body> 
</html> 
 

When i run the page it gives me the following error "Cannot find any bindable properties in an item from the datasource "
All of the examples mention i have to a Location,Selectmethod,Selectcountmethod when calling a data service. What am i miss here?

However if i comment out the clientside setting and put in a serverside code on the page load like this it works
 Dim WS As New BCSSEntities(New Uri("http://localhost:1687/BCSS.svc/", UriKind.Absolute))  
 
        Dim query = From Session In WS.Session _  
        Select Session  
 
        Me.RadGrid1.DataSource = query  
        Me.RadGrid1.DataBind() 


Please advise!!
Rosen
Telerik team
 answered on 22 Oct 2009
5 answers
135 views

We are creating an asp.net webpart that is integrated into a Sharepoint site.
The webpart contains an asp:Panel that contains a RadChart control.
This RadChart control can be edited through the Web part configuration settings.

However, if we add the radchart to a RadAjaxPanel,and add this RadAjaxPanel to the webpart controls, and edit the webpart, the webpart doesnot change on first click of Apply button in Web Part Configuration.

The Webpart is refreshed on the second click of Apply button.
This is happening because the sequence of function calls of the EditorPart and Webpart is changing on adding a RadAjaxPanel.

Can you please help asap.

Wih Regards,
Shikha

Sebastian
Telerik team
 answered on 22 Oct 2009
1 answer
312 views
Hi

The alert method of the RadAjaxManager is a very quick and easy way to displays client side message from server side code, which is great.

Is there are way to modify the alert to specify the "title" of the alert box that pops up?

My picture should explain the problem better...

Cheers

Andrew
Shinu
Top achievements
Rank 2
 answered on 22 Oct 2009
1 answer
101 views

I am have RadAjaxManager with more than 40 entries in it with settings to update target controls based on some source control. Just standard need why we need it.

Issue is for some of the events, the RadAjaxManger seems to update/refresh either the whole page or controls that are not supposed to be refreshed.

E.g. following is just excerpt of it. When an event occurs in 'trvRegions', I do not want to update controls ucFilterList or ucVolumeList. But still for trvRegions events, AjaxManager updates these two controls. When such behavior occurs, what is the best way to solve it? Do I have to have each control inside a PANEL or I can directly mention the user controls? How do I find out actually which controls the AjaxManager is going to update (if it is updating more than what I have set?)

Thanks,
Piyush Bhatt.

 

<

 

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true">

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="trvRegions">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="ucQueryFieldSelector"/>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="rcomboFilterFields"/>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="ucFieldList"/>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="ucQueryVolumeSelector"/>

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

<telerik:AjaxSetting AjaxControlID="ucQueryVolumeSelector" EventName="VolumeSelectionChanged">

 

 

 

 

 

<UpdatedControls>

 

 

 

 

 

<telerik:AjaxUpdatedControl ControlID="ucVolumeList"/>

 

 

 

 

 

</UpdatedControls>

 

 

 

 

 

</telerik:AjaxSetting>

 

 

 

...........
</telerik:RadAjaxManager

Pavlina
Telerik team
 answered on 22 Oct 2009
3 answers
215 views
Hi all,

I wonder if there is a possibility to do the following:
Have a textbox and a customvalidator.
Use serverside validation for both, client- and servervalidation
with the clientvalidation through an async server call.
I want to have one validation function on the server for both checks.

I want for example check the entered vale in the textbox against a sql database.

Thanks, Tobi
Martin
Telerik team
 answered on 22 Oct 2009
2 answers
358 views
Hello,

I have a RadTreeView in a UpdatePanel and a RadListView in another UpdatePanel. I must expanded the parent nodes to the right childnode. When i clicked on the childnode, then i load a details from webservice in the ListView in the other UpdatePanel. This works fine.

The problem is, after i clicked on the childnode and loaded the details, the TreeView is unexpanded and the childnode is deselcted. How can I solve my problem?

Here is my code:

<asp:UpdatePanel ID="UpdatePanel2" runat="server" onload="UpdatePanel2_Load">  
            <ContentTemplate> 
                <telerik:RadTreeView ID="rtvLayoutListe" runat="server" AutoPostBack="true" Height="450px"   
                    Skin="Office2007" OnClientNodeClicking="ClientClickHandler"    
                    oncontextmenuitemclick="rtvLayoutListe_ContextMenuItemClick"             
                    OnNodeClick="rtvLayoutListe_NodeClick"   
                    onclientcontextmenuitemclicking="ContextMenuClicking"   
                    onclientnodeclicked="ClientClickedHandler"> 
                .....

                    </

 

ContextMenus>  

 

 

                </telerik:RadTreeView> 

 

 

            </ContentTemplate>  

 

 

</asp:UpdatePanel>
...

<

 

asp:UpdatePanel ID="UpdatePanel1" runat="server">  

 

 

 

<Triggers>
<asp:AsyncPostBackTrigger ControlID="rtvLayoutListe" EventName="NodeClick" />

 

</Triggers>

 

<ContentTemplate>
<h3><asp:Label ID="lblContainerNameH3" runat="server" Text=""></asp:Label></h3> 
<telerik:RadListBox ID="rlbObjectList" runat="server" AllowDelete="True"  

AllowReorder="True" CssClass="rlbObjects" Skin="Office2007" Width="400px"  
onitemdatabound="rlbObjectList_ItemDataBound">  

 

<ButtonSettings ShowTransfer="False" ShowTransferAll="False" /> 

</telerik:RadListBox>
...

 

 

 

 

 

 


Javascript:
function ClientClickHandler(sender, eventArgs) {  
            var node = eventArgs.get_node().get_value();  
            if (!node.startsWith("container-")) {  
                eventArgs.set_cancel(true);  
                return false;  
      }  
} 

C#:

protected

 

void UpdatePanel2_Load(object sender, EventArgs e) 

{

    GenerateTreeView();

}

 


public

 

void GenerateTreeView() 

 

 

{

rtvLayoutListe.Nodes.Clear(); 

 

layoutsql lsql = new layoutsql(); 

 

DataSet ds = lsql.GetLayoutsForManager();  

 

...
}

protected void rtvLayoutListe_NodeClick(object sender, RadTreeNodeEventArgs e)  
    {  
        if (e.Node.Value.StartsWith("container-"))  
        {  
            lblContainerNameH3.Text = "Container: " + e.Node.Text;  
            objectssql osql = new objectssql();  
            rlbObjectList.DataSource = osql.LoadCurrentContainers(int.Parse(e.Node.Value.Substring(10)));  
            rlbObjectList.DataBind();  
            lblContainerNameH3.Text += " - Time: " + new TimeSpan(0, 0, timecounter).ToString();  
        }  
        else  
        {  
            lblContainerNameH3.Text = "";  
        }  
    } 

I saw, after the click on the Node - the UpdatePanel makes a new load. 

How can I prevent a reload of the UpdatePanel?

Reiner
Yana
Telerik team
 answered on 22 Oct 2009
1 answer
93 views
Hello All,

I have the IP address of the user and I want to set one of the columns in the data source of the grid.  In Pseudo code, I want to achieve the following

MyGrid . RowBeingUpdated . Column ("IPAddress).Value = "192.168.1.1";

Could someone advise which event I should use and the syntax to update the cell value.  I have tried to get it working with DataKeyValues, but am not familiar enough yet to get it working.

I have included below the code that I used with the VS2008 default grid, and it works fine for that control.

Thanks in advance, 

Mark Breen
Ireland

<snip>
        protected void LinqDSBoatBuilders_Inserting(object sender, LinqDataSourceInsertEventArgs e)
        {
            BoatBuilder oRec = (BoatBuilder)e.NewObject; //This is my LINQtoSQL data source
            oRec.CreatedOnDate = DateTime.Now;
            oRec.CreatedByIPAddress = GetIPAddress();
        }
</snip>

Sebastian
Telerik team
 answered on 22 Oct 2009
1 answer
94 views
Hi,

I'm using this example: http://www.telerik.com/community/code-library/aspnet-ajax/general/drag-and-drop-between-radgrid-and-radtreeview.aspx from the code library to drag and drop RadGrid rows to a RadTreeView. In this example it is only possible to drop a row onto a Node, but not in between two nodes.

Is there a solution to make this possible?

Thx,
Danny
Sebastian
Telerik team
 answered on 22 Oct 2009
3 answers
104 views
Dear friends,

I have a trouble using RadGrid in SharePoint web part. When I have several web parts on a page and on is updating in UpdatePanel, the grid lines disappear except last 2 columns.

Had anybody saw such bug? Is some workaround available?

Thanks to all!
Dimo
Telerik team
 answered on 22 Oct 2009
1 answer
157 views
Hi, I would like to implement Google-Like filtering in my ListBoxes just as you do in the Google-Like filtering example of the RadGrid.  In other words, I would like to input some text in a textbox on top of the list box so that the list items that appear on the listbox depend on the text that is entered in the textbox.

I would appreciate any ideas or code to help me do this.

Thank you,
Manuel
Paul
Telerik team
 answered on 22 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?