Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
166 views
Hi!

I'm using DotNetNuke 7.0.6 and when editing some containers it's showing the following message.

"A critical error has occurred. Telerik.Web.UI.RadWindow with ID='Window' was unable to find an embedded skin with the name 'Black'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false."

Have you ran into this?

Thanks and best regards!
Hugo Figueira
Hugo
Top achievements
Rank 1
 answered on 07 Jun 2013
1 answer
138 views
Hi everybody,
I have a problem: I have a radgrid and I want allow selected first column but others don't allow. 
I did: allow rowselected and filter by column name. However, this way is not good because radgrid 
is post back when I click in all columns.
Have any ideas ?
Thanks you very much!
function onRowSelected(sender, args)
{
       var MasterTableView = sender.get_masterTableView();
       var row = MasterTableView.get_selectedItems()[0];
       var strMA_TU = MasterTableView.getCellByColumnUniqueName(row, "MA_DV");
       var cellIndex = args.get_domEvent().target.cellIndex;       
       var colName = MasterTableView.getColumnUniqueNameByCellIndex(getHeaderRow(sender), cellIndex);      
       if(colName == "GIABQ"){
            var name = strMA_TU.innerHTML;
            Service_Test.Web_TITLE_CHITIET(name);            
            <%Session["CHILD_MADVIQLY"] = "OK";%>  
            <%Session["TEST"] = "OK"; %>      
       }
       else{
            <%Session["TEST"] = null ;%>
       }
     
}
 
Eyup
Telerik team
 answered on 07 Jun 2013
4 answers
604 views
Hello,
I have a RadDateTimePicker used where the mindate is the current time and setting the selected datetime to the closest 30 minutes from the current time onwards. Even though I set the mindate to the current time. I am able to select an earlier time before the mindate value from the timeview. 

ASP Markup : 
<telerik:RadDateTimePicker ID="dpDate" runat="server" Width="190" TabIndex="19">
    <Calendar ID="ddCalendar" runat="server" EnableKeyboardNavigation="true">
    </Calendar>
    <DateInput ID="ddDate" runat="server" DateFormat="dd/MM/yyyy hh:mm tt">
    </DateInput>
    <TimeView ID="TimeView1" runat="server" Interval="00:30:00">
    </TimeView>
</telerik:RadDateTimePicker>


C# Code : 
this.dpDate.MinDate = DateTime.Now;
this.dpDate.SelectedDate = DateTime.Now.AddMinutes(30 - (DateTime.Now.Minute % 30)).AddSeconds(-DateTime.Now.Second).AddMilliseconds(-DateTime.Now.Millisecond);
Viktor Tachev
Telerik team
 answered on 07 Jun 2013
1 answer
85 views
My Page header contains:

<meta http-equiv="X-UA-Compatible" content="IE=7" />


After Upgrading from version: 2010.3.1109
to version: 2012.5.215

I get this error when I run the page:

SCRIPT87: Invalid argument.
Telerik.Web.UI.WebResource.axd, line 678 character 1


How can I resolve this ?
Thanks.

Viktor Tachev
Telerik team
 answered on 07 Jun 2013
1 answer
121 views
Hi Experts,

   I have created Rotator, where if i click on image javascript should open,it should be done from code behind.
Now the problem is, if i click on any corner or outside the image,(ItemClick) event is firing,but when i click on the image it is not firing.
How to accomplish this,please help me with this,its urgent.

Here is my code :
---------------------------

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>

<%@ 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 id="Head1" runat="server">
   
    <style type="text/css">
        .itemTemplate
        {
            width: 80px;/* 11px margin is taken into account */
            height: 50px;
        }
        .rightArrow
        {
            cursor: pointer;
            float: right;
        }
        .leftArrow
        {
            cursor: pointer;
            float: left;
        }
    </style>

  

</head>
<body class="BODY">
    <form runat="server" id="mainForm" method="post">
   
    <telerik:RadScriptManager ID="ScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div style="width: 454px;">
<asp:Image ImageUrl="images/right.gif" ID="img_right" AlternateText="right" runat="server"
CssClass="rightArrow" />
        <asp:Image ImageUrl="images/left.gif" ID="img_left" AlternateText="left" runat="server" CssClass="leftArrow"/>
        <div style="background-image: url(images/bg.gif); width: 355px; height: 103px; margin-left: 49px;
            padding-top: 19px; background-repeat: no-repeat; box-sizing: border-box; -moz-box-sizing: border-box;">
            <div style="margin-left: 20px; padding-top: 20px;">
                <telerik:RadRotator DataSourceID="xmlDataSource1" runat="server" ID="RadRotator1" 
                OnItemCreated="RadRotator1_OnItemCreated" OnItemClick="RadRotator1_OnItemClick"     Width="314" Height="50" ItemWidth="80" ItemHeight="50" FrameDuration="1" RotatorType="ButtonsOver">
                    <ItemTemplate>
                        <div class="itemTemplate">
                          
                        <asp:ImageButton ID="Img1" runat="server"  ImageUrl='Images/<%# XPath("Image") %>' AlternateText="" style="margin: 0px 11px;" /> 
                        <asp:Label ID="RowIndex" runat="server"></asp:Label>
                        </div>
                    </ItemTemplate>
                    <ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
                </telerik:RadRotator>
            </div>
        </div>
    </div>
    <br />
    <asp:XmlDataSource ID="xmlDataSource1" runat="Server" DataFile="~/data.xml"></asp:XmlDataSource>
   
  
   
   
    <telerik:RadWindow ID="UserListDialog" runat="server" Title="Editing record" Height="320px" 
                Width="310px" Left="150px" ReloadOnShow="true" ShowContentDuringLoad="false"
                Modal="true">
                <ContentTemplate>
                This is Rad Window content
                </ContentTemplate>
            </telerik:RadWindow>
    
   
    </form>
</body>
</html>
 
Code Behind
----------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void RadRotator1_OnItemCreated(object sender, RadRotatorEventArgs e)
    {
        if (e.Item.DataItem != null)
        {
            Label RowIndex = (Label)e.Item.FindControl("RowIndex");

            ImageButton image1 = e.Item.FindControl("Img1") as ImageButton;// Find the asp:Image server control
            
            RowIndex.Text = Convert.ToString(e.Item.Index);


            string text = Convert.ToString(RowIndex.Text);
            ClientScript.RegisterClientScriptBlock(GetType(), "ClientScript", "<script>alert('" + text + "')</script>");
   

         
        }
    }


    protected void RadRotator1_OnItemClick(object sender, RadRotatorEventArgs e)
    {
        RadRotator rotator = sender as RadRotator;
        rotator.InitialItemIndex = e.Item.Index;// Persist the index 

        string text = Convert.ToString(rotator.InitialItemIndex);
        ClientScript.RegisterClientScriptBlock(GetType(), "ClientScript", "<script>alert('" + text + "')</script>");
    }

}



Please help me with this.

Thanks in Advance
     Prasanth
Slav
Telerik team
 answered on 07 Jun 2013
9 answers
775 views
Hello,

I've been trying to teach myself, with no prior web development experience, to design a program for my internship. In order to get familiar with telerik's tools, I've been making practice applications and everything was going fine, until I ran into a snag.

For quite some time now, I've been trying to figure out how to use the dropdownlists in Radgrid to my advantage. I would like a dropdownlist to reference another table, but from, of course, the same database. For instance, say I make a table using the provided telerik.mdf database. I display from the appointments table many fields, including the userid, and would then like to display, based on that userid, the corresponding username from the "users" table. I hope that I'm articulating my needs well enough- I'm new at this.

I have tried a number of things. I have tried, on the properties menu, trying to get the dropdownlist to reference another database, but then datafield never recognizes fields from that second datasource, but if I reference the first datasource, the listtextfield and listvaluefield can't see things from the second table. Maybe theres something I'm missing here about how it works, but I felt like no combination would work here.

I have also tried manually populating the dropdownlist from the codebehind, but the list always ends up empty. I try filling up a dataset with a dataadapter and then giving the dropdownlist the information that way, but it never fills, whether I try to set the properties that way or grab the elements from the dataset individually and put them in- I'm just always ending up with empty lists.

Obviously 2 things are true- I have changed the code around many times and this is just a snapshot, so I hope all of my explanations have articulated well enough the other things I have tried. Furthermore I bet the code is poorly written at this point- I'm still just experimenting with how these things work. Nonetheless, here is the aspx code:

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AgainWithTheInternStuff._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></title>

 

 

<style type="text/css">

 

 

.style1

 

{

 

margin-top: 0px;

 

}

 

</style>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<div>

 

 

 

</div>

 

 

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

 

 

</asp:ScriptManager>

 

 

 

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

 

 

CssClass="style1" DataSourceID="SqlDataSource1" GridLines="None"

 

 

onitemdatabound="RadGrid1_ItemDataBound">

 

<

 

MasterTableView autogeneratecolumns="False" datakeynames="ID"

 

 

datasourceid="SqlDataSource1">

 

<

 

RowIndicatorColumn>

 

<

 

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

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

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

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID"

 

 

ReadOnly="True" SortExpression="ID" UniqueName="ID"

 

 

EditFormColumnIndex="3">

 

 

</telerik:GridBoundColumn>

 

 

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

 

 

SortExpression="Subject" UniqueName="Subject">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Start" DataType="System.DateTime"

 

 

HeaderText="Start" SortExpression="Start" UniqueName="Start">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="End" DataType="System.DateTime"

 

 

HeaderText="End" SortExpression="End" UniqueName="End">

 

 

</telerik:GridBoundColumn>

 

 

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

 

 

SortExpression="UserID" UniqueName="UserID" DataType="System.Int32">

 

 

</telerik:GridBoundColumn>

 

 

 

<telerik:GridDropDownColumn DropDownControlType="DropDownList"

 

 

HeaderText="User Name" UniqueName="DropDown">

 

 

</telerik:GridDropDownColumn>

 

 

 

</Columns>

 

 

</

 

MasterTableView>

 

 

</telerik:RadGrid>

 

 

 

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

 

 

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

 

 

 

SelectCommand="SELECT [ID], [Subject], [Start], [End], [UserID] FROM [Appointments]">

 

 

</asp:SqlDataSource>

 

 

</form>

 

</

 

body>

 

</

 

html>

 




And here is the .cs code:

using

 

System;

 

using

 

System.Collections.Generic;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.WebControls;

 

using

 

System.Data.SqlClient;

 

using

 

System.Data;

 

using

 

System.Configuration;

 

using

 

Telerik.Web.UI;

 

namespace

 

AgainWithTheInternStuff

 

{

 

public partial class _Default : System.Web.UI.Page

 

{

 

SqlDataAdapter sdadapter ;

 

 

DataSet dset ;

 

 

SqlCommand scom ;

 

 

SqlConnection scon ;

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

scon =

new SqlConnection(ConfigurationManager

 

.ConnectionStrings[

"TelerikConnectionString"].ConnectionString );

 

scom =

new SqlCommand();

 

dset =

new DataSet();

 

sdadapter =

new SqlDataAdapter();

 

 

}

 

protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)

 

{

scon.Open();

scom.Connection = scon;

scom.CommandText =

"SELECT ID, UserName FROM Users";

 

sdadapter.SelectCommand = scom;

sdadapter.Fill(dset);

scon.Close();

 

 

 

if (e.Item is GridEditFormItem && e.Item.IsInEditMode)

 

{

 

GridEditFormItem efi = (GridEditFormItem)e.Item;

 

 

DropDownList ddl = (DropDownList)efi["DropDown"].Controls[0];

 

ddl.DataSource = dset;

 

ddl.DataMember =

"Users";

 

ddl.DataValueField =

"ID";

 

ddl.DataTextField =

"UserName";

 

 

ddl.DataBind();

}

 

 

 

}

}

}






Anyway, I see that you all get back to people very quickly and very thoroughly, and wondered if you could shed some light on why some of these things aren't working, and where my lapse in understanding is. Thank you so much for your time.


Nicole
Kostadin
Telerik team
 answered on 07 Jun 2013
4 answers
369 views
Hi All,

Im having Javascript error whenever I do sorting on my GridTemplateColumn..
Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined
error on --> a.control=this; 
under --> Telerik.Web.UI.We....ed16cbdc [dynamic] 

I have used this as a reference but it didnt work for me. http://www.telerik.com/help/aspnet-ajax/grid-sorting-for-hyperlink-template-columns.html

The only difference is that Im using Masterpage and the grid is inside RadMultiPage..

<asp:Content ID="Content3" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
......
.....
<
telerik:RadMultiPage ID="MultiPageMain"  .......
    <telerik:RadPageView ID="PanelPageView1"  .......
         <telerik:RadGrid ID="GrdMain" runat="server" AutoGenerateColumns="False" CellSpacing="0" AllowSorting="True" ......
               <MasterTableView TableLayout="Fixed">
              <Columns>
                <telerik:GridTemplateColumn HeaderText="Comp Name" UniqueName="CompName" SortExpression="CompName">
               <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                            <ItemTemplate>
                                  <
asp:Label ID="lblCompName" Runat="server" Text='<%# Convert.ToString(DataBinder.Eval(Container.DataItem, "CompName")) %>' />
                            </ItemTemplate>
             </telerik:GridTemplateColumn>
                    ......
......


 

Thanks in Advance.



RJ
Top achievements
Rank 1
 answered on 07 Jun 2013
1 answer
104 views
I have a RadGrid on my page that I build totally in the code behind. During the Pre-Render of the RadGrid I am setting each of the column widths using the HeaderStyle.Width. I also have hierarchy views on some of the rows. I use the NeedDataSource to acquire data for the grid.

When I populate the Grid the first time, all column widths are in tact and scrolling horizontally works and looks correct. Then when I either page, filter or sort, the grid rebinds with the new data and presents itself looking correct. When I scroll horizontally, one column in the MasterTableView loses its width and expands out almost 4 times its current state.

My pre-render looks like it is working since the grid looks correct when it presents itself, it is just when I horizontally scroll.

This only happens on my test environment. In development and on my machine, this does not happen. Same dll's are used on all 3 enviroments. I am using version 2012.2.815.40
Eyup
Telerik team
 answered on 07 Jun 2013
3 answers
177 views
Hi

I'm trying to make a RadGrid with cascadingcombo boxes. I'm new to Telerik so i have no clue what i'm doing at the moment. I tried to make the DropDown colum his datasource a list that i get from the DB trough Linq and trough a DTOmapper. So the thing is i can't attach my list of dto's to the comboboxcolum ! Because it only takes a string and not a List of objects. Does anyone know what i'm doing wrong or am i completly forgetting something ?

Ill attach my code
private void LoadBehandelaars(int toInt32)
     {
         DataTable behandelaar = new DataTable();
         List<User> Behandelaars = _clientenFunctions.GetBehandelaarsByDiscipline(Convert.ToInt32(Session["cate"]));
         behandelaar.PrimaryKey = new DataColumn[]{ behandelaar.Columns.Add("NestorNummer",typeof(string))};
         behandelaar.Columns.Add("UserName", typeof (string));
 
         foreach (User user in Behandelaars)
         {
             behandelaar.Rows.Add(new object[]
                                      {
                                          user.NestorNummer, user.UserName
                                      }
                 );
         }
 
         GridDropDownColumn BehanderlaarColumn = new GridDropDownColumn();
         BehanderlaarColumn.HeaderText = "Behandelaar";
         BehanderlaarColumn.DataSourceID = behandelaar.ToString();
     }
Kostadin
Telerik team
 answered on 07 Jun 2013
1 answer
99 views
Hi all,

I want to design the  report table like wise 
 

  Name    id                    Menuitem                    description              price
                                menuname    Code
  aa         2                   Orange       Occ                mfhff                     21576
Princy
Top achievements
Rank 2
 answered on 07 Jun 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?