Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views
Hello, guys.
I have 2 buttons on the page1. I also have splitter which ContentURL changes depending on what button is pressed.
The ContentURL pages are "havy" and take some time to get loaded. So I'd like to know if there is some possibility to show LoadingPanel while the loading in progress?

With respect, Valery.
Batoha
Top achievements
Rank 1
 answered on 22 Jul 2010
1 answer
115 views
I sometimes like to format the code in the Html tab to make it more readable (i.e. adding spacing, etc.).  I save the html to a database using the radeditor1.Content property.  When I retrieve the html from the database and assign it back to the .Content property my formatting is lost.  Is there any way to prevent the Html tab from reformatting the code?

Thanks.
Dobromir
Telerik team
 answered on 22 Jul 2010
3 answers
63 views
Hello!
I'm trying to use a RadGrid with two of the columns grouped.

If I try to group the two collums day are displayed at the same level like this:

Group A  Group 1
Data
Group A Group 2
Data
Group B Group 1

I would like to display the data this hierarchical way:

Group A
   Group 1
           Data
   Group 2
           Data
Group B
   Group 1
            Data

In this demo http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/outlookstyle/defaultcs.aspx if I drag From column I get the appearance I wish to have on my form.

My pseudo-code of what I have in the GroupBy zone:


<telerik:RadGrid.....

<
GroupByExpressions>
                     <telerik:GridGroupByExpression>
                         <SelectFields>
                             <telerik:GridGroupByField FieldAlias="Field1" FieldName="Field1" HeaderValueSeparator=" : " SortOrder="Ascending" >
                             </telerik:GridGroupByField>
                             <telerik:GridGroupByField FieldAlias="Field2" FieldName="Field2" SortOrder="Ascending" FormatString="{0:D}"
                                 HeaderValueSeparator=" : "></telerik:GridGroupByField>
                         </SelectFields>
                         <GroupByFields>
                             <telerik:GridGroupByField FieldName="Field1" SortOrder="Ascending"> </telerik:GridGroupByField >
                             <telerik:GridGroupByField FieldName="Field2" SortOrder="Ascending"></telerik:GridGroupByField>
                         </GroupByFields>
                     </telerik:GridGroupByExpression>
                 </GroupByExpressions>
...</telerik:RadGrid>
Daniel
Telerik team
 answered on 22 Jul 2010
4 answers
129 views
Hi,
   
In telerik grid I have six columns,and grid have 1000+ records.Suppose a user select 10 records from this .I want to have a validation in which user had selected right columns or not.For this I have to Get the vlaue of 3 rd column from grid for the selected records and have check  and based on the result i have to show a message.

For selecting row i am using client select column

             var grid = $find("<%=GridName.ClientID %>");
             var MasterTable = grid.get_masterTableView();
                 for (var intcount = 0; intcount < MasterTable.get_selectedItems().length; intcount++)
                {
                    var row = MasterTable.get_selectedItems()[intcount];
                    var FieldValue = MasterTable.getCellByColumnUniqueName(row, "ColumnName").innerHTML;
               }

Problem I am facing is : If the selected column is in different page(Paging) then I am not able to get the reference of that.
its giving me index out of bound exception.

How can we get the selected column values irrespective of paging

Please help me.

Thanks
A2H
Tsvetoslav
Telerik team
 answered on 22 Jul 2010
3 answers
102 views
Hey,

So - I'm having a very strange issue with a RadContextMenu that we're using. Here's the scenario:

I'm editing this object on the page, when changes occur they are marked in a hidden field. When I right click on the object, it parses the information in the hidden field and creates the RadMenuItems to display in the context menu.

HOWEVER: I can't seem to get the items to clear. I need to clear the items every time I show the context menu, which is what I believe I'm doing. I will get "item1", "item2", "item1", "item2" if I open it twice.

Here's the important code:

var contextMenu = $find(itemContextMenu);
    $telerik.cancelRawEvent(e);
    if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) {
    contextMenu.trackChanges();
 
    contextMenu.get_items().clear();
 
    var item1 = new Telerik.Web.UI.RadMenuItem();
    item1.set_text("item1");
    contextMenu.get_items().add(item1);
 
    var item2 = new Telerik.Web.UI.RadMenuItem();
    item2.set_text("item2");
    contextMenu.get_items().add(item2);
 
    contextMenu.commitChanges();
    contextMenu.show(e);
}

I've attempted to re-create the scenario in a new rad website, but it works just as expected.

Anyone have any ideas? Thanks!
Yana
Telerik team
 answered on 22 Jul 2010
1 answer
136 views
Hi,

I have a small problem with autosize option. Sometimes it just resize the window to minimum. It doesn't happen every time.
Georgi Tunev
Telerik team
 answered on 22 Jul 2010
1 answer
179 views
Hi,
the title might be a little confuse, but it is exactly my problem.

I have a RadMultiPage (with RadTabStrip, but I don't think that matters) with PageView. Inside each PageView I have a RadSplitter with two RadPanes and inside one of the two RadPanes a RadGrid. When page loads the Grid remains..."compressed" in the sense that the width of the grid does not get stretched to 100%.
I've tried to put a third PageView with just background color to be sure that the problem is RadGrid that does not expand and not RadPane. The test says that RadPane is ok and that the Grid remains "not stretched".
I'm attaching a sample below.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TEST.aspx.vb" Inherits="TEST" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <style type="text/css">
    html, body, form
    {
        height:100%;
        border:0px;
        margin:0px;
        }
         
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
     
    <telerik:RadSplitter ID="RadSplitter2" runat="server" Width="100%" Height="100%" Orientation="Horizontal">
     
        <telerik:RadPane ID="RadPane3" runat="server" Width="100%" Height="26px">
         
            <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">
                <Tabs>
                    <telerik:RadTab Text="First" Value="First" PageViewID="PV0"></telerik:RadTab>
                    <telerik:RadTab Text="Second" Value="Second" PageViewID="PV1"></telerik:RadTab>
                    <telerik:RadTab Text="Third" Value="Third" PageViewID="PV2"></telerik:RadTab>
                   
                </Tabs>
            </telerik:RadTabStrip>
         
        </telerik:RadPane>
     
        <telerik:RadSplitBar ID="RadSplitBar2" runat="server" Visible="false"></telerik:RadSplitBar>
         
        <telerik:RadPane ID="RadPane4" runat="server" Width="100%" Height="100%">
     
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Width="100%" Height="100%">
             
                <telerik:RadPageView ID="PV0" runat="server" Width="100%" Height="100%">
                 
                    <telerik:RadSplitter ID="RadSplitter1" runat="server" Width="100%" Height="100%" Orientation="Horizontal">
                     
                        <telerik:RadPane ID="RadPane1" runat="server" Height="32px" Width="100%">
                            Top PV0
                        </telerik:RadPane>
                         
                        <telerik:RadSplitBar ID="RadSplitBar1" runat="server" Visible="false"></telerik:RadSplitBar>
                         
                        <telerik:RadPane ID="RadPane2" runat="server" Width="100%" Height="100%">
                         
                            <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SDS0"
                                GridLines="None" Height="100%" Width="100%" style="border:0;outline:none;">
                                <MasterTableView AutoGenerateColumns="False" DataSourceID="SDS0" style="border:0;outline:none;">
                                    <RowIndicatorColumn>
                                        <HeaderStyle Width="20px" />
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn>
                                        <HeaderStyle Width="20px" />
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="Column1" DataType="System.Int32"
                                            HeaderText="Column1" ReadOnly="True" SortExpression="Column1"
                                            UniqueName="Column1">
                                        </telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                             
                            <asp:SqlDataSource ID="SDS0" runat="server"
                                SelectCommand="SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4"
                                ConnectionString="<%$ ConnectionStrings:DBConn %>">
                            </asp:SqlDataSource> 
                                   
                        </telerik:RadPane>
                         
                    </telerik:RadSplitter>
                     
                     
                </telerik:RadPageView>
                     
                <telerik:RadPageView ID="PV1" runat="server">
                 
                    <telerik:RadSplitter ID="RadSplitter3" runat="server" Width="100%" Height="100%" Orientation="Horizontal">
                         
                            <telerik:RadPane ID="RadPane5" runat="server" Height="32px" Width="100%">
                                Top PV1
                            </telerik:RadPane>
                             
                            <telerik:RadSplitBar ID="RadSplitBar3" runat="server" Visible="false"></telerik:RadSplitBar>
                             
                            <telerik:RadPane ID="RadPane6" runat="server" Width="100%" Height="100%">
                             
                                <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="SDS1"
                                    GridLines="None" Height="100%" Width="100%" style="border:0;outline:none;">
                                    <MasterTableView AutoGenerateColumns="False" DataSourceID="SDS1" style="border:0;outline:none;">
                                        <RowIndicatorColumn>
                                            <HeaderStyle Width="20px" />
                                        </RowIndicatorColumn>
                                        <ExpandCollapseColumn>
                                            <HeaderStyle Width="20px" />
                                        </ExpandCollapseColumn>
                                        <Columns>
                                            <telerik:GridBoundColumn DataField="Column1" DataType="System.Int32"
                                                HeaderText="Column1" ReadOnly="True" SortExpression="Column1"
                                                UniqueName="Column1">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                 
                                <asp:SqlDataSource ID="SDS1" runat="server"
                                    SelectCommand="SELECT 11 UNION SELECT 12 UNION SELECT 13 UNION SELECT 14"
                                    ConnectionString="<%$ ConnectionStrings:DBConn %>">
                                </asp:SqlDataSource> 
                                       
                            </telerik:RadPane>
                             
                        </telerik:RadSplitter>
                         
                    </telerik:RadPageView>
                     
                    <telerik:RadPageView runat="server" ID="PV2" BackColor="Red" Width="100%" Height="100%"></telerik:RadPageView>
                               
            </telerik:RadMultiPage>   
        </telerik:RadPane>
         
    </telerik:RadSplitter>
     
     
     
     
    </form>
</body>
</html>

I've put all the code needed, including DataSources in the page itself so there is no code behind.
I haven't been able to figure out the problem, but my entire solution is based on this schema and I'm desperately looking for a solution.

Many thanks in advance.

Lorenzo 
Rosen
Telerik team
 answered on 22 Jul 2010
2 answers
109 views
hi,
In my application for all grid columns filtering is true.but for one column
they set "AllowFiltering"=false.
now i changed that to "AllowFiltering"=true.
when i am running the application filter is visible for that column.but it is not performing filtering
action.to do filter on that column do i have to set any properties?
suggest me in this,i am new to using this telerik controls.
thanks
shiva
Top achievements
Rank 1
 answered on 22 Jul 2010
2 answers
135 views
I think what I'm asking is very basic but I can't figure out what I'm doing wrong.

I have a grid with a tooltip. I'm using the demo for the grid and tried to adjust it to work with my database. It's in vb. I'm getting the following error when I hover over a link that has the tooltip.:

Object references not set to an instance of an object. Thank you for any help.

asp.x page:
<%@ Register Src="ProductDetails.ascx" TagName="ProductDetails" TagPrefix="uc1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    
    <link rel="Stylesheet" href="StyleSheet.css" />
</head>
<body class="BODY">
    <form id="Form1" method="post" runat="server">
    
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
       
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="ManualClose"
        Width="250" Height="350" runat="server" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
        Position="MiddleRight">
    </telerik:RadToolTipManager>
    <telerik:RadGrid ID="RadGrid1" Width="550" runat="server" DataSourceID="SqlDataSource1"
        GridLines="None" OnItemDataBound="RadGrid1_ItemDataBound" AllowPaging="true"
        AllowSorting="true" PageSize="10" OnItemCommand="RadGrid1_ItemCommand">
        <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
            DataKeyNames="CustomerID" DataSourceID="SqlDataSource1" Dir="LTR" Frame="Border"
            TableLayout="Auto">
            <Columns>
                <telerik:GridBoundColumn CurrentFilterFunction="NoFilter" DataField="CustomerID" Display="false"
                    DataType="System.Int32" FilterListOptions="VaryByDataType" ForceExtractValue="None"
                    HeaderText="ProductID" ReadOnly="True" SortExpression="CustomerID" UniqueName="CustomerID">
                </telerik:GridBoundColumn>
                <telerik:GridTemplateColumn HeaderText="Applicant" SortExpression="Applicant">
                    <ItemTemplate>
                        <asp:HyperLink ID="targetControl" runat="server" NavigateUrl="#" Text='<%# Eval("Applicant") %>'></asp:HyperLink>
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridBoundColumn AllowSorting="true" DataField="CompanyName" HeaderText="Supplier"
                    SortExpression="CompanyName" UniqueName="CompanyName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn AllowSorting="true" DataField="UnitPrice" DataFormatString="{0:C}"
                    HeaderText="Price" SortExpression="UnitPrice">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings>
                <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
                </EditColumn>
            </EditFormSettings>
        </MasterTableView>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:BureauConnectionString %>"
            SelectCommand="SELECT * FROM [bureauSummary]"></asp:SqlDataSource>
    
    </form>

vb code behind code:
Imports System.Web.SessionState
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Imports Telerik.Web.UI

Imports System.IO

Namespace Telerik.Web.Examples.ToolTip.TargetControlsAndAjax
    Partial Public Class DefaultVB
        Inherits System.Web.UI.Page
        Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs)
            Me.UpdateToolTip(args.Value, args.UpdatePanel)
        End Sub
        Private Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
            Dim ctrl As Control = Page.LoadControl("ProductDetails.ascx")
            panel.ContentTemplateContainer.Controls.Add(ctrl)
            Dim details As ProductDetails = DirectCast(ctrl, ProductDetails)
            details.ProductID = elementID
        End Sub
        Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
            If e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then
                Dim target As Control = e.Item.FindControl("targetControl")
                If Not [Object].Equals(target, Nothing) Then
                    If Not [Object].Equals(Me.RadToolTipManager1, Nothing) Then
                        'Add the button (target) id to the tooltip manager

                        Me.RadToolTipManager1.TargetControls.Add(target.ClientID, (TryCast(e.Item, GridDataItem)).GetDataKeyValue("CustomerID").ToString(), True)
                    End If
                End If
            End If
        End Sub
        Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs)
            If e.CommandName = "Sort" OrElse e.CommandName = "Page" Then
                RadToolTipManager1.TargetControls.Clear()
            End If

        End Sub
    End Class
End Namespace


ProductDetails.ascx  code:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ProductDetails.ascx.cs"
    Inherits="Telerik.Web.Examples.ToolTip.TargetControlsAndAjax.ProductDetails" %>

<table runat="server" style="width: 100%" id="ProductWrapper" border="0" cellpadding="2"
    cellspacing="0">
    <tr>
        <td style="text-align: center;">
            <asp:FormView ID="ProductsView" DataSourceID="ProductDataSource" DataKeyNames="CustomerID"
                runat="server" OnDataBound="ProductsView_DataBound">       
               
                <ItemTemplate>
                    <asp:Label CssClass="title" ID="Category" runat="server"><%# Eval("CoApplicant")%></asp:Label>
                    <hr />
                    <span class='title'>Equifax:</span>
                    <asp:Label CssClass="info" ID="Label1" runat="server"><%# Eval("Equifax")%></asp:Label>
                    <br />
                    <span class='title'>Experian:</span>
                    <asp:Label CssClass="info" ID="Label2" runat="server"><%# Eval("Experian")%></asp:Label>
                    <br />
                    <span class='title'>ID/OFAC:</span>
                    <asp:Label CssClass="info" ID="Label3" runat="server"><%# Eval("IDOFACText")%></asp:Label>
                    <br />
                </ItemTemplate>
            </asp:FormView>
        </td>
    </tr>
</table>

<asp:SqlDataSource ID="ProductDataSource" runat="server"
    ConnectionString="<%$ ConnectionStrings:BureauConnectionString %>"
    SelectCommand="SELECT * FROM [bureauSummary] WHERE ([CustomerID] = @CustomerID)">
    <SelectParameters>
        <asp:Parameter Name="CustomerID" Type="Int32" />
    </SelectParameters>
</asp:SqlDataSource>

ProductDetails.ascx  code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Drawing;
using System.IO;


namespace Telerik.Web.Examples.ToolTip.TargetControlsAndAjax
{

    public partial class ProductDetails : System.Web.UI.UserControl
    {

        public string ProductID
        {
            get
            {
                if (ViewState["CustomerID"] == null)
                {
                    return "";
                }
                return (string)ViewState["CustomerID"];
            }
            set
            {
               
                ViewState["CustomerID"] = value;
            
            }
        }


        protected void Page_Load(object sender, EventArgs e)
        {
            this.ProductDataSource.SelectParameters["CustomerID"].DefaultValue = this.ProductID;

            this.DataBind();
        }


        

    }
}




Patricia Byrne
Top achievements
Rank 1
 answered on 22 Jul 2010
3 answers
301 views
hi

I need filter expressions like "hi%there" with function "contains" in the grid. Having EnableLinqExpression = true makes a FilterExpression like "....contains(hi%there)", but finds no records.
Having EnableLinqExpression = false makes "LIKE '%hi%there%'" and returns all records, if there where no filter at all.

Any Ideas?

Ralph
Maria Ilieva
Telerik team
 answered on 22 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?