Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
hi all ..
i've radgrid with NestedViewTemplate ,
in NestedViewTemplate i've button with server side function "OnClick" ..
my question is ; how can i get the current parent selected row (expanded row) from server side ???


thanks in advance ..
Jayesh Goyani
Top achievements
Rank 2
 answered on 10 Jul 2012
5 answers
233 views
Hi,

We are using Telerik 2010.1.415.35 version.

In our application we have a scenario where we will generate rad grid using dynamic template.
we have horizontal and vertical scrolling.
when even am sorting on right most column in the grid it not holding the focus, its resetting to first column always.

this works fine with dynamic columns(dynamic template) with out static headers.
but we with static header it is creating a issue not maintaining scroll position.

Thanks In Advance.
Raghav
Galin
Telerik team
 answered on 10 Jul 2012
1 answer
93 views
I have a very wide RadGrid (the latest public release version) that I'm using as an export into Excel. I have the root query ordering the columns a certian way - the way the customers want the Excel output in... However, when I databind my RadGrid on the webpage, the columns are automatically reordered into alphabetical order!

How do I preventing the autogenerated columns from reordering themselvesinto alphabetical order?

Thanks
<telerik:RadGrid ID="gridSellerData" runat="server" Width="100%" CellSpacing="0" CellPadding="0"
    PageSize="5000" EnableLinqExpressions="False" HeaderStyle-Wrap="false" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Skin="Hay"
    OnItemDataBound="grid_ItemDataBound" OnNeedDataSource="grid_NeedDataSource"
    OnPreRender="gridContractData_PreRender" OnGridExporting="gridSellerData_GridExporting"
    >
    <ClientSettings AllowColumnsReorder="false">
        <Selecting EnableDragToSelectRows="false" UseClientSelectColumnOnly="false" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true" FrozenColumnsCount="0" />
    </ClientSettings>
    <ExportSettings IgnorePaging="true" ExportOnlyData="true" Excel-Format="ExcelML" OpenInNewWindow="true" HideStructureColumns="true" />
    <MasterTableView CommandItemDisplay="Top" DataKeyNames="LoanImportID" ClientDataKeyNames="LoanImportID" GridLines="Both">
        <CommandItemSettings ExportToExcelText="Export To Excel" ShowExportToExcelButton="true" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
        <ItemStyle CssClass="Row0" />
        <AlternatingItemStyle CssClass="Row1" />
    </MasterTableView>
    <HeaderStyle Wrap="False" />
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Hay">
    </HeaderContextMenu>
</telerik:RadGrid>
Antonio Stoilkov
Telerik team
 answered on 10 Jul 2012
3 answers
116 views
I am using a RadTree & wants to achieve following details:
1) If user clicks on node : it will open another page in the right frame
2) If user clicks on the context menu option (Bookmark) on the same node :
    a) it should update the radmenu at the top (this requrs server side call), but 
    b) should not refresh the page or specifically update the right frame.

I am using "RadAjaxManager" & everything else is working alright except (2b).
Is there a way I can control the RadTree to update the frame oly on NodeClick & not on Contextenu click

Thank you
Plamen
Telerik team
 answered on 10 Jul 2012
3 answers
138 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
96 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
85 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
82 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
632 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
103 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?