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

I have a RadGrid, with a child grid contained inside. I AM NOT a coder and am doing this through the GUI. I have most things working, but cannot get the records to update when the edit button is selected. The child grid is also not displaying the column aggregates for the Hours and Minutes columns. Here is the aspx:

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

 

<%

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

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

 

</head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="ScriptManager1" runat="server"

 

 

EnableTheming="True">

 

 

</telerik:RadScriptManager>

 

 

<div>

 

 

 

<br />

 

 

 

</div>

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"

 

 

AllowSorting="True" AutoGenerateEditColumn="True" DataSourceID="SqlDataSource1"

 

 

GridLines="None" ShowGroupPanel="True" Skin="Sunset"

 

 

AllowAutomaticDeletes="True" AllowAutomaticInserts="True"

 

 

AllowAutomaticUpdates="True">

 

<

 

MasterTableView AllowCustomPaging="True" AllowCustomSorting="True"

 

 

AutoGenerateColumns="False" CommandItemDisplay="Top" DataKeyNames="IssueNumber"

 

 

DataSourceID="SqlDataSource1" EditMode="PopUp">

 

 

<DetailTables>

 

 

<telerik:GridTableView runat="server" CommandItemDisplay="Top" ShowFooter="true"

 

 

DataSourceID="SqlDataSource2" AllowCustomPaging="True" Skin="Telerik"

 

 

AllowCustomSorting="True" AutoGenerateColumns="False" Width="99%" EditFormSettings-PopUpSettings-Modal="True"

 

 

CommandItemSettings-AddNewRecordText="Add new action" EditMode="PopUp" AllowAutomaticDeletes="True"

 

 

AllowAutomaticInserts="True" AllowAutomaticUpdates="True" EditFormSettings-PopUpSettings-Width="50%" Frame="Box"

 

 

TableLayout="Fixed" EditFormSettings-EditColumn-HeaderText="Edit Item">

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="IssueNumber" MasterKeyField="IssueNumber" />

 

 

</ParentTableRelation>

 

 

<Columns>

 

 

<telerik:GridDropDownColumn HeaderText="Engineer" DataSourceID="SqlDataSource3" ListTextField="Engineer" ListValueField="Engineer" DataField="Engineer">

 

 

</telerik:GridDropDownColumn>

 

 

<telerik:GridBoundColumn HeaderText="Action Type" HeaderButtonType="TextButton"

 

 

DataField="ActionType">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Title" HeaderButtonType="TextButton" DataField="HeaderDesc">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridHTMLEditorColumn HeaderText="Description" HeaderButtonType="TextButton" DataField="Description" ColumnEditorID="GridHTMLEditorColumnEditor1">

 

 

<HeaderStyle Width="40%" />

 

 

</telerik:GridHTMLEditorColumn>

 

 

<telerik:GridDateTimeColumn HeaderText="Date" HeaderButtonType="TextButton"

 

 

DataField="DateTime" DataFormatString="{0:dd/MM/yyyy}">

 

 

</telerik:GridDateTimeColumn>

 

 

<telerik:GridNumericColumn HeaderText="Hours" FooterText="Total"

 

 

HeaderButtonType="TextButton" DataField="HoursSpent" DataType="System.Decimal"

 

 

ColumnEditorID="GridNumericColumnEditor1" KeepNotRoundedValue="True"

 

 

Aggregate="Sum">

 

 

</telerik:GridNumericColumn>

 

 

<telerik:GridNumericColumn HeaderText="Minutes" FooterText="Total"

 

 

HeaderButtonType="TextButton" DataField="MinutesSpent" DataType="System.TimeSpan"

 

 

ColumnEditorID="GridNumericColumnEditor2" KeepNotRoundedValue="True"

 

 

Aggregate="Sum">

 

 

</telerik:GridNumericColumn>

 

 

<telerik:GridBoundColumn HeaderText="Issue No" HeaderButtonType="TextButton" DataField="IssueNumber">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

<

 

CommandItemSettings AddNewRecordText="Add new action"></CommandItemSettings>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

<

 

EditFormSettings>

 

<

 

PopUpSettings ScrollBars="Auto" Modal="True" Width="50%"></PopUpSettings>

 

</

 

EditFormSettings>

 

 

<EditItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False"

 

 

Font-Strikeout="False" Font-Underline="False" Wrap="True" />

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" />

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="IssueNumber"

 

 

MasterKeyField="IssueNumber" />

 

 

</ParentTableRelation>

 

<

 

ExpandCollapseColumn Visible="True">

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="IssueNumber" DataType="System.Decimal"

 

 

HeaderText="Issue Number" ReadOnly="True" SortExpression="IssueNumber"

 

 

UniqueName="IssueNumber">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Customer" HeaderText="Customer"

 

 

SortExpression="Customer" UniqueName="Customer">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="InitialContact" HeaderText="Initial Contact"

 

 

SortExpression="InitialContact" UniqueName="InitialContact">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="InitialEngineer"

 

 

HeaderText="Initial Engineer" SortExpression="InitialEngineer"

 

 

UniqueName="InitialEngineer">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressName" HeaderText="Address Name"

 

 

SortExpression="AddressName" UniqueName="AddressName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressNumber" DataType="System.Int32"

 

 

HeaderText="House/Flat Number" SortExpression="AddressNumber"

 

 

UniqueName="AddressNumber">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressStreet1" HeaderText="Street 1"

 

 

SortExpression="AddressStreet1" UniqueName="AddressStreet1">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressStreet2" HeaderText="Street 2"

 

 

SortExpression="AddressStreet2" UniqueName="AddressStreet2">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressStreet3" HeaderText="Street 3"

 

 

SortExpression="AddressStreet3" UniqueName="AddressStreet3">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressCity" HeaderText="City"

 

 

SortExpression="AddressCity" UniqueName="AddressCity">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressCounty" HeaderText="County"

 

 

SortExpression="AddressCounty" UniqueName="AddressCounty">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressCountry" HeaderText="Country"

 

 

SortExpression="AddressCountry" UniqueName="AddressCountry">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="AddressPostCode"

 

 

HeaderText="PostCode" SortExpression="AddressPostCode"

 

 

UniqueName="AddressPostCode">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

</

 

MasterTableView>

 

 

<ClientSettings AllowDragToGroup="True">

 

 

<Selecting AllowRowSelect="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:Trident_SLURPConnectionString %>"

 

 

DeleteCommand="DELETE FROM [Core_Support] WHERE [IssueNumber] = @IssueNumber"

 

 

InsertCommand="INSERT INTO [Core_Support] ([Customer], [InitialContact], [InitialEngineer], [AddressName], [AddressNumber], [AddressStreet1], [AddressStreet2], [AddressStreet3], [AddressCity], [AddressCounty], [AddressCountry], [AddressPostCode]) VALUES (@Customer, @InitialContact, @InitialEngineer, @AddressName, @AddressNumber, @AddressStreet1, @AddressStreet2, @AddressStreet3, @AddressCity, @AddressCounty, @AddressCountry, @AddressPostCode)"

 

 

SelectCommand="SELECT * FROM [Core_Support] ORDER BY [Customer]"

 

 

UpdateCommand="UPDATE [Core_Support] SET [Customer] = @Customer, [InitialContact] = @InitialContact, [InitialEngineer] = @InitialEngineer, [AddressName] = @AddressName, [AddressNumber] = @AddressNumber, [AddressStreet1] = @AddressStreet1, [AddressStreet2] = @AddressStreet2, [AddressStreet3] = @AddressStreet3, [AddressCity] = @AddressCity, [AddressCounty] = @AddressCounty, [AddressCountry] = @AddressCountry, [AddressPostCode] = @AddressPostCode WHERE [IssueNumber] = @IssueNumber">

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="IssueNumber" Type="Decimal" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="Customer" Type="String" />

 

 

<asp:Parameter Name="InitialContact" Type="String" />

 

 

<asp:Parameter Name="InitialEngineer" Type="String" />

 

 

<asp:Parameter Name="AddressName" Type="String" />

 

 

<asp:Parameter Name="AddressNumber" Type="Int32" />

 

 

<asp:Parameter Name="AddressStreet1" Type="String" />

 

 

<asp:Parameter Name="AddressStreet2" Type="String" />

 

 

<asp:Parameter Name="AddressStreet3" Type="String" />

 

 

<asp:Parameter Name="AddressCity" Type="String" />

 

 

<asp:Parameter Name="AddressCounty" Type="String" />

 

 

<asp:Parameter Name="AddressCountry" Type="String" />

 

 

<asp:Parameter Name="AddressPostCode" Type="String" />

 

 

<asp:Parameter Name="IssueNumber" Type="Decimal" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="Customer" Type="String" />

 

 

<asp:Parameter Name="InitialContact" Type="String" />

 

 

<asp:Parameter Name="InitialEngineer" Type="String" />

 

 

<asp:Parameter Name="AddressName" Type="String" />

 

 

<asp:Parameter Name="AddressNumber" Type="Int32" />

 

 

<asp:Parameter Name="AddressStreet1" Type="String" />

 

 

<asp:Parameter Name="AddressStreet2" Type="String" />

 

 

<asp:Parameter Name="AddressStreet3" Type="String" />

 

 

<asp:Parameter Name="AddressCity" Type="String" />

 

 

<asp:Parameter Name="AddressCounty" Type="String" />

 

 

<asp:Parameter Name="AddressCountry" Type="String" />

 

 

<asp:Parameter Name="AddressPostCode" Type="String" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

<asp:SqlDataSource ID="SqlDataSource2" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:Trident_SLURPConnectionString %>"

 

 

DeleteCommand="DELETE FROM [Detail_Support] WHERE [RID] = @RID"

 

 

InsertCommand="INSERT INTO [Detail_Support] ([Engineer], [ActionType], [HeaderDesc], [Description], [DateTime], [HoursSpent], [MinutesSpent], [InHours], [IssueNumber]) VALUES (@Engineer, @ActionType, @HeaderDesc, @Description, @DateTime, @HoursSpent, @MinutesSpent, @InHours, @IssueNumber)"

 

 

SelectCommand="SELECT RID, Engineer, ActionType, HeaderDesc, Description, DateTime, HoursSpent, MinutesSpent, InHours, IssueNumber FROM Detail_Support WHERE (IssueNumber = @IssueNumber) ORDER BY DateTime"

 

 

 

 

 

UpdateCommand="UPDATE [Detail_Support] SET [Engineer] = @Engineer, [ActionType] = @ActionType, [HeaderDesc] = @HeaderDesc, [Description] = @Description, [DateTime] = @DateTime, [HoursSpent] = @HoursSpent, [MinutesSpent] = @MinutesSpent, [InHours] = @InHours, [IssueNumber] = @IssueNumber WHERE [RID] = @RID">

 

 

<SelectParameters>

 

 

<asp:ControlParameter ControlID="RadGrid1" Name="IssueNumber"

 

 

PropertyName="SelectedValue" />

 

 

</SelectParameters>

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="RID" Type="Decimal" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="Engineer" Type="String" />

 

 

<asp:Parameter Name="ActionType" Type="String" />

 

 

<asp:Parameter Name="HeaderDesc" Type="String" />

 

 

<asp:Parameter Name="Description" Type="String" />

 

 

<asp:Parameter Name="DateTime" Type="DateTime" />

 

 

<asp:Parameter Name="HoursSpent" Type="Decimal" />

 

 

<asp:Parameter Name="MinutesSpent" Type="Decimal" />

 

 

<asp:Parameter Name="InHours" Type="Boolean" />

 

 

<asp:Parameter Name="IssueNumber" Type="Decimal" />

 

 

<asp:Parameter Name="RID" Type="Decimal" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="Engineer" Type="String" />

 

 

<asp:Parameter Name="ActionType" Type="String" />

 

 

<asp:Parameter Name="HeaderDesc" Type="String" />

 

 

<asp:Parameter Name="Description" Type="String" />

 

 

<asp:Parameter Name="DateTime" Type="DateTime" />

 

 

<asp:Parameter Name="HoursSpent" Type="Decimal" />

 

 

<asp:Parameter Name="MinutesSpent" Type="Decimal" />

 

 

<asp:Parameter Name="InHours" Type="Boolean" />

 

 

<asp:Parameter Name="IssueNumber" Type="Decimal" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

<telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server">

 

 

<NumericTextBox Culture="English (United Kingdom)" LabelCssClass=""

 

 

DataType="System.Decimal" MaxLength="5" MaxValue="24" MinValue="0"

 

 

ShowSpinButtons="True" Skin="Telerik">

 

 

<NumberFormat AllowRounding="False" DecimalSeparator=":"

 

 

KeepNotRoundedValue="True" />

 

 

</NumericTextBox>

 

 

</telerik:GridNumericColumnEditor>

 

 

<br />

 

 

<telerik:GridNumericColumnEditor ID="GridNumericColumnEditor2" runat="server">

 

 

<NumericTextBox Culture="English (United Kingdom)" LabelCssClass="" MaxValue="59"

 

 

MinValue="0" ShowSpinButtons="True" Skin="WebBlue">

 

 

</NumericTextBox>

 

 

</telerik:GridNumericColumnEditor>

 

 

<br />

 

 

<telerik:GridHTMLEditorColumnEditor ID="GridHTMLEditorColumnEditor1"

 

 

runat="server">

 

<

 

Editor AutoResizeHeight="True" EditModes="HTML" Skin="Telerik" Language="en-GB"><Content>

 

</

 

Content>

 

</

 

Editor>

 

 

</telerik:GridHTMLEditorColumnEditor>

 

 

<br />

 

 

<telerik:RadAjaxManager runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:GridDateTimeColumnEditor ID="GridDateTimeColumnEditor1" runat="server">

 

 

</telerik:GridDateTimeColumnEditor>

 

 

<asp:SqlDataSource ID="SqlDataSource3" runat="server"

 

 

ConnectionString="<%$ ConnectionStrings:Trident_SLURPConnectionString %>"

 

 

SelectCommand="SELECT [Engineer] FROM [DataSources] ORDER BY [Engineer]">

 

 

</asp:SqlDataSource>

 

 

</form>

 

</

 

body>

 

</

 

html>




Thanks for any help anyone can give me.

:-)

 

Robbie
Top achievements
Rank 1
 answered on 16 Apr 2009
0 answers
198 views
i wrote this proggram..
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
 
 
<%@ Register assembly="RadTreeView.Net2" namespace="Telerik.WebControls" tagprefix="rad" %> 
 
 
<!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 dir="rtl"> 
    <form id="form1" runat="server"> 
    
    <div> 
        <rad:RadTreeView ID="RadTreeView1" runat="server"  
             > 
        
        </rad:RadTreeView> 
        
    </div> 
    <asp:Button ID="Button1" runat="server" Text="Button" /> 
     
    </form> 
</body> 
</html> 
 
VB.NET Code
Imports Telerik.WebControls 
Imports System.Data.OleDb 
Imports System.Data 
Partial Class _Default 
    Inherits System.Web.UI.Page 
    Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load 
        If Not IsPostBack Then 
            RadTreeView1.DataFieldID = "ParameterID" 
            RadTreeView1.DataValueField = "ParameterID" 
            RadTreeView1.DataTextField = "ParameterName" 
            RadTreeView1.DataFieldParentID = "ParentID" 
            RadTreeView1.DataSource = GetDataSource() 
            RadTreeView1.DataBind() 
            BindingTree(RadTreeView1.Nodes) 
        End If 
 
    End Sub 
    Private Function GetDataSource() As DataTable 
        Dim Con As New OleDbConnection("MyConnectionString") 
        Dim Cmd As New OleDbCommand 
        Dim Adp As New OleDbDataAdapter(Cmd) 
        Dim Dataset As New DataSet 
        Cmd.Connection = Con 
        Con.Open() 
        Cmd.CommandText = "SELECT * FROM [TBL]" 
        Adp.Fill(Dataset) 
        Con.Close() 
        Return Dataset.Tables(0) 
    End Function 
    Private Sub BindingTree(ByVal MyNode As RadTreeNodeCollection) 
        For index As Integer = 0 To MyNode.Count - 1 
            If MyNode(index).Nodes.Count > 0 Then 
                BindingTree(MyNode(index).Nodes) 
            Else 
                Dim mylit As New Literal 
                mylit.Text = "<input type=""radio"" value=""" & MyNode(index).Value & """ name=""" & GetMainParentID(MyNode(index)).ToString & """ />" & MyNode(index).Text 
                MyNode(index).Controls.Clear() 
                MyNode(index).Controls.Add(mylit) 
            End If 
        Next 
 
    End Sub 
    Private Function GetStep(ByVal MyNode As RadTreeNode) As Int32 
        If Not MyNode.Parent Is Nothing Then 
            Return GetStep(MyNode.Parent) + 1 
        Else 
            Return 0 
        End If 
    End Function 
    Private Function GetMainParentID(ByVal MyNode As RadTreeNode) As Int32 
        Dim ChildStep As Int32 = GetStep(MyNode) 
        Dim MainParentNode As RadTreeNode 
        MainParentNode = MyNode 
        For index As Integer = 1 To ChildStep 
            MainParentNode = MainParentNode.Parent 
        Next 
        Return MainParentNode.Value 
    End Function 
    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click 
       
        Dim Hshtbl As New Hashtable 
        Session("MyHsh") = Hshtbl 
        ExtractData(RadTreeView1.Nodes) 
        Hshtbl = Session("MyHsh") 
        For Each TempObj As Object In Hshtbl.Values 
            Response.Write(TempObj.ToString + "<BR>") 
        Next 
    End Sub 
    Private Sub ExtractData(ByVal MyNode As RadTreeNodeCollection) 
        For index As Integer = 0 To MyNode.Count - 1 
            If MyNode(index).Nodes.Count > 0 Then 
                ExtractData(MyNode(index).Nodes) 
            Else 
                If Not Request.Form(GetMainParentID(MyNode(index)).ToString) = "" Then 
                    CType(Session("MyHsh"), Hashtable).Item(GetMainParentID(MyNode(index)).ToString) = Request.Form(GetMainParentID(MyNode(index)).ToString) 
                    Exit For 
                End If 
            End If 
        Next 
 
    End Sub 
End Class 
 
Data Base Shema :

ParameterID <int><PK>
ParentID <AllowNULL><int>
ParameterName<[n]char>
...........................
Return Database PK Of SelectedItems






ehsan
Top achievements
Rank 1
 asked on 16 Apr 2009
4 answers
226 views
Hi, I'm having a couple of problems with RadChart which I think are probably related to the binding approach.

Now

I'm trying to do this in page load event:

 

If Not Page.IsPostBack Then

 

 

Dim s As ChartSeries = RadChart1.Series.GetSeries(0)

 

s.DefaultLabelValue =

"#Y{#,#}"

 

RadChart1.ChartTitle.TextBlock.Text =

"Top 10"

 

s.Items(0).ActiveRegion.Url = _

 

"javascript:ShowPopUpDialog('detailpage.aspx');"

 

 

 

End If

Now there are two problems with this,

1: s.DefaultLabelValue = "#Y{#,#}" is not being applied, it gets executed, but series numbers still appear without formatting.

2: s.Items(0).ActiveRegion.Url throws an error: "Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
"

So it seems that it can't find the series, but I don't see why.

I am binding the grid using an objectdatasource, here's the markup:

 

 

<asp:ObjectDataSource ID="chartObds" runat="server"

 

 

SelectMethod="GetNewsFeaturesClickStats"

 

 

TypeName="NewsFeaturesAdminBLL"

 

 

 

 

 

 

SortParameterName="sortExpression" MaximumRowsParameterName="maximumRows"

 

 

StartRowIndexParameterName="startRowIndex">

 

 

 

 

 

 

<SelectParameters>

 

 

 

 

 

 

<asp:Parameter Name="sortExpression" Type="String" />

 

 

 

 

 

 

<asp:Parameter Name="startRowIndex" Type="Int32" />

 

 

 

 

 

 

<asp:Parameter Name="maximumRows" Type="Int32" />

 

 

 

 

 

 

 

 

</SelectParameters>

 

 

</asp:ObjectDataSource>

 

 

 

 

 

 

<div id="chartInp">

 

 

 

 

 

 

<asp:Button runat="server" ID="FirstPage" Text="<< First" />

 

 

 

 

 

 

<asp:Button runat="server" ID="PrevPage" Text="< Prev" />

 

 

 

 

 

 

<asp:Button runat="server" ID="NextPage" Text="Next >" />

 

 

 

 

 

 

<asp:Button runat="server" ID="LastPage" Text="Last >>" />

 

 

 

 

 

 

</div>

 

 

 

 

 

 

 

 

 

<

 

div id="NFchart">

 

 

 

 

 

 

<Telerik:RadChart ID="RadChart" Width="830px" Height="580px" runat="server"

 

 

DataSourceID="chartObds" Skin="SkyBlue">

 

 

 

 

 

 

<Series>

 

<

 

telerik:ChartSeries Name="MostViewed" DefaultLabelValue="#Y{#,#}">

 

 

 

 

 

 

<appearance>

 

 

 

 

 

 

<fillstyle filltype="ComplexGradient">

 

 

 

 

 

 

<fillsettings>

 

 

 

 

 

 

<complexgradient>

 

 

 

 

 

 

<Telerik:GradientElement Color="213, 247, 255" />

 

 

 

 

 

 

<Telerik:GradientElement Color="193, 239, 252" Position="0.5" />

 

 

 

 

 

 

<Telerik:GradientElement Color="157, 217, 238" Position="1" />

 

 

 

 

 

 

</complexgradient>

 

 

 

 

 

 

</fillsettings>

 

 

 

 

 

 

</fillstyle>

 

 

 

 

 

 

<textappearance textproperties-color="51, 51, 51">

 

 

 

 

 

 

</textappearance>

 

 

 

 

 

 

</appearance>

 

 

 

 

 

 

</telerik:ChartSeries>

 

 

 

 

 

 

 

 

 

</

 

Series>

 

 

 

 

 

 

<PlotArea>

 

 

 

 

 

 

<EmptySeriesMessage>

 

 

 

 

 

 

<TextBlock Text="No data found">

 

 

 

 

 

 

</TextBlock>

 

 

 

 

 

 

</EmptySeriesMessage>

 

 

 

 

 

 

<XAxis DataLabelsColumn="Title">

 

 

 

 

 

 

<Appearance Color="180, 210, 236" MajorTick-Color="206, 222, 235">

 

 

 

 

 

 

<MajorGridLines Color="206, 222, 235" PenStyle="Solid" />

 

 

 

 

 

 

<LabelAppearance RotationAngle="-400">

 

 

 

 

 

 

</LabelAppearance>

 

 

 

 

 

 

<TextAppearance AutoTextWrap="True" MaxLength="25"

 

 

TextProperties-Color="51, 51, 51">

 

 

 

 

 

 

</TextAppearance>

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<AxisLabel Visible="True">

 

 

 

 

 

 

<Appearance Visible="True">

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<TextBlock Text="Feature Title">

 

 

 

 

 

 

<Appearance

 

 

TextProperties-Color="51, 51, 51"

 

 

TextProperties-Font="Verdana, 8.25pt, style=Bold">

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

</TextBlock>

 

 

 

 

 

 

</AxisLabel>

 

<

 

Items>

 

<

 

telerik:ChartAxisItem>

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="1">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="2">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="3">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="4">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="5">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="6">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

<

 

telerik:ChartAxisItem Value="7">

 

<

 

Appearance Dimensions-Margins="1px, 5px, 1px, 10px"></Appearance>

 

<

 

TextBlock>

 

<

 

Appearance MaxLength="35" TextProperties-Font="Arial, 8.5pt"></Appearance>

 

</

 

TextBlock>

 

</

 

telerik:ChartAxisItem>

 

</

 

Items>

 

 

 

 

 

 

</XAxis>

 

 

 

 

 

 

<YAxis>

 

 

 

 

 

 

<Appearance Color="180, 210, 236" MajorTick-Color="206, 222, 235"

 

 

MinorTick-Color="206, 222, 235" CustomFormat="#,#" EndCap="Round">

 

 

 

 

 

 

<MajorGridLines Color="206, 222, 235" />

 

 

 

 

 

 

<MinorGridLines Color="206, 222, 235" PenStyle="Dash" />

 

 

 

 

 

 

<TextAppearance TextProperties-Color="51, 51, 51">

 

 

 

 

 

 

</TextAppearance>

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<AxisLabel Visible="True">

 

 

 

 

 

 

<Appearance Visible="True" Dimensions-Margins="1px, 1px, 1px, 10px">

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<TextBlock Text="Click-count">

 

 

 

 

 

 

<Appearance TextProperties-Color="51, 51, 51"

 

 

TextProperties-Font="Verdana, 8.25pt, style=Bold">

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

</TextBlock>

 

 

 

 

 

 

</AxisLabel>

 

 

 

 

 

 

</YAxis>

 

 

 

 

 

 

<Appearance

 

 

Dimensions-Margins="18%, 100px, 12%, 80px"

 

 

Corners="Round, Round, Round, Round, 5">

 

 

 

 

 

 

<FillStyle MainColor="White" FillType="Solid">

 

 

 

 

 

 

</FillStyle>

 

 

 

 

 

 

<Border Color="180, 210, 236" />

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

</PlotArea>

 

 

 

 

 

 

<Appearance Corners="Round, Round, Round, Round, 5">

 

 

 

 

 

 

<FillStyle MainColor="226, 247, 255">

 

 

 

 

 

 

</FillStyle>

 

 

 

 

 

 

<Border Color="82, 160, 226" />

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<ChartTitle>

 

 

 

 

 

 

<Appearance Dimensions-Margins="3%, 10px, 14px, 6%">

 

 

 

 

 

 

<FillStyle MainColor="Transparent">

 

 

 

 

 

 

</FillStyle>

 

 

 

 

 

 

<Border Color="Transparent" />

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

<TextBlock Text="Top 10">

 

 

 

 

 

 

<Appearance TextProperties-Color="19, 111, 182"

 

 

TextProperties-Font="Arial, 18pt">

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

</TextBlock>

 

 

 

 

 

 

</ChartTitle>

 

 

 

 

 

 

<Legend Visible="False">

 

 

 

 

 

 

<Appearance Visible="False" Dimensions-Margins="15%, 2%, 1px, 1px"

 

 

Position-AlignedPosition="TopRight">

 

 

 

 

 

 

<ItemTextAppearance MaxLength="20" TextProperties-Font="Verdana, 8pt">

 

 

 

 

 

 

</ItemTextAppearance>

 

 

 

 

 

 

<FillStyle MainColor="Transparent">

 

 

 

 

 

 

</FillStyle>

 

 

 

 

 

 

<Border Color="Transparent" />

 

 

 

 

 

 

</Appearance>

 

 

 

 

 

 

</Legend>

 

 

 

 

 

 

</Telerik:RadChart>


 

Adam Hubble
Top achievements
Rank 1
 answered on 16 Apr 2009
2 answers
139 views
Hi,
I wants to add one button next to the AddNewRecord button, how can I do that?
Something like this:

<tr> 
<td align="left"><input type="submit" name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$AddNewRecordButton" value=" " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_AddNewRecordButton" title="Lägg till" class="rgAdd" /> 
<a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_InitInsertButton" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$InitInsertButton','')">Lägg till</a> 
 
<a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_CustomButton" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$CustomButton','')">My custom button</a> 
 
</td> 
 
<td align="right"><input type="submit" name="ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$RefreshButton" value=" " id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_RefreshButton" title="Uppdatera" class="rgRefresh" /> 
<a id="ctl00_ContentPlaceHolder1_RadGrid1_ctl00_ctl02_ctl00_RebindGridButton" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$RadGrid1$ctl00$ctl02$ctl00$RebindGridButton','')">Uppdatera</a> 
</td> 
</tr> 

/Mattias

Mattias
Top achievements
Rank 1
 answered on 16 Apr 2009
1 answer
86 views
I am using the Q3 2008 Rad Ajax Treeview and Microsoft Script Manager controls on my page.  I have several nodes using TreeNodeExpandMode.ServerSideCallBack.

Is there a way to capture a client-side event that will inform me when a child node has been populated as a result of the node expansion & ServerSideCallback?  onClientNodeClicked seems to fire before the child node has been populated.

Thank you



Veselin Vasilev
Telerik team
 answered on 16 Apr 2009
1 answer
63 views
Hi,

I have an issue about AJAX telerik grid control.
I am using <telerik:GridTemplateColumn and

<

telerik:GridClientSelectColumn >

 

 

 in the aspx page.
I have set the width of select column 22px in the following code.

 

<telerik:GridClientSelectColumn >

 

 

 

<HeaderStyle Width="22px"></HeaderStyle>

 

 

 

<ItemStyle Width="22px" />

 

 

 

</telerik:GridClientSelectColumn>

 

 


It looks good. but when i check select column or checkbox and edit the row in the grid.
The width of the <telerik:GridClientSelectColumn > get changed and looks odd.

please advice me how can I freez the width of the select column.

Thanks
Tarun


Shinu
Top achievements
Rank 2
 answered on 16 Apr 2009
2 answers
121 views
Hi,

I'm trying to set point marks for my chart series in my code behind.
But it doesn't work. I cannot see any point marks. Here's the code I'm working with.

 

With _tmp_currentSeries_2

 

.Appearance.ShowLabels =

False

 

.Appearance.PointMark.Visible =

True

 

.Appearance.PointDimentions.AutoSize =

False

 

.Appearance.FillStyle.MainColor = Drawing.Color.Firebrick

.Appearance.FillStyle.FillType = Styles.FillType.Solid

.Appearance.PointDimentions.Height = 12

.Appearance.PointDimentions.Width = 12

 

End With

 


Thank you for you help.
Thomas
Tommy
Top achievements
Rank 1
 answered on 16 Apr 2009
1 answer
85 views
Hi,

I'm looking at the Automatic editing aspects of the Grid.

I'm having some slight issues with functionality.

The column that is also DataKeyName I require to be editable when the user is is Add New mode, but ReadOnly in Update mode.

It appears that when in Insert or Update mode the column isn't editable at all.  If we were using identity columns for the PK, then this wouldn't be an issue, but in our case we aren't.

I used the following handler in the code behind, to try to enable this, but when doing the Insert it cannot resolve the field @Code in the SqlDataSource.  Also, I notice that if I have an Update popup open and an Add New popup open, that the ItemCommand handler affects both popups?


protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
        {
            
            GridBoundColumn id = (GridBoundColumn)e.Item.OwnerTableView.GetColumnSafe("Code") as GridBoundColumn;
            id.Display = true;
            if (e.CommandName == RadGrid.InitInsertCommandName)
            {
              
                id.ReadOnly = false;
            }
            else
            {
                id.ReadOnly = true;
            }





Is it possible to have the DataKeyName editable in Add New, but ReadOnly in Update?  

I'm sure its a simple thing I missed, but I can't see it.

Can you help?


Regards
Paul



-----

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditDateCodes.ascx.cs" Inherits="SpacetrakWebMaintenance.UserControls.EditDateCodes" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


<asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            EnablePageHeadUpdate="False">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadGrid1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    <div>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:spacetrakConnectionString %>"
            SelectCommand="SELECT CODE, [DESC], WORDS FROM YEARCODE" DeleteCommand="DELETE FROM YEARCODE WHERE CODE = @CODE" InsertCommand="INSERT INTO YEARCODE (CODE, [DESC], WORDS) VALUES (@CODE, @DESC, @WORDS)" UpdateCommand="UPDATE YEARCODE SET [DESC] = @DESC, WORDS=@WORDS WHERE CODE =@CODE">
        </asp:SqlDataSource>
    
    </div>
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
            GridLines="None" Height="400px" Skin="Inox" SkinID="Inox" OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound">
            <MasterTableView CommandItemDisplay="Bottom" DataKeyNames="CODE" DataSourceID="SqlDataSource1"
                EditMode="PopUp" Height="400px">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn>
                    </telerik:GridEditCommandColumn>
                    <telerik:GridButtonColumn UniqueName="ButtonColumn" Text="Delete" CommandName="Delete" />
                    <telerik:GridBoundColumn DataField="CODE" DataType="System.Int32" HeaderText="CODE"
                        ReadOnly="True" SortExpression="CODE" UniqueName="CODE">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DESC" HeaderText="DESCRIPTION" SortExpression="DESC"
                        UniqueName="DESC">
                    </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="WORDS" HeaderText="WORDS" SortExpression="WORDS"
                        UniqueName="WORDS">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings CaptionDataField="CODE" CaptionFormatString="Edit Company">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableTheming="True" Skin="Inox">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </FilterMenu>
        </telerik:RadGrid>
Shinu
Top achievements
Rank 2
 answered on 16 Apr 2009
1 answer
128 views
<HEAD id="HEAD" runat=server>  
 
<LINK href="site.css" type="text/css" rel="stylesheet">  
 
</HEAD> 
 
Can I use an Ajax postback to add a control to the page header? When I try to add HEAD to RadAjaxManager I get an error.

 

 

 

                        HtmlLink link = new HtmlLink();  
                        link.Attributes["href"] = "rss.aspx";  
                        link.Attributes["type"] = "application/rss+xml";  
                        link.Attributes["rel"] = "alternate";  
                        link.Attributes["title"] = "name";  
                        HEAD.Controls.Add(link); 

Dimo
Telerik team
 answered on 16 Apr 2009
1 answer
173 views
Since I updated to the 2009Q1 service pack released on April 2, all my combo boxes seem to have vertical scroll bars.

I tried the things below that I found in your knowledge-base without success, but without success.  Any other ideas?

 

html { overflow: hidden; }   
.RadComboBoxDropDown Default .rcbScroll{overflow-y:hidden!important;}  
MaxHeight="999"
 
Veselin Vasilev
Telerik team
 answered on 16 Apr 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?