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

Hi!

I'm having trouble on keeping a radgrid pager updated after rebinding the table with new contents (without reloading the page). The assembly version of the control i'm using is 3.1.1.0.

On the top of the page, I have a radgrid filled with several rows using NeedDataSource.
Then, below this grid, I have another radgrid which is filtered according to the row selected on the first grid (multiple row selection is not allowed). However, the pager of the second grid is not being updated accordingly. The "total number of items" shown in the pager is never updated when I bind new contents to the second grid. For instance, the grid is showing 2 items and the pager says there are a total of 5 items.

The binding of the second grid is being done using grid2.bind() each time a new row is selected on the first grid.

Do I have to update the pager info manually? How can I solve this?

Thanks!

Pavlina
Telerik team
 answered on 22 Dec 2010
1 answer
75 views
Hi

I am using Telerik rad window (version: 1.9.7.0). The page takes considerable amount of time to load. The page that is opening contains only one textbox and one label. I have tried the property "ShowContentDuringLoad=true" but still the page is taking same amount of time to load.
Please let me know If there is any other property that can help me in improving the performace?

Thanks in advance.
Georgi Tunev
Telerik team
 answered on 22 Dec 2010
1 answer
62 views
I have two treeviews (left and right).  Our client want to prevent a user from dragging certain types of items from left or right, but to avoid confusion on their part, does not want left to have any items suppressed.  I have the check in the drop handler to see if the node should not be able to be dropped, and it works.  The only problem is that I'm trying to show a rad alert when I stop the drop from happening, but I cannot get it to pop:

<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
<telerik:RadAjaxManagerProxy ID="ajxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="left">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="left" LoadingPanelID="alpT" />
                    <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="right">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="right" LoadingPanelID="alpT" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
 
...
 
 
<telerik:RadTreeView ID="right" BorderColor="Black" BorderWidth="1px" OnClientContextMenuItemClicked="ContextMenuClick"
                    runat="server" OnNodeDrop="HandleDrop" OnNodeEdit="HandleNodeEdit" OnNodeExpand="right_NodeExpand"
                    EnableDragAndDrop="True" EnableDragAndDropBetweenNodes="True" Height="475px"
                    Width="350px" meta:resourcekey="trvResource1">
...
</telerik:RadTreeView>


Protected Sub HandleDrop(ByVal sender As Object, ByVal e As RadTreeNodeDragDropEventArgs)
...
    If ShouldNotDrop Then
        Dim strScript As String = "Sys.Application.add_load(function(sender, args) {if (!args.get_isPartialLoad()){radalert(""You cannot drop this here"");}});"
        Telerik.Web.UI.RadAjaxManager.GetCurrent(Me).ResponseScripts.Add(strScript)
   End If
...
End Sub


The code does get written to the page, I've verified this with fidler, but for some reason it is not popping up.
Nikolay Tsenkov
Telerik team
 answered on 22 Dec 2010
1 answer
121 views

I have created a Asp.Net 4.0 page with a RadGrid. One of the columns (ConsignorId) indicates that this record belongs to a specific Consignor.  A consignor can have multiple records. I would like to have a input(textbox) where I could enter a ConsignorId and then render the page with the RadGrid with only the records selected based on the consigorid entered.

Could you refer me to an example for this? I am new to telerek.

Thank You

Princy
Top achievements
Rank 2
 answered on 22 Dec 2010
1 answer
124 views
Hello,

I have encountered with a strange problem.

I have a 2 list boxes, one source second a destination.
all the items have checkboxes.
Also i have 2 button: "select all","unselect all" on eatch list box header.

The code for the buttons:

function selectAllClick(sender) {
    var listBox = $find(sender);
  
    var items = listBox.get_items();    
    items.forEach(function(itm) { itm.set_checked(true); });
}
  
function unSelectAllClick(sender) {
    var listBox = $find(sender);
  
    var items = listBox.get_items();
    items.forEach(function(itm) { itm.set_checked(false); });
}

The problem:

If i check an any item on one of the listboxes and then transfer it to another listbox and then i click on the unselect all button,
then the item that was transfered (the item transferd when it was checked already) still remain check. the button doens't influence
on the item.

Same problem if i reorder items and then try to check them all with the button.

any ideas?

Thanks
Oren
Genady Sergeev
Telerik team
 answered on 22 Dec 2010
5 answers
69 views
Hi,

I have using scrolling in my grid. but header alignment is not including width. i have attached image.

I have set width size=740px in radgrid and also using

 <ClientSettings>
                            <Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" />
                        </ClientSettings>

Data showing into scrolling but header not shown.

Find the attached image please give me a tips ASAP.

Thanks in Advance,
Dhamu.
Pavlina
Telerik team
 answered on 22 Dec 2010
1 answer
326 views
Hi,

Im wondering if anyone has a quick solution to this.

I was going to implement a CheckBox in the RadWindow Footer that said 'I Agree' however RadWindow doesnt have Footer Templates.

The only way i see if the use the content template with an Iframe.. unless there another way?
Georgi Tunev
Telerik team
 answered on 22 Dec 2010
1 answer
86 views
Hi,

I have a VS2010 solution in which I have a project containing an AJAX-Enabled WCF service, and also a RADControls Web Application. The default.aspx has a RADTreeView control on it. I load the root nodes and first children of the tree in the onPageLoad event server side. I have the treeview control configured to hit a WCF web service when expanded. Here is my markup...

<

 

 

telerik:RadTreeView ID="RadTreeView1" Runat="server" DataTextField="Text" DataValueField="Value" Skin="Outlook" Width="477px">

 

 

 

<Nodes>

 

 

 

<telerik:RadTreeNode runat="server" AllowDrag="False" AllowDrop="False" AllowEdit="False" Checkable="False" Text="Laws">

 

 

 

</telerik:RadTreeNode>

 

 

 

</Nodes>

 

 

 

<WebServiceSettings Path="http://localhost:22222/TMLawsDataService.svc" Method="LoadTreeNodes" UseHttpGet="false" />

 

 

 

<DataBindings>

 

 

 

<telerik:RadTreeNodeBinding Depth="1" ExpandMode="WebService" />

 

 

 

</DataBindings>

 

 

 

</telerik:RadTreeView>

 

If I have my WCF service in the same project as the default.aspx, then I don't need to specify a port number in the "Path" attribute of the WebServiceSettings node, and the RADTreeControl does a POST back to my WCF service onClientSideClick to get the next level of tree children, and everything works great. BUT if I want to be a good little coder and separate my projects out into a WCF project and a Web Client project under the same solution, then in order to debug my solution in Visual Studio, I need to set 2 startup projects, and run them on different assigned ports. When I do that, I need to specify the port number in the "Path" attribute of the WebServiceSettings node, and when I do that, the RADTreeView control suddenly decides to send GET requests to my service, which my WCF service does not handle, it only takes POSTs.

I have tried setting the "UseHttpGet" attribute of the  WebServiceSettings node to "false" but it does not affect the call type happening from the client to the server when a tree level is expanded by the user. If I specify a port #, it uses GET, if not, it uses POST.

SO... how do I fix this? I must have it do a POST back when I specify a port number on the Path attribute.

thanks for any help

- Roy
Nikolay Tsenkov
Telerik team
 answered on 22 Dec 2010
0 answers
40 views
i have developed one application like the follwing one... so i need to display the items in radlistbox2 whatever i done in radlistbox 1.....

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Demo.aspx.cs" Inherits="Demo" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="SD.LLBLGen.Pro.ORMSupportClasses.NET20" Namespace="SD.LLBLGen.Pro.ORMSupportClasses"
    TagPrefix="llblgenpro" %>
   
<!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>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <div>
    <telerik:radlistbox ID="RadListBox1" runat="server" Height="300px" Width="300px"
                AllowTransfer="True"  DataSortField="Room"  EnableDragAndDrop="true"
                DataTextField="ColorDescription" DataValueField="ColorID"  DataSourceID="LLBLGenProDataSource1"
            Skin="Office2007" TransferToID="RadListBox2" OnTransferred="RadListBox1_Transferred"
                AutoPostBackOnTransfer="true">
                <ItemTemplate>
                    <table>
                        <tr><td style="width: 100px;">
                            <img src='<%# String.Format("General/ImageHandler.ashx?type=color&height=50&width=50&ID=" + "{0}",                        DataBinder.Eval(Container.DataItem, "ColorID")) %>' alt="image" />
                           </td> <td style="width:40px;">
                                <%# DataBinder.Eval(Container.DataItem, "ColorDescription")%>
                            </td>
                            <td style="width: 40px;">
                                <%# DataBinder.Eval(Container.DataItem, "ColorNumber")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:radlistbox>
            
            
            <telerik:radlistbox ID="RadListBox2"    Skin="Office2007" DataTextField="ColorDescription" DataValueField="ColorID" runat="server" Height="300px"
                Width="250px">
                <Items>
               
                </Items>
               
            </telerik:radlistbox>
        <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
        <asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
    
        <llblgenpro:LLBLGenProDataSource2 ID="LLBLGenProDataSource1" runat="server"
            AdapterTypeName="ES.FWPLM.DAL.DatabaseSpecific.DataAccessAdapter, ES.FWPLM.DALDBSpecific"
            DataContainerType="EntityCollection"
            EntityFactoryTypeName="ES.FWPLM.DAL.FactoryClasses.CatalogColorsEntityFactory, ES.FWPLM.DAL">
        </llblgenpro:LLBLGenProDataSource2>
    </div>
    
    </div>
    </form>
</body>
</html>

=====================================================================================================


Code Block:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.Web.UI;
using System.Web.Script.Serialization;

public partial class Demo : System.Web.UI.Page
{
    public int ColorID { get; set; }
    public string ColorDescription { get; set; }
    public string ColorNumber { get; set; }
 

   
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            RadListBox1.DataBind();

        }
    }


    protected void RadListBox1_Transferred(object sender, RadListBoxTransferredEventArgs e)
    {
      
            foreach (RadListBoxItem item in e.Items)
            {
               item.DataBind();
            }
     
        
    }



    protected void Button1_Click(object sender, EventArgs e)
    {
        ListBox1.Items.Clear();
        for(int i=0;i < RadListBox2.Items.Count; i++)
        {
            ListBox1.Items.Add(RadListBox2.Items[i].Text.ToString() + " - " + RadListBox2.Items[i].Value.ToString());
        }
    }
}


======================================================================================================
please guide me soon...
Jagadish
Top achievements
Rank 1
 asked on 22 Dec 2010
8 answers
142 views
Hi,

http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/dynamicajaxsettings/defaultcs.aspx?product=grid

I saw the above link.

My Reruirement 

Can i make the "Add new  record" Button Disable/Hide  while in the edit mode?


Thanks & Regards
Kannan
Kannan
Top achievements
Rank 1
 answered on 22 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?