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

I am upgrading VS2003 project created in 2007 with much older version of RadUpload control. New will be VS2010/Latest Telerik controls. It use to have CSS I could make control apperance changes. Now with latest upload control I can't find anything. I searched help for how to change control width in run time and help suggested to use MinWidth=.... I applied this in source but control remained same width in run time. How can I do this and why help suggestion doesn't work? Also clicking on any part of control poping up file select dialog, how to change it to popup file selection dialog only on button click?

Thanks!
Kate
Telerik team
 answered on 10 Jul 2012
2 answers
84 views
Hello,

I'm using a RadRibbonBar, which is placed inside of a Rad Pane. I've set the width of the RibbonBar to 100% because I want it to cover up the whole page, but unfortunately there still are a few pixels of blank space between the end of the RibbonBar and the border of the page. Setting padding, margin, BorderWidth or BorderStyle of any of the controls didn't change anything.
Do you have any suggestions on how to fix this?

Thanks in advance,
Robin
Robin
Top achievements
Rank 1
 answered on 10 Jul 2012
1 answer
70 views
Hello!

I am using  Telerik version: 2009.3.1208.0

My task is to add an arrow to the node (on the right side of the node) so people can left-click on it and access context menu. See picture attached.

I was able to to do that through creating a nodetemplate (subscribing to an interface) and then assigning my class to NodeTemplate property (on Page Init) 

Here is the code:

Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports Telerik.Web.UI
 
    Public Class MyNodeTemplate
        Implements ITemplate
 
        Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
            Dim newLabel As New Label()
            newLabel.CssClass = "nodeLabel"
            newLabel.Text = DirectCast(container, RadTreeNode).Text
 
            Dim arrowDiv As New System.Web.UI.HtmlControls.HtmlGenericControl("DIV")
            arrowDiv.Attributes.Add("class", "nodeRightClickArrow")
            arrowDiv.Attributes.Add("onclick", "LeftClickContextMenuClick(event, this);")
 
            container.Controls.Add(newLabel)
            container.Controls.Add(arrowDiv)
        End Sub
 
    End Class

Everything seems fine EXCEPT:

When expanding one of the nodes, the NodeExpand Event sends the wrong value for the node that is being expanded. For example, if I expand Node 3, it gives me value (e.Node.Value)  for Node 1. See attached picture for more explanation. As a result wrong child nodes are loaded.


Questions:

1) Why NodeExpand is broken when NodeTemplate is being added ?
2) Any way to achieve  adding an arrow to the node so people can left-click on it without overwriting NodeTemplate?
Plamen
Telerik team
 answered on 10 Jul 2012
2 answers
62 views
Hello, after upgrading from q1 2011 to the latest version, some grids began to have problems. The message is   "Error en tiempo de ejecución de Microsoft JScript: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element". Debugger breaks in scriptresource.axd.

Problem appears in grids having column header titles with blank spaces as "the title", and with column filters enabled. If I remove the blanks, or disable the filters, problem dissappears.


Thanks for any help
Maria Ilieva
Telerik team
 answered on 10 Jul 2012
1 answer
591 views
HI All

i need to get only the values of the rows for which checkbox is checked, i am getting null values for the checkbox checked value pls help me out


i have a radgrid with asp checkbox column in gridtemplate column

this is my code aspx page for radgrid

            <telerik:RadGrid ID="M" runat="server" Width="99%" AllowPaging="True" EnableViewState="False"
                GridLines="None" meta:resourcekey="MResource1" AllowFilteringByColumn="true" 
                OnInit="GridControl_Init" EnableLinqExpressions="false" 
                EnableEmbeddedSkins="false" AutoGenerateColumns="false">
                <HeaderContextMenu EnableEmbeddedSkins="True">
                </HeaderContextMenu>
                <FilterMenu Skin="Nediso" EnableEmbeddedSkins="false">
                </FilterMenu>
                <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" AlwaysVisible="true" />
                <MasterTableView Width="100%" EnableViewState="False" AllowFilteringByColumn="true" DataKeyNames="TOKEN" EditMode="EditForms">
                   <Columns>  
                            
                   <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="false" ForceExtractValue="Always" >
                  
                            <HeaderTemplate>
                             <asp:CheckBox id="Headercheck"  runat="server" onclick="SelectAll(this);"></asp:CheckBox>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox id="Childcheck" runat="server"  ></asp:CheckBox>
                            </ItemTemplate>
                             <HeaderStyle Width="3%" HorizontalAlign="Justify" />
                    <ItemStyle Width="3%" HorizontalAlign="Justify" />
                        </telerik:GridTemplateColumn>
                   <telerik:GridBoundColumn DataField="TOKEN" Visible="false" UniqueName="TOKEN" ReadOnly="true" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FIRST NAME" HeaderText="FIRST NAME" UniqueName="FIRST NAME">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="LAST NAME" HeaderText="LAST NAME" UniqueName="LAST NAME">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="STATUS" HeaderText="STATUS" UniqueName="STATUS">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="DESIGNATION" HeaderText="DESIGNATION" UniqueName="DESIGNATION">
                    </telerik:GridBoundColumn>
                     
                    </Columns>
                    <PagerStyle AlwaysVisible="true" Mode="NextPrevAndNumeric" Position="TopAndBottom" />
                                 
                </MasterTableView>
                
                <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" EnableRowHoverStyle="True" EnablePostBackOnRowClick="true">
                    <Resizing AllowColumnResize="True" />
                    <Selecting AllowRowSelect="True"   />                    
                    <ClientEvents OnFilterMenuShowing="OnFilterMenuShowing"  ></ClientEvents> 
                    </ClientSettings>
                <FilterMenu EnableTheming="True">
                    <CollapseAnimation Type="None" />
                    <ExpandAnimation Type="None" />
                </FilterMenu>
                
            </telerik:RadGrid>

i have a button outside the radgrid, when i click the button it should get only the values checked in checkbox of radgrid 

this is my code for button click event

 protected void PushNtnBtn_Click1(object sender, EventArgs e)
        {




             foreach (GridDataItem item in M.MasterTableView.Items)
                {
                    //  bool isChecked = ((CheckBox)M.MasterTableView.FindControl("CheckBox1")).Checked;


                    CheckBox CheckBox1 = (CheckBox)item["CheckBoxTemplateColumn"].FindControl("Childcheck");


                    CheckBox c1 = item.FindControl("Childcheck") as CheckBox;
                    if (c1.Checked)
                    {
                        string token = item.GetDataKeyValue("TOKEN").ToString();
                        iPhnMainMethod(token);
                    }
                }
             }


      here both checkbox1 and c1 are returning null values, pls help me out
Shinu
Top achievements
Rank 2
 answered on 10 Jul 2012
0 answers
79 views
Hi all,
i am Srinivas,
       In my project i used Rad Calender Control for display a specific dates in a different formats, eg: i want to display a national holidays in a calender with LightSkyBlue color. 

For the above example i used the following code in a Webpart.
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using System.Collections;
using System.Data;
using System.Drawing;
using Telerik.Web.UI;
 
namespace MyCalendar.MyLeaveCalender
{
    [ToolboxItemAttribute(false)]
    public class MyLeaveCalender : WebPart
    {
        private IWebPartTable _provider;
        private ICollection _tableData;
        private ICollection _tableData1;
        protected RadCalendar CusCalender = null;
        int count = 1;
 
        //[ConnectionConsumer("Holidays")]
        [ConnectionConsumer("MyLeave", AllowsMultipleConnections = true)]
        //[ConnectionConsumer("Filter", "UniqueFilterName", AllowsMultipleConnections = true)]
        //public void GetConnectionInterface(IWebPartParameters pProvider) { }
 
 
 
        public void GetConnectionInterface(IWebPartTable provider)
        {
            TableCallback callback = new TableCallback(ReceiveTable);
            _provider = provider;
            provider.GetTableData(callback);
        }
 
        public MyLeaveCalender()
        {
 
        }
 
        public void ReceiveTable(object providerTable)
        {
                _tableData = providerTable as ICollection;
        }
 
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            CusCalender = new RadCalendar();
            CusCalender.Width = 400;
            CusCalender.Height = 200;
            CusCalender.SelectedDate = DateTime.Now;
            CusCalender.DayRender += new Telerik.Web.UI.Calendar.DayRenderEventHandler(CusCalender_DayRender);
            Controls.Add(CusCalender); 
        }
 
        protected void CusCalender_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        {
            #region Holiday Calender
 
            if (e.Day.IsToday)
            {
                e.Cell.ToolTip = "ToDay";
                e.Cell.BorderWidth = 2;
            }
          
            try
            {
                if (_tableData != null)
                {
                    foreach (DataRowView rowView in _tableData)
                    {
                        // string widgetCode = rowView.Row[2].ToString();
                        string status = rowView.Row[6].ToString();
                        DateTime startdate = Convert.ToDateTime(rowView.Row[3].ToString());
                        if ((startdate.Date == e.Day.Date.Date) && (status.ToString() == "Accept"))
                        {
                            // e.Cell.BackColor = Color.LightSkyBlue;
                            //e.Cell.ToolTip = widgetCode;
                            //String url = e.SelectUrl;
                            e.Cell.Controls.Clear();
                            HyperLink link = new HyperLink();
                            link.Text = e.Day.Date.Day.ToString();
                            int j = 1;
                            link.ToolTip = "Leave Accepted List";
                            foreach (DataRowView rowView1 in _tableData)
                            {
                                DateTime startdates = Convert.ToDateTime(rowView1.Row[3].ToString());
                                DateTime enddate = Convert.ToDateTime(rowView1.Row[4].ToString());
                                string statuss = rowView1.Row[6].ToString();
                                if ((startdates.Date == e.Day.Date.Date) && (statuss.ToString() == "Accept"))
                                {
                                    CusCalender.SelectedDates.SelectRange(startdates, enddate);
                                    CusCalender.SelectedDayStyle.BackColor = Color.LightSkyBlue;
                                    e.Cell.BackColor = Color.LightSkyBlue;
                                    statuss = "";
                                    link.ToolTip = link.ToolTip + "\n" + j + ". " + System.Text.RegularExpressions.Regex.Replace(rowView1.Row[5].ToString(), @"<(.|\n)*?>", string.Empty) + " By " + rowView1.Row[2].ToString();
                                    j++;
                                }
                            }
                           //link.NavigateUrl = url;
                            e.Cell.Controls.Add(link);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
}

in the above example it get's  the data from the SharePoint List and shown in the RadCalender webpart with LightSkyBlue 
color perfectly. but here the problem is when mouse over the calender webpart  the color will not display's for the specific dates. 

The Following Images are the examples for Before Mouse Over and After Mouse Over


Please help me,

Thanks
D.SRINIVASA
Top achievements
Rank 2
 asked on 10 Jul 2012
5 answers
192 views
All,

I'm having a GUI issue with the RadGrid, a problem that I thought I had resolved by setting the EnableTheming to false on the RadGrid itself.

The problem is that I get blanks instead of images for any of the controls on the RadGrid that are supposed to be imaged.  Originally, I got around this problem by setting 'EnableTheming=false', but as soon as I attached a Master page to the screen, the problem came back.

I tried setting the EnableTheming to false for the page and the Master Page and it still doesn't alleviate the problem.  If I remove the Master Page, the images come back.

I'm wondering what else might be causing this conflict.  Based on the behavior, I'm thinking it's something that might be coded on the Master page itself.

Any hints or tips would be greatly appreciated

Ray
Maria Ilieva
Telerik team
 answered on 10 Jul 2012
1 answer
413 views

Hi,

I have an error when clicking a button or Changing Radcombo in a JQuery popup

I am using Updatepanel with RadAjaxManager.

The stack of the error message is:

Stack Trace:

[ArgumentException: Invalid JSON primitive: {"enabled":true,"emptyMessage":"","minValue":1,"maxValue":70368744177664}.]
   System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) +561472
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +44
   System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) +13
   Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +136
   Telerik.Web.UI.RadInputControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +50
   Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +42
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +327
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878


I appreciate the help.
Dimitar Terziev
Telerik team
 answered on 10 Jul 2012
8 answers
97 views
Hi,

Can any one help me on this.

I want to remove the first column (Enabled false) one from the raddate picker calender popup.

Please refer my attachment for detail.

Thanks in Advance,

Thenmozhi.R
Maria Ilieva
Telerik team
 answered on 10 Jul 2012
3 answers
543 views
Hi,

How can I clear the filter items in the RadFilter programmatically? I want to be able to do programmatically that we can do by clicking "X" to remove a filter item from the RadFilter. Is this possible? If so, can you provide me an example to do this?

I want to remove all filter items and not just one item. (reset to the default RadFilter view with no filter expressions)

Thanks
Mahipal
Maria Ilieva
Telerik team
 answered on 10 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?