Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
158 views
Hi There,

Is there a way to enable/disable menu itens without having to select them ?

Thanks.

Marcio Nascimento
Marcio Nascimento
Top achievements
Rank 1
 answered on 11 Aug 2009
4 answers
164 views
Hi,

I have a grid with GridDropDownColumn, similar to this: http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx. Although all the records have values in the GridDropDownColumn, the first record always appears empty, even in the demo above (see Category column). If I sort the grid or use paging, then the value appears correctly. Is this some kind of bug? Is there anything I can do to fix it?

Thanks,
Julia
Julia Shah
Top achievements
Rank 1
 answered on 11 Aug 2009
1 answer
74 views
I have a license for Telerik Q1 2009 version. Can I upgrade to Q2 2009 ?
Thanks
Anil   
Pavlina
Telerik team
 answered on 11 Aug 2009
5 answers
86 views
Hello, I've been reading  alot about custom skins created in Q3 no longer working once you upgrade to 2009 Q1 (build 1527),  I have a input, toolbar and radgrid skin that no longer render properly...can you convert it to work with 2009 Q1...if so what is the process so I can do it myself in the future, I've tried it many times with 2009 Q1 and none of my changes seem to work.  I need to convert to Q1 due to some errors I am getting with the RadToolbar under Q3 2008.

THanks
Pavlina
Telerik team
 answered on 11 Aug 2009
2 answers
144 views
I have a hierarchical RadGrid with 3 levels, each bound to an SqlDataSource. The 3rd level grid has a summary of information, and if you click the (custom) Edit button for the row, a (ASP.NET) DetailsView control (bound to another SqlDataSource) is displayed, letting the user edit lots of fields, including some SQL fields that are also visible in the RadGrid's 3rd table. When the edit is saved in the DetailsView, the 3rd level needs to be refreshed to display the updated information. This is being attempted by the ItemCommand event of the DetailsView.

The problem is that I cannot get the 3rd level table to refresh at all, no matter what I try. Each time, the data stays the same, and if you click on anything in the grid, a nasty error comes up about the viewstate being different. I have tried simple databinding on the 3rd level, and calling DataBind(). I've also tried advanced databinding and calling Rebind() (and also setting DataSource to null). Neither works at all. I can rebind the entire grid, but then it all collapses and I STILL get the error about the viewstate being different.

I'm not sure what to try next??????????
Georgi Krustev
Telerik team
 answered on 11 Aug 2009
4 answers
163 views
I have a rad panel that you can veiw here. http://alpha.clickablecommunity.com/ I populate this from a datatable in the code behind. What I need to do is set ever individual sub node's client clicked, and checkbox clicked event in the code behind. Basically when you expand one of the main nodes and click it, I want the checkbox to become checked and I want a specific js function to run. Also, if they click the checkbox associated with the node, I want the same js function to run. It is kind of something like this
category1
    child 1
    child 2
category2
    child 1
    child 2

Those have checkboxes and I would like to be able to run a function myFunction('someParameter'); on the check box click or on the element click itself. If the user clicks child 1 I would like the checkbox to become checked. I have to do this on the server side because I have to pass in someParameter dynamically from a db. I am completely lost as how to even approach this. Here is my code. Thanks,

<%

@ Master Language="VB" AutoEventWireup="false" CodeBehind="MasterPage.master.vb"

 

 

Inherits="ClickableCommunity.MasterPage" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

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">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

 

<%

@ import namespace="System.Data" %>

 

<%

@ import namespace="System.Data.Sql" %>

 

<%

@ import namespace="System.Data.SqlClient" %>

 

<%

@ import namespace="Telerik.Web.UI" %>

 

<

script runat="server">

 

 

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

 

 

 

If Not Page.IsPostBack Then

 

 

 

Dim tree As RadTreeView = DirectCast(RadPanelBar1.FindItemByText("Events").Items(0).FindControl("RadTreeView1"), RadTreeView)

 

 

'here is where the error is. it is saying that

 

 

'createtable is null

 

tree.DataSource = CreateTable()

tree.DataFieldID =

"ID"

 

tree.DataFieldParentID =

"ParentID"

 

tree.DataTextField =

"Text"

 

tree.DataBind()

 

 

End If

 

 

End Sub 'page_load

 

 

 

'this function creates a datatable for the rad

 

 

'tree that is in the events panel

 

 

Private Function CreateTable() As DataTable

 

 

'set up my connection to the database

 

 

Dim conn As New SqlConnection

 

conn.ConnectionString = ConfigurationManager.ConnectionStrings(

"connectionString").ConnectionString

 

 

Dim table As DataTable = New DataTable()

 

table.Columns.Add(

"ID")

 

table.Columns.Add(

"ParentID")

 

table.Columns.Add(

"Text")

 

 

'this is a counter for the id fields

 

 

'of the data table

 

 

Dim count As Integer = 1

 

 

 

'this adds the parent categories to the

 

 

'datatable

 

 

Dim categoryQuery As New SqlCommand

 

conn.Open()

categoryQuery.Connection = conn

categoryQuery.CommandText =

"select CategoryId, Name from categories"

 

 

Dim cdr As SqlDataReader = categoryQuery.ExecuteReader()

 

 

While cdr.Read()

 

 

 

If (cdr.Item(0).ToString <> "") Then

 

 

table.Rows.Add(

New String() {count.ToString, Nothing, cdr.Item(1).ToString})

 

 

'we have to increment count to keep an id for the data table

 

count = count + 1

 

 

End If

 

 

 

End While 'while cdr.Read()

 

conn.Close()

conn.Open()

 

'this adds the events with their parent category

 

 

'id to the datatable

 

 

Dim eventQuery As New SqlCommand

 

eventQuery.Connection = conn

eventQuery.CommandText =

"SELECT eventid, FK_CategoryID, name from events"

 

 

Dim edr As SqlDataReader = eventQuery.ExecuteReader()

 

 

While edr.Read()

 

 

 

If (edr.Item(0).ToString <> "") Then

 

 

table.Rows.Add(

New String() {count.ToString(), edr.Item(1).ToString, edr.Item(2).ToString})

 

 

'we have to increment count to keep an id for the data table

 

count = count + 1

 

 

End If

 

 

 

End While 'while edr.Read()

 

 

 

Return table

 

 

End Function 'CreateGenreTable

 

 

</

script>

 

<

head runat="server">

 

 

<link href="ClickableCommunity.css" rel="stylesheet" type="text/css" />

 

 

<title></title>

 

 

<asp:ContentPlaceHolder ID="head" runat="server">

 

 

</asp:ContentPlaceHolder>

 

</

head>

 

<

body id="MasterBody" runat="server" style="margin: 0px; height: 100%; overflow: hidden;"

 

 

scroll="no">

 

 

<form id="Form1" method="post" runat="server" style="height: 100%">

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

</asp:ScriptManager>

 

 

<br />

 

 

<asp:ContentPlaceHolder ID="header" runat="server">

 

 

</asp:ContentPlaceHolder>

 

 

<div id="topDiv">

 

 

<div id="image" class="topDivImage">

 

 

<img src="images\logo.jpg" alt="Clickable Community Logo" width="200" height="75" />

 

 

</div>

 

 

<div id="viewMenu" class="viewMenu">

 

Menu goes here

 

</div>

 

 

</div>

 

 

<telerik:RadSplitter ID="RadSplitter1" runat="server" Orientation="Vertical" Width="100%"

 

 

Height="100%" CssClass="AllContent">

 

 

<telerik:RadPane ID="LeftRadPane1" runat="server" Width="220px" Scrolling="Both"

 

 

BorderStyle="None" BorderSize="0">

 

 

<div id="leftPanel">

 

 

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Web20" ExpandMode="SingleExpandedItem"

 

 

AllowCollapseAllItems="false" Width="220px">

 

 

<CollapseAnimation Type="None" Duration="100"></CollapseAnimation>

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Events" Expanded="true">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server">

 

 

<ItemTemplate>

 

 

<telerik:RadTreeView ID="RadTreeView1" runat="server" Skin="Web20"

 

 

CssClass="leftPanelContent" CheckBoxes="true">

 

 

</telerik:RadTreeView>

 

 

</ItemTemplate>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Search" ChildGroupCssClass="leftPanelContent">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Administrator" ChildGroupCssClass="leftPanelContent">

 

 

<Items>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 1">

 

 

</telerik:RadPanelItem>

 

 

<telerik:RadPanelItem runat="server" Text="Child RadPanelItem 2">

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

</telerik:RadPanelItem>

 

 

</Items>

 

 

<ExpandAnimation Type="None" Duration="100"></ExpandAnimation>

 

 

</telerik:RadPanelBar>

 

 

</div>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Forward" EnableResize="false"

 

 

ForeColor='Green' />

 

 

<telerik:RadPane ID="RightRadPane1" runat="server" CssClass="RightPanelPadding" Scrolling="Both"

 

 

BorderStyle="None" BorderSize="0">

 

 

<asp:ContentPlaceHolder ID="MainContent" runat="server">

 

 

</asp:ContentPlaceHolder>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 

 

</form>

 

</

body>

 

</

html>

 

Web Services
Top achievements
Rank 2
 answered on 11 Aug 2009
2 answers
195 views
Hi all,

I've implemented a hierarchy with my grid - master/detail.

One issue:Not every master record has a detail record. I'd like to hide the detail expand image and disable the click for those records without a detail level. Is that possible?

Alternatively, is there a way I can implement my own detail expand image dynamically whe the grid is loading so I can alert the user that a detail record is present?

Thanks!!
JUDY LEE
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
133 views
This is kind of weird, I must have something not configured right.

In my hierarchical radgrid, if I leave mastertable and the detailstable and the detailstable to that one as ServerOnDemand the grid works fine.

If I change it to ServerBind or if I say HierarchyDefaultExpanded="true" then get an error.

ItemID is neither a DataColumn nor a DataRelation for table Request.


System.ArgumentException: ItemID is neither a DataColumn nor a DataRelation for table Request.



Now ItemID is a column in a datatable and Request is a datatable. The error is correct though. There is no ItemID in the Request DataTable. I don't understand why it's looking in that table though.

MasterTable binds to Request DataTable which does not have ItemID, it has ADMRequestID
DetailsTable1 binds to a RequestItems DataTable which does have an ItemID
and DetailsTable2 binds to a ClaimItems DataTable which also has an ItemID

So why it all works on ServerOnDemand but fails if I change it to ServerBind is very weird. I have the parent relations setup, but again, only works on ServerOnDemand.

<telerik:RadGrid ID="grdSearchResults"  
                                        runat="server"  
                                        Skin="Office2007"  
                                        Visible="true"
                                        <SelectedItemStyle BackColor="Wheat" /> 
                                        <%--<HeaderStyle BackColor="White" Font-Underline="true" Font-Italic="true" />--%> 
                                    <MasterTableView Name="Request" 
                                        AutoGenerateColumns="false"  
                                        DataKeyNames="ADMRequestID" 
                                        HierarchyLoadMode="ServerOnDemand" 
                                         
                                        PagerStyle-AlwaysVisible="true" 
                                        AllowSorting="true" 
                                        AllowPaging="true" 
                                        PageSize="50" > 
                                        <HeaderStyle /> 
                                        <ExpandCollapseColumn CollapseImageUrl="~/Images/SinglePlus.gif" ExpandImageUrl="~/Images/SinglePlus.gif"></ExpandCollapseColumn> 
                                        <Columns> 
                                            <telerik:GridBoundColumn DataField="ADMRequestID" Visible="false" /> 
                                            <telerik:GridBoundColumn DataField="IsRACRequest" Visible="false" /> 
                                            <telerik:GridTemplateColumn HeaderText="Request #" DataField="UserRequestID"
                                                <ItemTemplate> 
                                                    <asp:HyperLink ID="hlRequestID" runat="server" Font-Size="Small" NavigateUrl='<%# UrlRequestLink(Container.Cells(2).Text, Container.Cells(3).Text) %>' Text='<%# Eval("UserRequestID") %>' />     
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" /> 
                                             
                                            <telerik:GridBoundColumn DataField="DateOfLetter" HeaderText="Date Of Letter" DataFormatString="{0:d}" /> 
                                            <telerik:GridBoundColumn DataField="DateDue" HeaderText="Due Date" DataFormatString="{0:d}" /> 
                                            <telerik:GridBoundColumn DataField="DateMailed" HeaderText="Date Mailed" DataFormatString="{0:d}" /> 
                                            <telerik:GridBoundColumn DataField="SearchFound" Visible="false" /> 
                                        </Columns>     
                                        <%--<SelfHierarchySettings ParentKeyName="ADMRequestID" KeyName="ItemID" />--%> 
                                         
                                        <DetailTables> 
                                            <telerik:GridTableView Name="RequestItems" 
                                                AutoGenerateColumns="false"  
                                                DataKeyNames="ItemID" 
                                                HierarchyLoadMode="ServerOnDemand"
                                                <Columns> 
                                                    <telerik:GridBoundColumn DataField="ItemID" Visible="false" /> 
                                                    <telerik:GridBoundColumn DataField="ADMRequestID" Visible="false" /> 
                                                    <telerik:GridBoundColumn DataField="ItemType" HeaderText="Type" /> 
                                                    <telerik:GridBoundColumn DataField="ItemUserID" Visible="false" /> 
                                                    <telerik:GridBoundColumn DataField="IsRACType" Visible="false" /> 
                                                    <telerik:GridTemplateColumn HeaderText="Description" DataField="Description"
                                                        <ItemTemplate> 
                                                            <asp:HyperLink ID="hlClaimID" runat="server" Font-Size="Small" NavigateUrl='<%# UrlItemLink(Container.Cells(2).Text, Container.Cells(4).Text, Container.Cells(6).Text) %>' Text='<%# Eval("Description") %>' />     
                                                        </ItemTemplate> 
                                                    </telerik:GridTemplateColumn> 
                                                    <telerik:GridBoundColumn DataField="ItemDate" HeaderText="Date" DataFormatString="{0:d}" /> 
                                                    <telerik:GridBoundColumn DataField="SearchFound" Visible="false" /> 
                                                    <telerik:GridBoundColumn DataField="Duplicate" Visible="false" /> 
                                                </Columns> 
                                                <ParentTableRelation> 
                                                    <telerik:GridRelationFields DetailKeyField="ADMRequestID" MasterKeyField="ADMRequestID" /> 
                                                </ParentTableRelation> 
                                                <DetailTables> 
                                                    <telerik:GridTableView Name="ClaimItems" 
                                                    AutoGenerateColumns="false"  
                                                    DataKeyNames="ItemID" 
                                                    HierarchyLoadMode="ServerOnDemand"
                                                        <ParentTableRelation> 
                                                            <telerik:GridRelationFields DetailKeyField="ADMClaimID" MasterKeyField="ItemID" /> 
                                                        </ParentTableRelation> 
                                                        <Columns> 
                                                            <telerik:GridBoundColumn DataField="ItemID" Visible="false" /> 
                                                            <telerik:GridBoundColumn DataField="ADMClaimID" Visible="false" /> 
                                                            <telerik:GridBoundColumn DataField="ItemType" HeaderText="Type" /> 
                                                            <telerik:GridBoundColumn DataField="ItemUserID" Visible="false" /> 
                                                            <telerik:GridBoundColumn DataField="IsRACType" Visible="false" /> 
                                                            <telerik:GridTemplateColumn HeaderText="Description" DataField="Description"
                                                                <ItemTemplate> 
                                                                    <asp:HyperLink ID="hlClaimID" runat="server" Font-Size="Small" NavigateUrl='<%# UrlItemLink(Container.Cells(2).Text, Container.Cells(4).Text, Container.Cells(6).Text) %>' Text='<%# Eval("Description") %>' />     
                                                                </ItemTemplate> 
                                                            </telerik:GridTemplateColumn> 
                                                            <telerik:GridBoundColumn DataField="ItemDate" HeaderText="Date" DataFormatString="{0:d}" /> 
                                                            <telerik:GridBoundColumn DataField="SearchFound" Visible="false" /> 
                                                        </Columns>                                                 
                                                    </telerik:GridTableView> 
                                                </DetailTables> 
                                            </telerik:GridTableView> 
                                        </DetailTables> 
                                    </MasterTableView> 
                                     
                                </telerik:RadGrid> 



Protected Sub grdSearchResults_DetailTableDataBind(ByVal source As ObjectByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles grdSearchResults.DetailTableDataBind 
        LoadGrid(e.DetailTableView.Name) 
    End Sub 
 
 
    Protected Sub grdSearchResults_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grdSearchResults.NeedDataSource 
        LoadGrid() 
    End Sub 
 
Protected Sub LoadGrid(Optional ByVal TableName As String = ""
                 With Me.grdSearchResults 
                    If TableName <> "" Then 
                        .DataSource = SearchResults.Tables(TableName) 
                    Else 
                        .DataSource = SearchResults 
                    End If 
End Sub 


The SearchResults is a DataSet with 3 DataTables

Request is the first DataTable
Columns: ADMRequestID

RequestItems is the next DataTable
Columns: ItemID, ADMRequestID

ClaimItems is the next DataTable
Columns: ItemID, ADMClaimID
Fred
Top achievements
Rank 1
 answered on 11 Aug 2009
2 answers
280 views
Here is a quick summary of the issue that I am currently having... I may be missing something obvious, but I have tried just about everything. 

  1. I have a masterpage that has the windowmanager on it with the following definition:
    <telerik:RadWindowManager ID="adminWindowManager" runat="server" DestroyOnClose="true" Behaviors="Close,Reload,Move" KeepInScreenBounds="true" Modal="true" VisibleStatusbar="false" ShowContentDuringLoad="false" OnClientPageLoad="ClientName.Web.UI.Window.OnWindowLoaded"  /> 
  2. I have an aspx page that has a button that calls another page via radwindow:
    <input type="button" onclick="ClientName.Web.UI.Window.OpenWindow('NewCustomer.aspx','NewCustomer',false);" value="New Customer" />
    Supporting Functions:
    ClientName.Web.UI.Window.Manager = function() { 
        return GetRadWindowManager(); 
    ClientName.Web.UI.Window.OpenWindow = function(u, t, d, c) { 
        var m = ClientName.Web.UI.Window.Manager(); 
        var w = m.open(u, t); 
        if (d) { w.set_modal(d); } 
        if (c) { w.add_close(c); } 
    }; 
  3. All of this works fine, then on the open aspx page i have a form with a validation summary.  I edited two lines of the validationsummary javascript from msft to show a rad alert instead of modifing the innerhtml of the validationsummary.
  4. This is the function that it calls:
    function ValidationSummaryOnSubmit(validationGroup) { 
    ... 
        ClientName.Web.UI.Window.OpenAlert('Validation HTML Message''Validation Error'); 
    ... 

    Supporting Functions:
    ClientName.Web.UI.Window.GetParent = function() { 
        var w = null
        if (window.radWindow) { w = window.radWindow; } 
        else if (window.frameElement.radWindow) { w = window.frameElement.radWindow; } 
        return w.BrowserWindow; 
    ClientName.Web.UI.Window.OpenAlert = function(m, t) { 
        var c = this
        if (typeof radalert == 'undefined') { c = ClientName.Web.UI.Window.GetParent(); } 
        var a = c.radalert(m, 0, 0, t); 
        a.setActive(); // THIS DOES NOT WORK 
        a.add_pageLoad(function(s,a) { ... }); // THIS DOES NOT WORK EITHER 
    }; 

No matter what it try I can't seem to get it to work. At first i thought it was because they are both modal but now the radwindow is not and the radalert is...  I have included a image of my result...

Sample Image   
Marc Messer
Top achievements
Rank 2
 answered on 11 Aug 2009
1 answer
43 views
Hi,
does radeditor possible do saving its content into rtf or word document?  I intend to use radeditor to compose a template and save it either word or rtf document.  Now I can not achieve, may I know what I should do to get around?

Regards,

Duy
Rumen
Telerik team
 answered on 11 Aug 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?