Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
529 views
Hi,

I'm working on a project that has a lot of JavaScript files that are referenced in the masterpage. I'm rebuilding a new version of a site and reusing the same scripts and RadScriptManager in the MasterPage. The old site had used CompositeScript to combine the scripts. When I ported it to the new site's MasterPage I get a warning:

   RadScriptManager does not have a public property named CompositeScript

Because of this warning my designer file does not get updated in my web application project and therefore I get IntelliSense issues. If I merely comment out the CompositeScript block my designer file updates as expected and IntelliSense works fine.

I'm using the exact same Telerik DLL from the first site. The version is 2009.3.1208.20. We cannot upgrade this version as other things in our solution require this specific version (it specifically has to do with the CMS we're using and its dependence on Telerik.). Is there a way for me to fix this issue? I know the composite script feature works because on the front-end it does combine the scripts into ScriptResource.axd so I'm trying to figure out why I get this issue which breaks my IntelliSense.

Thanks in advance.
Simon
Telerik team
 answered on 18 Jul 2011
4 answers
279 views
Hi,

I have a Grid with parent child relation like below:

<

 

 

telerik:RadGrid ID="radgrdMeterData" runat="server" AutoGenerateColumns="false">

 

<

 

 

MasterTableView DataKeyNames="ea_meterdataid,ea_MeterDataType.Id" Width="100%" HierarchyLoadMode="Client"

 

 

 

 

 

 

 

HierarchyDefaultExpanded="false" Name="MeterData">

 

 

 

 

 

 

 

<DetailTables>

 

 

 

 

 

 

 

<telerik:GridTableView AutoGenerateColumns="false" Width="100%" DataKeyNames="ea_auxiliarymeterdatavaluesid,ea_MeterData.Id"

 

 

 

 

 

 

 

Name="AuxiliaryMeterData">

 

 

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="ea_MeterData.Id" MasterKeyField="ea_meterdataid" />

 

 

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

 

 

<Columns>

 

 

 

 

 

 

 

<telerik:GridTemplateColumn UniqueName="ea_auxiliarymeterdataname" HeaderText="Auxiliary Meter Data Name"

 

 

 

 

 

 

 

HeaderStyle-Width="160px">

 

 

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

 

 

<telerik:RadComboBox ID="radCmbAuxilarymeterdatatype" runat="server" OnClientSelectedIndexChanging="radCmbAuxilarymeterdatatype_SelectedIndexChanging">

 

 

 

 

 

 

 

</telerik:RadComboBox>

 

 

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

 

 

</telerik:GridTemplateColumn>
............

 

..............
 
in parent relation i given:
DetailKeyField="ea_MeterData.Id" MasterKeyField="ea_meterdataid"
when i given like this it given error like: Cannot find column [ea_MeterData.Id].
 actually i have a objectlist in that ea_MeterData is a calass in that Id is a property.

when i given same like in datakeys it accepted(see above code) but when i given in detailkeyfield it is not accepting and giving error like cannot find column

i need solution for this ASAP,

Thanks in advance

Ramakrishna
Top achievements
Rank 1
 answered on 18 Jul 2011
3 answers
119 views
I'm struggling with a custom skin in my filter row

So the markup is
<tr class='rgFilterRow'>
<td>
<input>   <-- Textbox
<input>   <-- Filter Control Button

The question is how to get the button to line up with the right side of the filter row with a fixed width, and have the textbox fill the remaining space...

Doable?
Sebastian
Telerik team
 answered on 18 Jul 2011
4 answers
225 views
Hi, I have a dynamically created grid on page_init as you show in your demos.  I would like to know if there is any difference between setting the Grid.DataSource when the Grid is created on Page_Init and setting the DataSource on the NeedDataSource event of the grid.  I ask this because I noticed that the grid always calls the NeedDataSource event as opposed to if the grid was created declaratively in the page.

Any help would be greatly appreciated,
Manuel
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Jul 2011
1 answer
203 views
Hey,
I'm working on a fileExplorer control which explores directory on a different drive than the project's drive, so I'll need to use virtual directory, please can you help me in doing this? I've created a virtual directory in IIS, but I don't know what to do next?what's the appropriate syntax?
Dobromir
Telerik team
 answered on 18 Jul 2011
1 answer
126 views
 I want to show the time not specific time, but range time, for example: 8:00- 10:00(please see the attached picture),
So I change the timpicker format:

  RadTimePickerVisitTime.Culture = new System.Globalization.CultureInfo("en-US")
                {
                    DateTimeFormat = new System.Globalization.DateTimeFormatInfo
                    {
                        ShortTimePattern = "HH:00-HH:00" , // In case of DisplayFormat="Short"
                        LongTimePattern = "HH:00-HH:00"  // In case of DisplayFormat="long"
                    }
                };

also I change the data show in timepicker:

protected void RadTimePickerVisitTime_ItemDataBound(object sender, TimePickerEventArgs e)
        {
           if ((e.Item.ItemType == ListItemType.Item)|| (e.Item.ItemType == ListItemType.AlternatingItem))
            {
                System.Data.DataRowView dataItem = (System.Data.DataRowView)e.Item.DataItem;
                DateTime boundTime = (DateTime)dataItem.Row["Time"];
                var first = boundTime.Hour + ":00-";
                var second = boundTime.AddHours(2).Hour + ":00";
               System.Globalization.CultureInfo  culture =  new System.Globalization.CultureInfo("en-US")
                {
                    DateTimeFormat = new System.Globalization.DateTimeFormatInfo
                    {
                        ShortTimePattern = "HH:00-HH:00", // In case of DisplayFormat="Short"
                        LongTimePattern = "HH:00-HH:00"  // In case of DisplayFormat="long"
                    }
                };
               boundTime = DateTime.Parse(first + second, culture);
            }
        }

But it not work, anyone can give me some suggestion, thanks a lot!!!!
Vasil
Telerik team
 answered on 18 Jul 2011
8 answers
260 views
Hello All,

  I exported the telerik grid to excel by using the command below

RadGrid_DetailsView.MasterTableView.ExportToExcel();

I want to set the header on each page that says
"This is the DRAFT Data".

How can I accomplish that.

Thanks.

Daniel
Telerik team
 answered on 18 Jul 2011
1 answer
113 views
Hi,
 I am using two grid and some controls on the page but. Now I am getting a problem on the page and that is if i click on page anywhere than it shows alert to delete record. i am using

  <telerik:GridButtonColumn
                                ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?" ConfirmTitle="System Message" ButtonType="ImageButton"
                                CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                <ItemStyle HorizontalAlign="Center" Width="20px" />
                                <HeaderStyle Width="20px" />
                            </telerik:GridButtonColumn>


as a delete column. Please help me to resolve this problem.

Thanks
Manish.
Andrey
Telerik team
 answered on 18 Jul 2011
4 answers
213 views
Hi forum!

i'm having some trouble making a combobox select an item knowing its value. I've seen demos and documentation and i cloned the examples but its not working for me. I don't know what im doing wrong.

 When i select an item from my combobox1, even in the RadComboBox1_SelectedIndexChanged the selectedIndex is always = -1 so this way i can't know the index of the item and use it for other things.
So to try and selecte an item in the radcombobox2 i go for the value of the item selected in the radcombobox1. This value comes right but when i try RadComboBox2.SelectedIndex = RadComboBox2.FindItemIndexByValue(boletim_id) the index i receive from the find method is -1 and i know that exists an item with the boletim_id value in the radcombobox2 because the datasource in both radcombobox is the same. The same will happen if i try the finditemindexbytext or finditembyvalue or finditembytext.

File Code (ASP)
<%@ 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">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <div>
      
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Processos8ConnectionString %>" 
            SelectCommand="SELECT [Sinistrado], [Sinistrado_ID] FROM [Sinistrados]">
        </asp:SqlDataSource>
      
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:Processos8ConnectionString %>" 
            SelectCommand="SELECT [Sinistrado_ID], [Sinistro_ID], [Tomador_ID], [Boletim_id] FROM [Boletins]">
        </asp:SqlDataSource>
          
      
    </div>
    <telerik:RadComboBox ID="RadComboBox1" Runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Sinistrado" 
        DataValueField="Sinistrado_ID" AllowCustomText="True" 
        AutoCompleteSeparator="|" AutoPostBack="True" ItemsPerRequest="20" 
        MarkFirstMatch="True" ShowMoreResultsBox="True" 
        EnableAutomaticLoadOnDemand="True">
    </telerik:RadComboBox>
    <telerik:RadTextBox ID="RadTextBox1" Runat="server">
    </telerik:RadTextBox>
    <telerik:RadTextBox ID="RadTextBox2" Runat="server">
    </telerik:RadTextBox>
    <telerik:RadComboBox ID="RadComboBox2" Runat="server" 
        DataSourceID="SqlDataSource1" DataTextField="Sinistrado" 
        DataValueField="Sinistrado_ID" AllowCustomText="True" 
        AutoCompleteSeparator="|" AutoPostBack="True" ItemsPerRequest="20" 
        MarkFirstMatch="True" ShowMoreResultsBox="True" 
        EnableAutomaticLoadOnDemand="True">
    </telerik:RadComboBox>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" 
            DataSourceID="SqlDataSource2" GridLines="None" 
        AutoGenerateColumns="False">
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
  
<MasterTableView datakeynames="Boletim_id" 
                datasourceid="SqlDataSource2">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
  
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
  
    <Columns>
        <telerik:GridButtonColumn Text="Select" CommandName="Select" ButtonType="ImageButton" ImageUrl="~/images/select_16_mouse.png">
        </telerik:GridButtonColumn>
        <telerik:GridBoundColumn DataField="Sinistrado_ID" DataType="System.Int32" 
            FilterControlAltText="Filter Sinistrado_ID column" HeaderText="Sinistrado_ID" 
            SortExpression="Sinistrado_ID" UniqueName="Sinistrado_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Sinistro_ID" DataType="System.Int32" 
            FilterControlAltText="Filter Sinistro_ID column" HeaderText="Sinistro_ID" 
            SortExpression="Sinistro_ID" UniqueName="Sinistro_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Tomador_ID" DataType="System.Int32" 
            FilterControlAltText="Filter Tomador_ID column" HeaderText="Tomador_ID" 
            SortExpression="Tomador_ID" UniqueName="Tomador_ID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Boletim_id" DataType="System.Int32" 
            FilterControlAltText="Filter Boletim_id column" HeaderText="Boletim_id" 
            ReadOnly="True" SortExpression="Boletim_id" UniqueName="Boletim_id">
        </telerik:GridBoundColumn>
    </Columns>
  
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
  
        <ClientSettings>
            <Selecting AllowRowSelect="True" />
        </ClientSettings>
  
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
      
    </form>
</body>
</html>

File Code(VB.NET)
Imports Telerik.Web.UI
Imports System.IO
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data
Imports System.Net
Partial Class _Default
    Inherits System.Web.UI.Page
  
    Protected Sub RadComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles RadComboBox1.SelectedIndexChanged
        SqlDataSource2.SelectCommand = "SELECT [Sinistrado_ID], [Sinistro_ID], [Tomador_ID], [Boletim_id] FROM [Boletins] WHERE SINISTRADO_ID = " & RadComboBox1.SelectedValue
        RadGrid1.DataBind()
        RadComboBox1.SelectedIndex = RadComboBox1.SelectedIndex
    End Sub
  
    Protected Sub RadGrid1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.SelectedIndexChanged
        Dim boletim_id As String = DirectCast(RadGrid1.SelectedItems.Item(0), GridDataItem).Cells(6).Text.ToString
        RadTextBox1.Text = DirectCast(RadGrid1.SelectedItems.Item(0), GridDataItem).Cells(5).Text.ToString
        RadTextBox2.Text = DirectCast(RadGrid1.SelectedItems.Item(0), GridDataItem).Cells(4).Text.ToString
        Dim x As Integer = RadComboBox2.FindItemIndexByValue(boletim_id)
        'Dim z As Integer = RadComboBox1.SelectedItem.Index
        RadComboBox1.Text = ""
        RadComboBox1.SelectedValue = ""
        RadComboBox2.SelectedIndex = RadComboBox2.FindItemIndexByValue(boletim_id)
        RadComboBox2.SelectedIndex = RadComboBox1.SelectedItem.Index
    End Sub
End Class


Many Thanks,
FEST
Dimitar Terziev
Telerik team
 answered on 18 Jul 2011
4 answers
210 views
Hi,

I want to create a grid as attached in the image.
As you can see I have rowspan set to first 2 columns of the grid. I am setting the rowspan by comparing the column value in row and previous row, and by combining the rows. So i am able to achieve the first part.
columns country, currency, col3,col4,col5 are declared statically in aspx page. so far so good.
I have random number of contact columns (in turn divided into 3 columns). I want to add these columns to Grid in code-behind. I checd in the documentation of grid and it says

RadGrid does not support mixing declarative grid columns with grid columns added dynamically at runtime. You should either create all the columns in the grid programmatically, or else define them all in the ASPX file.

How to further build the Grid?

Thanks
Teldev




Iana Tsolova
Telerik team
 answered on 18 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?