Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
99 views
Hi Telerik,

I'm trying to achive something like in the PivotGrid_ExcelBase image. There you can see the years (2012, 2013) columns with both personen and bedrag columns underneath.

Currently I tried to achieve that with the following code:

01.<Fields>
02. <telerik:PivotGridRowField DataField="SoortIndicatie" UniqueName="SoortIndicatieColumn" Caption="Soort Indicatie" >
03. </telerik:PivotGridRowField>
04. <telerik:PivotGridRowField DataField="SoortVerzilverd" UniqueName="SoortVerzilverdColumn" Caption="Soort Verzilverd">
05. </telerik:PivotGridRowField>
06. 
07. <telerik:PivotGridColumnField DataField="Jaar" UniqueName="JaarColumn" Caption="Jaar">
08. </telerik:PivotGridColumnField>
09. <telerik:PivotGridColumnField DataField="Personen" UniqueName="PersonenColumn" Caption="Personen">
10. </telerik:PivotGridColumnField>
11. <telerik:PivotGridColumnField DataField="Bedrag" UniqueName="BedragColumn" Caption="Bedrag">
12. </telerik:PivotGridColumnField>
13.</Fields>

This shows me a grid as depicted in the PivotGrid_Rendered image. The person and budget columns are also grouped, that's not what I want.
How can I configure this?

Can you tell me how to do so? 

Best regards,
Francois
Francois
Top achievements
Rank 1
 answered on 22 May 2014
1 answer
279 views
We currently have a requirement to support an audio captcha in a language other than English (i.e. Spanish). By this, I mean the letters must be pronounced as they are in that language's alphabet. Can Telerik's captcha handle this use-case?
Slav
Telerik team
 answered on 22 May 2014
5 answers
176 views
Hello ALL,

              I have a rad grid on my web page, i had applied virtual paging on rad grid as well as grouping on column.

             Rad grid page size is 30, suppose i have 250 records on rad grid so no of available pages would be 9.

              Now i had apply grouping on specific column which have following records on the basis of column value.

             There are three separation after applying grouping on column.

             Type : ABC : 242 records

              Type : DEF : 4 records

               Type : XYZ : 4 records

              Initially i can see the grouping on column but after scrolling i can view only the Type : ABC : 242 records.

              Main concern behind that the after scroll the page virtual paging get fired and i am not able to view rest of the available groups.

              Is there any solution to resolve this issue or any property/setting is to be there that i need to set.
Daniel
Telerik team
 answered on 22 May 2014
4 answers
247 views
This was working in previous versions of the RadControls for ASP.NET AJAX, but now with version 2012.3.1016.35 it does not. I have a grid with both grouping and paging enabled, and only the first page appears. If I remove the <telerik:GridGroupByExpression> tag from the grid then the other pages are accessible.

Am I doing something wrong or is this a bug in the otherwise excellent Telerik controls?

Thanks -
Brad Harris

Here is my markup:

<html>
  <head>
    <title>Grid Group & Page Test</title>
  </head>
  <body>
    <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager1" runat="server" />
      <telerik:RadGrid
        ID="RgDamageCases"
        runat="server"
        AllowAutomaticDeletes="false"
        AllowAutomaticInserts="false"
        AllowAutomaticUpdates="false"
        AllowFilteringByColumn="true"
        AllowMultiRowEdit="false"
        AllowPaging="true"
        AllowSorting="false"
        AutoGenerateColumns="false"
        GridLines="Horizontal"
        PageSize="5"
        OnNeedDataSource="RgDamageCases_NeedDataSource"
        >
        <MasterTableView DataKeyNames="Id" CommandItemDisplay="None">
          <GroupByExpressions>
            <telerik:GridGroupByExpression>
              <SelectFields>
                <telerik:GridGroupByField FieldAlias="State" FieldName="State" HeaderValueSeparator=": " />
              </SelectFields>
              <GroupByFields>
                <telerik:GridGroupByField FieldName="State" SortOrder="Ascending" />
              </GroupByFields>
            </telerik:GridGroupByExpression>
          </GroupByExpressions>
          <Columns>
            <telerik:GridBoundColumn UniqueName="State" DataField="State" HeaderText="State" AllowFiltering="true"  AllowSorting="true" DataType="System.String" Visible="true" />
            <telerik:GridBoundColumn UniqueName="Name"  DataField="Name"  HeaderText="Name"  AllowFiltering="false" AllowSorting="true" DataType="System.String" Visible="true" />
          </Columns>
          <PagerStyle AlwaysVisible="true" Position="TopAndBottom" Mode="NextPrevAndNumeric" Visible="true" />
        </MasterTableView>
        <GroupingSettings CaseSensitive="false" ShowUnGroupButton="true" />
      </telerik:RadGrid>
    </form>
  </body>
</html>

And the codebehind:

Imports System.Collections.ObjectModel
Imports Telerik.Web.UI
 
 
Partial Class GridTest01Page
    Inherits System.Web.UI.Page
 
 
  Protected Sub RgDamageCases_NeedDataSource(ByVal source As Object, ByVal e As GridNeedDataSourceEventArgs)
 
    Dim grid  As RadGrid = CType(source, RadGrid)
    Dim items As New Collection ( Of MyType )
 
    items.Add ( New MyType (  1, "001 Test", "AZ" ) )
    items.Add ( New MyType (  2, "002 Test", "AZ" ) )
    items.Add ( New MyType (  3, "003 Test", "AZ" ) )
    items.Add ( New MyType (  4, "004 Test", "AZ" ) )
    items.Add ( New MyType (  5, "005 Test", "AZ" ) )
    items.Add ( New MyType (  6, "006 Test", "AZ" ) )
    items.Add ( New MyType (  7, "007 Test", "AZ" ) )
    items.Add ( New MyType (  8, "008 Test", "AZ" ) )
    items.Add ( New MyType (  9, "009 Test", "AZ" ) )
    items.Add ( New MyType ( 10, "010 Test", "AZ" ) )
    items.Add ( New MyType ( 11, "011 Test", "AZ" ) )
 
    grid.DataSource = items
  End Sub
 
 
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    ' Nothing Here
  End Sub
 
 
End Class
 
 
Public Class MyType
 
  Private _Id    As Integer
  Private _Name  As String
  Private _State As String
 
  Public Property Id As Integer
    Get
      Return _Id
    End Get
    Set(value As Integer)
      _Id = value
    End Set
  End Property
 
  Public Property Name As String
    Get
      Return _Name
    End Get
    Set(value As String)
      _Name = value
    End Set
  End Property
 
  Public Property State As String
    Get
      Return _State
    End Get
    Set(value As String)
      _State = value
    End Set
  End Property
 
  Public Sub New(ByVal id As Integer, ByVal name As String, ByVal state As String)
    Me.Id    = id
    Me.Name  = name
    Me.State = state
  End Sub
 
End Class
michelle
Top achievements
Rank 1
 answered on 22 May 2014
3 answers
154 views
Hi,

I created an orgchart based on the rendered fields demo @ http://demos.telerik.com/aspnet-ajax/orgchart/examples/renderedfields/defaultcs.aspx.

How can i change the style of the node based on a rendered filed value? For example an employee node  must have green background while a non employee must have a blue background
Boyan Dimitrov
Telerik team
 answered on 22 May 2014
4 answers
229 views
Hello,

I've been searching for a solution to my problem, but it appears that my issue is unique.

I have had a working web site using RadGrid grid controls for several years until yesterday.  Orginally, this was developed in a 2008 version of Telerik Radcontrols, but I have recently updated it to Version=2013.3.1015.35 to run on a soon-to-be sunset-ed web server.  This upgrade occurred in October or so and things have been fine until a few days ago.

I had to make a change some C# logic that had been discovered to be wrong.  Once the code was tested and approved, the changes were pushed to the production server.  A few days later, it was discovered that there was a problem adding records to the back-end database and having the grid redraw itself.  In fact, the error seems to be coming from the client since it is bypassing any server side error handling that I've built.

The funny twist on this is that there is nothing really happening to the grid.  The users are selecting data from ASP controls that will then be posted back to the database and the grid will be redrawn after the users is done selecting and typing what they need.  They don't get that far.  Before there can be any finalization, the ASP form throws and unhandled exception and references a GridTemplateColumn as the culprit.(See attached).  All server-side code executes without a hitch, but as soon as the grid is being drawn, this error comes up.

Here is the RadGrid ASP.NET code for the GridTemplateColumn:
<telerik:GridTemplateColumn
                                UniqueName="tempLDTEff1"
                                DataType="System.DateTime"
                                HeaderText="LDT1 Effective Date"
                                Reorderable="False"
                                Resizable="False"
                                ShowSortIcon="False"
                                HeaderStyle-Width="80px"
                                DataField="LDT1EffPct"
                                ReadOnly="True"
                                >
                               <HeaderTemplate>
                                
                                    <asp:Label
                                        ID="headLDTEff1" 
                                        Text ="LDT1 Effective Date"
                                        runat="server">
                                    </asp:Label><br />
                                      
                                <asp:TextBox
                                    ID="txtNewLDTDate1"
                                    runat="server"
                                    ToolTip="Type new date to add an LDT.  Can accept 'mm/dd/yyyy' and 'm/d/yyyy' formats"
                                    OnTextChanged="txtNewLDTDate1_OnTextChanged"
                                    AutoPostBack="true"
                                    Font-Bold="true"
                                    onKeyDown="if(event.keyCode==13) event.keyCode=9;"
                                    Width="75px"
                                   >
                                 </asp:TextBox>
                                 <asp:Button
                                    ID ="btnLDT1Delete"
                                    runat="server"
                                    Text ="Delete LDT1"
                                    Visible="false"
                                    OnClick="btnLDT1Delete_Click"
                                    BorderStyle="None"
                                    Font-Underline="true"
                                    ForeColor="Blue"
                                    BackColor="Transparent"/>
                                <asp:RegularExpressionValidator
                                    ID="regExtNewLDTDate1"
                                    runat="server"
                                    ErrorMessage="Invalid date format.  Can accept 'mm/dd/yyyy' and 'm/d/yyyy' formats"
                                    ControlToValidate="txtNewLDTDate1"
                                    Display="Static"
                                    ValidationExpression="^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$">
                                </asp:RegularExpressionValidator>
                                <asp:Label
                                    ID="lblLDT1"
                                    runat="server">New LDT Effort %
                                </asp:Label>
                                </HeaderTemplate>
                                <ItemTemplate>                   
                                 <telerik:RadNumericTextBox
                                    runat="server"
                                    ID="txtLDT1Dt"
                                    DbValue='<%# Eval("LDT1EffPct") %>'
                                    OnTextChanged="TextChanged"
                                    AutoPostBack="true"
                                    onKeyDown="if(event.keyCode==13) event.keyCode=9;"
                                    Width="50px">
                                 </telerik:RadNumericTextBox>
                                 </ItemTemplate>
                                <FooterTemplate>
                                    <asp:Label ID="footLDTEff1" Text ="LDT1 Sum" runat="server" Font-Bold="true"></asp:Label>
                                </FooterTemplate>
                                <HeaderStyle Width="80px"></HeaderStyle>
                        </telerik:GridTemplateColumn>
 I am not sure why this is happening and I am out of ideas.  Any help would be greatly appreciated.
Kostadin
Telerik team
 answered on 22 May 2014
1 answer
142 views
hey everyone i want to reduce space between columns. how to do this. i am using itemstyle-width but its increase the space..
how to solve this.. you can see in this picture.
Princy
Top achievements
Rank 2
 answered on 22 May 2014
3 answers
244 views
 HI,
I have created one form with dynamic telerik RadGRID with template columns as shown in the exmple URL: http://www.telerik.com/help/aspnet-ajax/grid-custom-edit-forms.html. Everything works fine except Extract values function does not return any values. Please follow below code example for better understanding.

public partial class TEST : System.Web.UI.Page
{
UserDetails _CurrentUser = null;
protected void Page_Init(object sender, EventArgs e)
{
_CurrentUser = (UserDetails)HttpContext.Current.Session["UserDetailSession"];

RadGrid RadGrid1 = new RadGrid();
RadGrid1.ID = "RadGrid1";
RadGrid1.AutoGenerateColumns = false;
RadGrid1.AllowPaging = true;
RadGrid1.AllowSorting = true;
RadGrid1.AllowFilteringByColumn = true;
RadGrid1.PageSize = 50;
RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace;


RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
RadGrid1.ItemCommand += new GridCommandEventHandler(RadGrid1_ItemCommand);

GridEditCommandColumn EditColumn = new GridEditCommandColumn();
RadGrid1.MasterTableView.Columns.Add(EditColumn);
EditColumn.UniqueName = "Edit";

List<clsColumnList> listColumnList = null;
DynamicPopulation _objDynamic = new DynamicPopulation();
  
 //please create few columns before usage of listColumnList
 foreach (clsColumnList _clsColumnList in listColumnList)
{
GridTemplateColumn _TemplateColumn = new GridTemplateColumn();
_TemplateColumn.ItemTemplate = new ItemTemplate(_clsColumnList.COLUMN_NAME);
_TemplateColumn.EditItemTemplate = new EditItemTemplate(_clsColumnList.COLUMN_NAME, _clsColumnList.DISPLAY_NAME, ViewState["ColumnList"] as List<clsColumnList>, Convert.ToInt32(Session["CurrentMeneID"]));
_TemplateColumn.DataField = _clsColumnList.COLUMN_NAME;
_TemplateColumn.HeaderText = _clsColumnList.DISPLAY_NAME;
_TemplateColumn.UniqueName = _clsColumnList.COLUMN_NAME;

RadGrid1.MasterTableView.Columns.Add(_TemplateColumn);
}

GridButtonColumn DeleteColumn = new GridButtonColumn();
RadGrid1.MasterTableView.Columns.Add(DeleteColumn);
DeleteColumn.ButtonType = GridButtonColumnType.LinkButton;
DeleteColumn.CommandName = "Delete";
DeleteColumn.Text = "Delete";
DeleteColumn.UniqueName = "Edit";
DeleteColumn.HeaderText = "Delete";
DeleteColumn.ConfirmText = "Are you sure, you want to delete?";
RadPane2.Controls.Add(RadGrid1);

}

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
(sender as RadGrid).DataSource = string.Empty;
DynamicPopulation _objDynamic = new DynamicPopulation();
(sender as RadGrid).DataSource = _objDynamic.GetApplicationRolePackage(Convert.ToInt32(Session["CurrentMeneID"]));
}

protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.EditCommandName)
{
(sender as RadGrid).MasterTableView.IsItemInserted = false;
}
if (e.CommandName == RadGrid.PerformInsertCommandName)
{
GridEditableItem row = e.Item as GridEditableItem;
Hashtable InsertValues = new Hashtable();
row.ExtractValues(InsertValues);
 
}
if (e.CommandName == RadGrid.UpdateCommandName)
{
GridEditableItem row = e.Item as GridEditableItem;
Hashtable InsertValues = new Hashtable();
row.ExtractValues(InsertValues);
}
if (e.CommandName == RadGrid.DeleteCommandName)
{
GridEditableItem row = e.Item as GridEditableItem;
Hashtable InsertValues = new Hashtable();
row.ExtractValues(InsertValues);
}
}
 }
}

public class EditItemTemplate : ITemplate, IBindableTemplate
{
protected LiteralControl _LiteralControl;
protected RequiredFieldValidator _RequiredFieldValidator;
protected HyperLink _HyperLink;
protected TextBox _Textbox;
protected CheckBox _Checkbox;
protected RadComboBox _RadComboBox;
private string colname;
private string DisplayName;
protected int MenuId;
List<clsColumnList> listClsColumnList;


public EditItemTemplate(string cName,string _DisplayName ,List<clsColumnList> _listClsColumnList, int _MenuId)
{
colname = cName;
DisplayName = _DisplayName;
listClsColumnList = _listClsColumnList;
MenuId = _MenuId;

}


public void InstantiateIn(Control container)
{
if (MenuId == 65)
{
if (colname == "BU_NM")
{
RadComboBox _RadComboBox = new RadComboBox();
_RadComboBox.ID = "EditlControlId_" + colname;
_RadComboBox.DataBinding += new EventHandler(RadCombbox_DataBinding);
container.Controls.Add(_RadComboBox);
}
else
{
RadTextBox _RadTextbox = new RadTextBox();
_RadTextbox.ID = "EditlControlId_" + colname;
_RadTextbox.DataBinding += new EventHandler(Textbox_DataBinding);
container.Controls.Add(_RadTextbox);
RequiredFieldValidator RFV = new RequiredFieldValidator();
RFV.ControlToValidate = _RadTextbox.ID;
RFV.ErrorMessage = "<br/>" + DisplayName + " is Mandatory";
container.Controls.Add(RFV);
//_LiteralControl = new LiteralControl();
//_LiteralControl.ID = "EditlControlId_" + colname;
//_LiteralControl.DataBinding += new EventHandler(lControl_DataBinding);
//container.Controls.Add(_LiteralControl);
}
}

}

public void lControl_DataBinding(object sender, EventArgs e)
{
LiteralControl l = (LiteralControl)sender;
GridDataItem container = (GridDataItem)l.NamingContainer;
l.Text = ((DataRowView)container.DataItem)[colname].ToString();
}

public void Textbox_DataBinding(object sender, EventArgs e)
{
RadTextBox l = (RadTextBox)sender;
GridDataItem container = (GridDataItem)l.NamingContainer;
l.Text = ((DataRowView)container.DataItem)[colname].ToString();
}

public void RadCombbox_DataBinding(object sender, EventArgs e)
{
if (MenuId == 65)
{
if (colname == "BU_NM")
{
RadComboBox cmbBusinessUnit = (RadComboBox)sender;
GridDataItem container = (GridDataItem)cmbBusinessUnit.NamingContainer;
string selectedvalue = ((DataRowView)container.DataItem)[colname].ToString();
cmbBusinessUnit.Items.Clear();
List<BusinessUnit> listBusinessUnits = BusinessUnitService.GetActiveBusinessUnitNames();
foreach (BusinessUnit obj in listBusinessUnits)
{
RadComboBoxItem item = new RadComboBoxItem(obj.business_unit_name, obj.business_unit_id.ToString());
cmbBusinessUnit.Items.Add(item);
if (obj.business_unit_name == selectedvalue)
item.Selected = true;
}
cmbBusinessUnit.Items.Insert(0, new RadComboBoxItem(string.Empty, string.Empty));
}
}

}

public System.Collections.Specialized.IOrderedDictionary ExtractValues(Control container)
{
IBindableControl control = container as IBindableControl;
GridEditFormItem item = container as GridEditFormItem;
System.Collections.Specialized.OrderedDictionary obj = new System.Collections.Specialized.OrderedDictionary();
if (MenuId == 65)
{
if (control != null)
{
control.ExtractValues(obj);
}

ControlCollection colletion = container.Controls;

//if (item != null)
//{ EditlControlId_DOMAIN_CD
if ((container.FindControl("EditlControlId_DOMAIN_CD") as TextBox) != null)
{
obj.Add("DOMAIN_CD", (item.FindControl("EditlControlId_DOMAIN_CD") as TextBox).Text);
}

if ((container.FindControl("EditlControlId_BU_NM") as TextBox) != null)
{
obj.Add("BU_NM", (item.FindControl("EditlControlId_DOMAIN_CD") as RadComboBox).SelectedValue);
}
//}

}
//KeyValuePair<int,string> _changes;

return obj;/// (IDictionaryEnumerator)_changes;
}


}

public class ItemTemplate : ITemplate
{
protected LiteralControl _LiteralControl;
protected RequiredFieldValidator _RequiredFieldValidator;
protected HyperLink _HyperLink;
protected TextBox _Textbox;
protected CheckBox _Checkbox;
protected RadComboBox _RadComboBox;
private string colname;

public ItemTemplate()
{

}

public ItemTemplate(string cName)
{
colname = cName;
}

public void InstantiateIn(Control container)
{
_LiteralControl = new LiteralControl();
_LiteralControl.ID = "lControlId_" + colname;
_LiteralControl.DataBinding += new EventHandler(lControl_DataBinding);
container.Controls.Add(_LiteralControl);

}

public void lControl_DataBinding(object sender, EventArgs e)
{
LiteralControl l = (LiteralControl)sender;
GridDataItem container = (GridDataItem)l.NamingContainer;
l.Text = ((DataRowView)container.DataItem)[colname].ToString();
}

}

public class DynamicPopulation
{
public List<clsColumnList> GetColumnList(int Menu_Id)
{
List<clsColumnList> listColumnList = null;
OracleConnection _connection = new OracleConnection(DataClasses.AppSettings.DBConnection);
try
{
string _sql = string.Format(@"SELECT COLUMN_NAME,
DISPLAY_NAME,
IS_REQUIRED,
COLUMN_TYPE
FROM MH_TABLE_COLUMNS_LIST
WHERE MENU_ID={0}
AND IS_ACTIVE=1
ORDER BY SEQUENCE_NO", Menu_Id);

using (OracleDataReader _reader = DataServices.Data.ExecuteReader(_sql, _connection))
{
if (_reader.HasRows)
{
listColumnList = new List<clsColumnList>();
while (_reader.Read())
{
clsColumnList obj = new clsColumnList();
obj.COLUMN_NAME = Convert.ToString(_reader["COLUMN_NAME"]);
obj.DISPLAY_NAME = Convert.ToString(_reader["DISPLAY_NAME"]);
obj.IS_REQUIRED = Convert.ToInt32(_reader["IS_REQUIRED"]);
obj.COLUMN_TYPE = Convert.ToString(_reader["COLUMN_TYPE"]);
listColumnList.Add(obj);
}
}
}
return listColumnList;
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (_connection != null)
{
_connection.Close();
_connection.Dispose();
}
}
}
///This class is used to create list of columns
[Serializable]
public class clsColumnList
{
public string COLUMN_NAME { get; set; }
public string DISPLAY_NAME { get; set; }
public int IS_REQUIRED { get; set; }
public String COLUMN_TYPE { get; set; }
}

Please dont tell me to follow already existing threads related to this topic becuase i already went through them and could not fand any luck.
Surendra
Top achievements
Rank 1
 answered on 22 May 2014
1 answer
298 views
<%@ Page AutoEventWireup="false" CodeFile="PamTest.aspx.vb" Inherits="PamTest"  %>
<%@ 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>
 <head>
    <title>ASP.NET RibbonBar Demo - Quick Access Toolbar</title>
</head>
<body>
 
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
  
     <div class="qsf-demo-canvas">
        <telerik:RadRibbonBar runat="server" ID="RadRibbonBar1" Skin="Windows7" Width="860px">          
            <Tabs>
                <telerik:RibbonBarTab Text="Taxonomies" ToolTip="Taxonomies">
                    <telerik:RibbonBarGroup Text="Taxonomies">
                        <Items>
                            <telerik:RibbonBarSplitButton Text="Test">
                                <Buttons>
                                    <telerik:RibbonBarButton  Text="Test1"/>
                                    <telerik:RibbonBarButton  Text="Test2"/>
                                </Buttons>
                            </telerik:RibbonBarSplitButton>
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                <telerik:RibbonBarTab Text="Collections" ToolTip="Collections">
                     <telerik:RibbonBarGroup Text="Collections">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                 <telerik:RibbonBarTab Text="Indexes" ToolTip="Indexes">
                     <telerik:RibbonBarGroup Text="Indexes">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                 <telerik:RibbonBarTab Text="Research Reviews" ToolTip="Research Reviews">
                     <telerik:RibbonBarGroup Text="Research Reviews">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                <telerik:RibbonBarTab Text="Audit" ToolTip="Audit">
                     <telerik:RibbonBarGroup Text="Audit">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
            </Tabs>
        </telerik:RadRibbonBar>
     </div>
  
    </form>
    <form id="form2" runat="server">   
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Silk" EnableRoundedCorners="False" DecoratedControls="All" />
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdateInitiatorPanelsOnly="true">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="SortLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="true"
        AllowSorting="True" GridLines="None" OnNeedDataSource="RadGrid1_NeedDataSource">
        <MasterTableView AllowMultiColumnSorting="true">
            <PagerStyle AlwaysVisible="true" />
            <Columns>
                  <telerik:GridNumericColumn DataField="MyColumn1" DataType="System.String" HeaderText="Column 1"
                    SortExpression="MyColumn1" UniqueName="MyColumn1">                   
                   </telerik:GridNumericColumn>
                    <telerik:GridNumericColumn DataField="MyColumn2" DataType="System.String" HeaderText="Column 2"
                    SortExpression="MyColumn2" UniqueName="MyColumn2">                   
                   </telerik:GridNumericColumn>
                    <telerik:GridNumericColumn DataField="MyColumn3" DataType="System.String" HeaderText="Column 3"
                    SortExpression="MyColumn3" UniqueName="MyColumn3">                   
                   </telerik:GridNumericColumn>
            </Columns>
        </MasterTableView>         
        <SortingSettings SortedBackColor="#FFF6D6" EnableSkinSortStyles="false"></SortingSettings>
        <HeaderStyle Width="100px"></HeaderStyle>
    </telerik:RadGrid>
     
    </form>   
 
</body>
</html>




This is my Code behind



Imports Microsoft.VisualBasic
Imports Telerik.Web.UI
 
 
Partial Class PamTest
    Inherits System.Web.UI.Page
    Protected WithEvents RadGrid1 As RadGrid
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
        Dim thedata As New List(Of MyData)
        thedata.Add(New MyData With {.MyColumn1 = "aa", .MyColumn2 = "dd", .MyColumn3 = "rr"})
        thedata.Add(New MyData With {.MyColumn1 = "bb", .MyColumn2 = "yy", .MyColumn3 = "ff"})
        thedata.Add(New MyData With {.MyColumn1 = "cc", .MyColumn2 = "xx", .MyColumn3 = "dd"})
        RadGrid1.DataSource = thedata
    End Sub
 
 
End Class
 
Class MyData
    Public Property MyColumn1 As Object
    Public Property MyColumn2 As Object
    Public Property MyColumn3 As Object
End Class




If I include Protected WithEvents RadGrid1 As RadGrid I get 'RadGrid1' is already declared as 'Protected WithEvents RadGrid1 As Telerik.Web.UI.RadGrid' in this class. If I remove that line "RadGrid1.DataSource = thedata" I get "unknown entity" for RadGrid1. What is wrong - thanks
Shinu
Top achievements
Rank 2
 answered on 22 May 2014
1 answer
74 views
I am trying to access the rad html chart series item values on client click. OnClientSeriesClicked event is working fine but firing the event twice.

Does anyone have the same issue? How to fix this?
Princy
Top achievements
Rank 2
 answered on 22 May 2014
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?