Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
88 views
v2010.3.1215.35

I drop a RadAjaxManager on a form.  Then I use Configure Ajax Manager to set updated controls. The result looks like this:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <AjaxSettings>
    <telerik.web.ui.ajaxsetting ajaxcontrolid="RadAjaxPanel1">
      <updatedcontrols>
        <telerik.web.ui.ajaxupdatedcontrol controlid="RadAjaxPanel1">
        </telerik.web.ui.ajaxupdatedcontrol>
      </updatedcontrols>
    </telerik.web.ui.ajaxsetting>
  </AjaxSettings>
</telerik:RadAjaxManager>

The expected resulting error is:

Warning   Generation of designer file failed: Telerik.Web.UI.AjaxSettingsCollection must have items of type 'Telerik.Web.UI.AjaxSetting'. 'telerik.web.ui.ajaxsetting' is of type 'System.Web.UI.HtmlControls.HtmlGenericControl'.

If I manually enter the markup, IntelliSense properly guides the creation of the tags to create the following:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">
      <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
      </UpdatedControls>
    </telerik:AjaxSetting>
  </AjaxSettings>
</telerik:RadAjaxManager>

So what causes that?

I'm thinking this is just another variant on errors related to control references.  With every release of RadControls and every new project I find myself frustrated with questions like the following:

Do I need a reference in web.config like this?  :
<pages>
   <controls>
     <add tagPrefix="telerik" namespace="Telerik.Web.UI"
            assembly="Telerik.Web.UI" />
   </controls>
 </pages>
Does that need to have the version ID?

Is it better to GAC for development or deployment?

Why is it that if I don't include a registration like the following in every user control I get errors on nested controls?
<%@ Register TagPrefix="telerik"
             Assembly="Telerik.Web.UI, Version=2010.3.1215.35"
            Namespace="Telerik.Web.UI" %>

And how do I avoid issues if I'm working on a client project that's a year old but my current system has the latest RadControls in the toolbox?

These kinds of questions and related problems have apparently affected the developer experience for many people over the years.

I'm hoping Telerik can publish a comprehensive new doc that describes the known issues and resolutions related to assembly references, page control references, nested user controls, master pages with RadAjaxManagerProxy, etc.

Thanks for your time.
Maria Ilieva
Telerik team
 answered on 13 Jan 2011
2 answers
59 views

Using this demo as a template

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/usercontroleditform/defaultcs.aspx

How can i click "add" and when i click on "edit" on another row it automatically close the add function. as an example when you click on edit on a row if you click onedit on another row the previous one is closed.
Santos
Top achievements
Rank 1
 answered on 13 Jan 2011
2 answers
71 views
Hi, Im trying to programatically create a chart.

I hardcode Xaxis values of A, B, C and would like to add series coresponding to each of thsoe a b c values,

Unfortunately it always ends up adding all of the values to only one of the X axis items.


The fallowing code is the exert from my backend object

/radChartObj.PlotArea.XAxis.Items.Add(new ChartAxisItem("C"));

 

 

//radChartObj.PlotArea.XAxis.Items.Add(new ChartAxisItem("B"));

 

 

 

//radChartObj.PlotArea.XAxis.Items.Add(new ChartAxisItem("A"));

 


 

 

foreach (CallCenterStatistics callCenterStatObj in lstCallCenterStats)

 

{

 

chartSeriesObj =

 

new ChartSeries();

 

chartSeriesObj.Type =

 

ChartSeriesType.Bar;

 

chartSeriesObj.Name = lstChars[count] +

 

"-" + callCenterStatObj.Description;

 

chartSeriesObj.AddItem(

 

Convert.ToInt64(callCenterStatObj.Value), callCenterStatObj.Value + " - " + lstChars[count]);

 

 

chartSeriesObj.Items[0].Label.TextBlock.Appearance.TextProperties.Color =

 

Color.White;

 

chartSeriesObj.Items[0].Label.TextBlock.Appearance.TextProperties.Font =

 

new System.Drawing.Font("Arial", 8,FontStyle.Bold);

 

chartSeriesObj.Items[0].Label.TextBlock.Appearance.AutoTextWrap =

 

AutoTextWrap.True;

 

 

chartSeriesObj.Items[0].Label.Appearance.LabelLocation =

 

StyleSeriesItemLabel.ItemLabelLocation.Inside;

 

chartSeriesObj.Items[0].Label.Appearance.Position.AlignedPosition =

 

AlignedPositions.Left;

 

chartSeriesObj.Items[0].Appearance.FillStyle.MainColor =

 

Color.SeaGreen;

 

chartSeriesObj.Items[0].Appearance.FillStyle.FillType =

 

FillType.Solid;

 

 

 

count ++ ;

radChartObj.Series.Add(chartSeriesObj);

Any ideas what im doing wrong with this one?

Thanks!

Rafal
Top achievements
Rank 1
 answered on 13 Jan 2011
1 answer
56 views
When I try to insert flash video in RadEditor, it isn't shown in design mode.

To reproduse:
1. Open http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx
2. Swich to html mode.
3. Insert:
<embed wmode="transparent" src="http://www.youtube.com/v/uz4_TAoX3uE&amp;hl=en_US&amp;fs=1&amp;rel=0" quality="high" bgcolor="#FFFFFF" name="Vermont" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" width="480" align="" height="250">


4. Swich to design mode.

Insted of video, in Firefox you will see static image.
Rumen
Telerik team
 answered on 13 Jan 2011
2 answers
146 views
<asp:Button ID="btnHidden" runat="server" style="display:none;" EnableViewState="false" /> 
I'm not sure if this is a bug in the CSS inheritance of the latest browsers or a bug in the radFormDecorator. The button listed above displays on the screen, even though the inline style should take precedence over all other styles. I'm using a workaround of putting "display:none" in a  CSS class which correctly hides the button (and prevents the radFormDecorator from rendering an anchor around the input element. I'm wondering if this is related to the "Opera hack" in the radFormDecorator's CSS file?
deval
Top achievements
Rank 1
 answered on 13 Jan 2011
5 answers
78 views
We have added a color picker Tool Item using teh following configuration:

 

<tool name="ApplyBackColor" type="dropdown" ItemsPerRow="10" popupheight="120px">
      <item  name="<img  src='./_wpresources/RadEditorSharePoint/5.4.1.0__1f131a624888eeed/Resources/ToolImages/colors/ffffff.png' alt='#'/>" value=""/>
      <item  name="<img  src='./_wpresources/RadEditorSharePoint/5.4.1.0__1f131a624888eeed/Resources/ToolImages/colors/000000.png' alt='#000000'/>" value="#000000"/>

But the performance is extremely slow. there are around 50 colors that we want to display, and each color icon takes about .5 seconds to load.

Kindly suggest some better solution or performance improvement idea?

Rumen
Telerik team
 answered on 13 Jan 2011
3 answers
70 views
Hello. I have broken down my problem into a very simple page and I'm sure the solution is simple as well. I do need to rebind the grid (not in this example but in my real scenario I do) and my question is why the Rate event is triggered a second time when rebinding the grid? I have already handled the Rate event, saved my rating to the database, and as a final step I want to rebind the grid so that some other data is updated, for example some average rating or something like that. (My grid template column is much more advanced in the real scenario with lots of controls that needs to be updated when a new rating has been saved).

I've played around alot with simple binding, advanced binding and all sorts of things but right now my example looks like below. Please tell me how to solve this.

Here is the Code Behind    
public void Page_Load(object sender, System.EventArgs e)
{
    if (!IsPostBack)
    {
        FillGrid();
    }
}
 
public void FillGrid()
{
    RadGridItemRateSimple.DataSource = new ItemRateDTOService().GetItemsBySearchCriterion(new ItemSearchCriterion());
}
 
protected void RadGridItemRate_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    FillGrid();
}
 
protected void RadGridItemRate_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
    {
        ItemRateDTO itemRateDTO = (ItemRateDTO)e.Item.DataItem;
        RadRating radRating = (RadRating)e.Item.FindControl("RadRatingItem");
        if (radRating != null)
        {
            radRating.DbValue = CommonFunctions.SetDecimal(itemRateDTO.GetAvgRating());
        }
    }
}
 
protected void RadRatingItem_Rate(object sender, EventArgs e)
{
    RadRating radRating = (RadRating)sender;
    GridDataItem dataItem = (GridDataItem)radRating.Parent.Parent;
 
    long itemID = CommonFunctions.SetLong(RadGridItemRateSimple.MasterTableView.DataKeyValues[dataItem.ItemIndex]["Item.ID"]);
    Rating rating = new RatingService().GetSpecificRatingForUser(itemID, ActiveUserID);
 
    if (rating == null)
        rating = new Rating();
 
    rating.ItemID = itemID;
    rating.Rate = Convert.ToInt32(radRating.Value * 10);
    rating.CreatedBy = ActiveUserID;
 
    new RatingService().Save(rating);
     
    RadGridItemRateSimple.Rebind();
}

and the aspx
<telerik:RadGrid ID="RadGridItemRateSimple" OnItemDataBound="RadGridItemRate_ItemDataBound"  OnNeedDataSource="RadGridItemRate_NeedDataSource"
    runat="server" Width="850px" AllowSorting="True" AllowPaging="true" PagerStyle-Position="TopAndBottom" PageSize="30"
    AutoGenerateColumns="False" BorderWidth="0">
    <MasterTableView DataKeyNames="Item.ID">
        <Columns>
            <telerik:GridTemplateColumn ItemStyle-VerticalAlign="Top" HeaderText="" SortExpression="ItemName">
                <ItemTemplate>
                    <telerik:RadRating ID="RadRatingItem" runat="server" ItemCount="10" SelectionMode="Continuous"
                                    Precision="Half" Orientation="Horizontal" AutoPostBack="true" OnRate="RadRatingItem_Rate" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

Thanks!
Tsvetie
Telerik team
 answered on 13 Jan 2011
3 answers
109 views
Hi,

I set the skin ptoperty to Vista, or other skins exists in telerik package but it does not apply the skina at all.  what am I missed here?

Reards
Mazdak
Yana
Telerik team
 answered on 13 Jan 2011
7 answers
152 views
Hi,
    I am working on Scheduler/Resource Availability having problem with groupby property of Scheduler it's not working .

I am using following code on server side :
Code Snippet :

protected void Page_Load(object sender, EventArgs e)
{
DataTable tblTest = new DataTable();
tblTest.Columns.Add("ID");
tblTest.Columns.Add("RoomID");
tblTest.Columns.Add("startdate");
tblTest.Columns.Add("enddate");
tblTest.Columns.Add("Subject");
tblTest.Columns.Add("RoomName");
DataRow drTest;
drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 10:00:00.000";
drTest["enddate"] = "2011-01-11 12:00:00.000";
drTest["Subject"] = "Scheduled Lesson1";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 2;
drTest["RoomID"] = 2;
drTest["startdate"] = "2011-01-11 14:00:00.000";
drTest["enddate"] = "2011-01-11 16:00:00.000";
drTest["Subject"] = "Scheduled Lesson2";
drTest["RoomName"] = "Room1";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 3;
drTest["RoomID"] = 3;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson3";
drTest["RoomName"] = "Room2";
tblTest.Rows.Add(drTest);

drTest = tblTest.NewRow();
drTest["ID"] = 4;
drTest["RoomID"] = 4;
drTest["startdate"] = "2011-01-11 12:00:00.000";
drTest["enddate"] = "2011-01-11 14:00:00.000";
drTest["Subject"] = "Scheduled Lesson4";
drTest["RoomName"] = "Room3";
tblTest.Rows.Add(drTest);

RadScheduler2.ResourceTypes[0].DataSource = tblTest;
RadScheduler2.DataSource = tblTest;
RadScheduler2.DataBind();

}

and following is design part(.aspx)

<telerik:RadScheduler ID="RadScheduler2" Skin="Vista" runat="server" DataKeyField="ID"
        DataSubjectField="Subject" GroupBy="Room" GroupingDirection="Horizontal" DataStartField="startdate"     DataEndField="enddate"  Height="552px">
        <AdvancedForm Modal="true" />
        <TimelineView UserSelectable="false" />
        <WeekView UserSelectable="false" />
        <MonthView UserSelectable="false" />
        <DayView UserSelectable="false" />
        <ResourceTypes>
            <telerik:ResourceType KeyField="ID" Name="Room" TextField="RoomName" ForeignKeyField="RoomID" />
        </ResourceTypes>
        <AppointmentTemplate>
            <div class="rsAptSubject">
                <%# Eval("Subject") %>
            </div>
            <%# Eval("Description")%>
        </AppointmentTemplate>
        <TimeSlotContextMenuSettings EnableDefault="true" />
        <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

You can check its output in attachment.

Is anything wrong with the code?
Can you help?


Thanks & Regards,
Ruchir

Ruchir
Top achievements
Rank 1
 answered on 13 Jan 2011
2 answers
148 views

Hi

I am trying to hide the GridEditCommandColumn of a GridTableView when the user clicks on the “add new record” commandItem of the GridTableView.

GridEditCommandColumn editColumnMaster = (GridEditCommandColumn)radGridProjects.MasterTableView.GetColumn("masterEditColum");

editColumnMaster.Visible = false;

 

The above code in the item command event of the grid works perfectly to hide the editcolumn of the mastertableview but not the detail table. It seems to me the GridTableView’s editcolumn only hides after the user clicks on save or cancel. The hierarchy load mode of the grid is set to ServerBind and I am using form templates.

 

Thank you

Fred

Fred Mare
Top achievements
Rank 1
 answered on 13 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?