Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
97 views
I have a master page with a telerik control on it.  When I create content pages using this master that have multiple pages of data on them then do a print preview I can see all of the pages just fine.  As soon as I add a local web.config to the same folder as the content page then run the page and do a print preview I only get one page - rest of the pages are blank.  This only happens to content pages that use the master page with the telerik control on it.  any ideas?  thanks! The web.config is just requiring authentication:

<configuration>
  <system.web>
    <authorization>
      <allow roles="PubAll" />
      <allow roles="PubCpi" />
      <deny users="*" />
    </authorization>
  </system.web>
</configuration>


 
Dobromir
Telerik team
 answered on 23 Jun 2011
3 answers
51 views
Hi,

Is there any way I can move legend position inside the plot area for Windows7 skin. When I set Legend Position = "Top" it is coming out as "TopLeft" where as it comes inside plotarea and centered in WebBlue skin. Why is it coming different when I change skins. Is there any way I can set it manually? 

Thanks,
Swetha
Giuseppe
Telerik team
 answered on 23 Jun 2011
1 answer
150 views
Hi,

I am using AllowDragToGroup = true. If RadGrid contains thousands of record. so grouping take lot much time. I want to give a alert message and cancel Drap and drop operation if User tries to drag any column in such condition.
Radoslav
Telerik team
 answered on 23 Jun 2011
2 answers
415 views
Hi,

I have a master page that has a RadWindowManager which contains some RadWindows that are common to all pages.
I am wanting to add specialized RadWindows on some of the child pages.

While I know that I can add these in the code behind or add them as separate RadWindows outside the Manager, I was wondering if I can add them declaratively into the RadWindowManager?
The behavior I'm looking for is similar to the use of the RadAjaxManagerProxy, and would look something like the code below.

Master Page:
<%@ Master Language="VB" CodeFile="Design.master.vb" Inherits="Design" %>
[...]
<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
   <Windows
      <telerik:RadWindow ID="CommonWindow" runat="server" />
   </Windows>
</telerik:RadWindowManager>
[...]
Child Page:
<%@ Page Language="VB" MasterPageFile="Design.master" CodeFile="Main.aspx.vb" Inherits="Main"  %>
[...]
<telerik:RadWindowManager ID="RadWindowManager1Proxy" runat="server">
   <Windows>
      <telerik:RadWindow ID="PageSpecific" runat="server" />
   </Windows>
</telerik:RadWindowManager>
[...]


If I can't do this, is there any performance cost to not putting the RadWindows into the Manager?

Many thanks.
Zadjil
Top achievements
Rank 1
 answered on 23 Jun 2011
1 answer
123 views
Hi,

    I have rad scheduler in my page. I have dynamically added  a 'more' link in appointments template with appointments id. i have set the target control id as more link id.
protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
       {
               LinkButton lnkPermitName = (LinkButton)e.Container.FindControl("lblDisplayPermitName");
               Label labelPermitName = (Label)e.Container.FindControl("labelPermitName");
               if (!IsEditable)
               {
                   lnkPermitName.Visible = false;
                   labelPermitName.Visible = true;
               }
               else
               {
                   lnkPermitName.Visible = true;
                   labelPermitName.Visible = false;
               }
                LinkButton lnkButtonMore = new LinkButton();
               lnkButtonMore.ID = e.Appointment.ID.ToString();
               lnkButtonMore.Text = "More";
              RadToolTipManager1.TargetControls.Add(lnkButtonMore.ClientID, e.Appointment.ID.ToString(), true);
               //RadToolTipManager1.TargetControls.Add(lnkButtonMore.ID, e.Appointment.ID.ToString(), false);
               if (e.Appointment.CssClass == UIConfigurationConstant.DARKBLUE)
                   lnkButtonMore.Style.Add(HtmlTextWriterStyle.Color, "white");
               e.Container.Controls.Add(lnkButtonMore);
               //LinkButton lnkButtonMore = new LinkButton();
                             }


if i pass value while setting target control its not even firing.. if i remove value and pass only id, isClient id flag then its throwing
System.ArgumentNullException: Value cannot be null.
Parameter name: Cannot find a server control with ID=36822c37-d8ca-4b29-a31f-b315fb68a4a3. If you need to specify a client-side element ID, please set IsClientID to true.


how to resolve this.. ?

thx
Marin Bratanov
Telerik team
 answered on 23 Jun 2011
1 answer
143 views
Hello again...

Hopefully this one is easier.  I have the following code:

Else

'if in edit mode, set the date picker to popup on click in input box

SetDatePickerPopop(dataItem, "ctlFollowup_DatePicker")

'enable a scroll bar if there are too many items in the list

GlobalMethods.SetDropDownHeight(CType(dataItem.FindControl("ctlUserNoteType"), RadComboBox))

GlobalMethods.SetDropDownHeight(CType(dataItem.FindControl("ctlUserCombo"), RadComboBox))

RIGHT HERE...I need to access the "ctlUserCombo", compare the text of each RadComboBoxItem, and when I find a match to a value I have, set that RadComboBoxItem to Selected = True and (if possible), Enabled = False.  That is, I have a checkbox list of people, and some have already been selected.  I want to show the user those that have already been selected, and then disable the user from being able to change the checkbox.

Any suggestions?

Thanks in advance for all the help.

Rich


Kate
Telerik team
 answered on 23 Jun 2011
2 answers
191 views
Hi

The DataFormatString doesnt seem to be formatting my data. Working example below. I am building a grid programmatically (although the live example is a hierarchical grid but this example also doesnt work).

Help really appreciated as I looking at the examples on the site I would expect it would

Thanks

aspx code
<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="DataFormatting._Default" %>
  
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
  
  
<form id="form1" runat="server">
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
  
    <div class="contributionTable" >
        <asp:PlaceHolder ID="PlaceHolder1" runat="server" >
        <telerik:RadGrid ID="clientContribution" runat="server" 
            onitemdatabound="clientContribution_ItemDataBound" >
        </telerik:RadGrid>
        </asp:PlaceHolder>
    </div>
  
</form>


Code behind
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Diagnostics;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
  
namespace DataFormatting
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                BuildTheGrid();
            }
  
        }
        protected void clientContribution_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridGroupHeaderItem)
            {
                GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item;
                DataRowView groupDataRow = (DataRowView)e.Item.DataItem;
  
            }
  
        }
        #region Build the grid
        private DataSet BuildTheGrid()
        {
            try
            {
  
                clientContribution.DataSource = null;
                DataSet contributionColumns = LoadGridData();
  
  
                // Define the main grid
                for (int loopPos = clientContribution.MasterTableView.Columns.Count; loopPos > 0; loopPos--)
                {
                    clientContribution.MasterTableView.Columns.RemoveAt(loopPos - 1);
                }
                clientContribution.ID = "MyGrid";
                clientContribution.DataSource = contributionColumns;
                clientContribution.Width = Unit.Percentage(98);
                clientContribution.AutoGenerateColumns = false;
                clientContribution.ShowStatusBar = true;
                clientContribution.MasterTableView.Width = Unit.Percentage(100);
  
                // now build the hierarchical grid
                GridBoundColumn boundColumn = new GridBoundColumn();
  
                foreach (DataColumn col in contributionColumns.Tables[0].Columns)
                {
                        boundColumn = new GridBoundColumn();
                        clientContribution.MasterTableView.Columns.Add(boundColumn);
                        boundColumn.DataField = col.ColumnName;
                        boundColumn.HeaderText = col.ColumnName;
                        boundColumn.Visible = true;
  
                        if (col.Ordinal == 1)
                        {
                            boundColumn.DataFormatString = "{0:##,###.0}";
                        }
                        if (col.Ordinal == 2)
                        {
                            boundColumn.DataFormatString = "{0:###.0%}";
                        }
  
                }
                clientContribution.DataBind();
            }
            catch (Exception exc)
            {
                Debug.WriteLine(exc.Message);
                return null;
            }
            finally
            {
            }
            return null;
  
        }
        #endregion
  
        #region Load the Grid Data
        private DataSet LoadGridData()
        {
            // return the data to display
            DataSet contributionData = new DataSet("MyData");
  
            DataTable gridData = contributionData.Tables.Add("ContData");
  
            gridData.Columns.Add(new DataColumn("DummyValue"));
            gridData.Columns.Add(new DataColumn("DecimalValue"));
            gridData.Columns.Add(new DataColumn("PercentageValue"));
  
            for (int i = 0; i < 10; i++)
            {
                DataRow dataRow = contributionData.Tables[0].NewRow();
  
                dataRow["DummyValue"] = "Value" + i.ToString();
                dataRow["DecimalValue"] = 1234.88 * i;
                dataRow["PercentageValue"] = 2.33 * i;
  
                contributionData.Tables[0].Rows.Add(dataRow);
            }
            return contributionData;
        }
        #endregion
  
    }
}

wonderbison
Top achievements
Rank 1
 answered on 23 Jun 2011
3 answers
180 views
Could someone please help me with the correct code to reference the DataKeyValue in the Child item of a Hierarchy using ItemInserted.  I have tried the following code but don't get the datakey returned at the Child ("Sheds") level.
Protected Sub RadGrid1_ItemInserted(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridInsertedEventArgs) Handles RadGrid1.ItemInserted
    If e.Exception Is Nothing Then
        Dim editedItem As GridEditableItem = e.Item
        If "Placements".Equals(editedItem.OwnerTableView.Name) Then
            Dim gridRows As GridItemCollection = RadGrid1.Items
            Dim id As Int32 = 0
            For Each data As GridDataItem In gridRows
                id = Math.Max(id, data.GetDataKeyValue("PlanMasterId"))
            Next
            UpdateFarmPerformance(id)
        ElseIf "Sheds".Equals(editedItem.OwnerTableView.Name) Then
            'Update the Placment details from the shed details
            Dim parentItem As GridDataItem = editedItem.OwnerTableView.ParentItem
            Dim id As Int32 = parentItem.OwnerTableView.DataKeyValues(parentItem.ItemIndex)("PlanMasterId")
            updatePlacements(id)
            Dim gridRows As GridItemCollection = e.Item.OwnerTableView.Items
            Dim id2 As Int32 = 0
            For Each data As GridDataItem In gridRows
                id2 = Math.Max(id2, data.GetDataKeyValue("PlanMasterShedId"))
            Next
            UpdateShedPerformance(id2)
            UpdateFarmPerformance(id)
        End If
    End If
End Sub
Thanks
Vasil
Telerik team
 answered on 23 Jun 2011
4 answers
134 views
I have turned on paging in my RadGrid control and the default limits for number of items per page are 10, 25 and 50.  However, I would also like to add additional limits for items per page for 75 and 100 in the dropdown list.

Is there a way to accomplish this in the RadGrid control?  If so, what are the settings that I need to modify?

Thanks.
Pavlina
Telerik team
 answered on 23 Jun 2011
1 answer
70 views
I have a "How the heck to I do THAT?" problem I am hoping someone can help with.

I have a page that uses a RadComboBox, which is bound to a dataset with say 10 names/values in it.  I also have a query being returned to the page, that several other controls are bound to, which also includes two columns which are nothing more than pipe separated strings, one with usernames and the other with userids.  What I need to do is, in the pre-render event, find the usernames and match them to entries in the bound ComboBox.  If found, I need to set the Checked property to true, AND then disable the checkbox so the user cannot check/uncheck the entry in the ComboBox while leaving the other entries available for use.

Anyone have any code examples that might help?  Any help at this point would be greatly appreciated!

Rich
Kate
Telerik team
 answered on 23 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?