Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
188 views
Hi,

I'm trying to build a RadGrid and I wanted to use Template columns programmatically, so I followed the tutorial here and everything worked brilliantly. I even got as far as beginning to create a template for the editing and adding of new records. The problem however has occurred that I've added a series of detail tables to my grid and now when I click to expand in to one of the detail tables the Bound columns that I've added to the Master Table still maintain their values but the Template columns completely lose their values.

I don't know if I'm missing something or I'm doing something in an incorrect way but the template columns display so perfectly and the fact that they disappear whenever you expand the grid is really disheartening.

Here's the code:
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
    RenderOrderGrid()
End Sub
Private Sub RenderOrderGrid()
    Dim myDataSet As DataSet
    Dim rgdOrders As RadGrid
    myDataSet = DataManager.OrderList
    '===Set values for RadGrid===
    rgdOrders = New RadGrid
    rgdOrders.AllowPaging = True
    rgdOrders.AutoGenerateColumns = False
    rgdOrders.GroupingEnabled = False
    rgdOrders.ShowGroupPanel = True
    rgdOrders.AllowSorting = False
    rgdOrders.PagerStyle.AlwaysVisible = True
    rgdOrders.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
    rgdOrders.ClientSettings.AllowDragToGroup = False
    rgdOrders.MasterTableView.PageSize = 20
    rgdOrders.MasterTableView.Name = "OrdersMasterTable"
    rgdOrders.AutoGenerateEditColumn = True
    rgdOrders.AutoGenerateDeleteColumn = False
    rgdOrders.Skin = Session("TelerikSkin")
    rgdOrders.DataSource = myDataSet.Tables("OrderList")
    '===Set values for Master Table===
    rgdOrders.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top
    rgdOrders.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = False
    rgdOrders.MasterTableView.CommandItemSettings.ShowRefreshButton = True
    rgdOrders.MasterTableView.CommandItemSettings.RefreshImageUrl = "../img/Refresh.gif"
    rgdOrders.MasterTableView.CommandItemSettings.RefreshText = "Refresh Grid"
    '===Create Columns===
    RenderColumns(rgdOrders)
    '===Create a table view to use as detail table===
    Dim myDetailTable As Telerik.Web.UI.GridTableView
    myDetailTable = New GridTableView
    myDetailTable.Width = Unit.Percentage(100)
    myDetailTable.Name = "AdminOrdersOrderlinesDetailTable"
    rgdOrders.MasterTableView.DetailTables.Add(myDetailTable)
    myDetailTable = New GridTableView
    myDetailTable.Width = Unit.Percentage(100)
    myDetailTable.Name = "AdminOrdersNotesDetailTable"
    rgdOrders.MasterTableView.DetailTables.Add(myDetailTable)
    AddHandler rgdOrders.ColumnCreated, AddressOf rgdOrders_ColumnCreated
    AddHandler rgdOrders.DetailTableDataBind, AddressOf rgdOrders_DetailTableDataBind
    rgdOrders.MasterTableView.TableLayout = GridTableLayout.Fixed
    divOrders.Controls.Add(rgdOrders)
End Sub
Private Sub RenderColumns(ByRef rgdOrders As RadGrid)
    '===Create Columns===
    Dim orderIDColumn, statusColumn As GridBoundColumn
    Dim customerTemplateColumn, dateTemplateColumn, repCodeScanNoTemplateColumn, contactLettersTemplateColumn As GridTemplateColumn
    'Order ID Column
    orderIDColumn = New GridBoundColumn()
    orderIDColumn.HeaderText = "Order ID"
    orderIDColumn.UniqueName = "mkOrderId"
    orderIDColumn.DataField = "mkOrderId"
    orderIDColumn.HeaderStyle.CssClass = "gridFont"
    orderIDColumn.HeaderStyle.Width = 60
    orderIDColumn.ItemStyle.CssClass = "gridFont"
    'Customer Details Column
    customerTemplateColumn = New GridTemplateColumn()
    customerTemplateColumn.ItemTemplate = New CustomerTemplate("CustomerName")
    customerTemplateColumn.HeaderText = "Customer Details"
    customerTemplateColumn.UniqueName = "CustomerDetails"
    customerTemplateColumn.HeaderStyle.CssClass = "gridFont"
    customerTemplateColumn.ItemStyle.CssClass = "gridFont"
    'Dates Column
    dateTemplateColumn = New GridTemplateColumn()
    dateTemplateColumn.ItemTemplate = New DateTemplate("Dates")
    dateTemplateColumn.HeaderText = "Dates"
    dateTemplateColumn.UniqueName = "Dates"
    dateTemplateColumn.HeaderStyle.CssClass = "gridFont"
    dateTemplateColumn.HeaderStyle.Width = 150
    dateTemplateColumn.ItemStyle.CssClass = "gridFont"
    'Status Column
    statusColumn = New GridBoundColumn()
    statusColumn.DataField = "Status"
    statusColumn.HeaderText = "Status"
    statusColumn.UniqueName = "Status"
    statusColumn.HeaderStyle.CssClass = "gridFont"
    statusColumn.HeaderStyle.Width = 120
    statusColumn.ItemStyle.CssClass = "gridFont"
    'RepCode/ScanNo Column
    repCodeScanNoTemplateColumn = New GridTemplateColumn()
    repCodeScanNoTemplateColumn.ItemTemplate = New RepCodeScanNoTemplate("RepCodeScanNo")
    repCodeScanNoTemplateColumn.HeaderText = "Rep Code / Scan No"
    repCodeScanNoTemplateColumn.UniqueName = "RepCode"
    repCodeScanNoTemplateColumn.HeaderStyle.CssClass = "gridFont"
    repCodeScanNoTemplateColumn.HeaderStyle.Width = 150
    repCodeScanNoTemplateColumn.ItemStyle.CssClass = "gridFont"
    'Print Letters
    contactLettersTemplateColumn = New GridTemplateColumn()
    contactLettersTemplateColumn.ItemTemplate = New ContactLettersTemplate("PrintLetters")
    contactLettersTemplateColumn.HeaderText = "Print Letters"
    contactLettersTemplateColumn.UniqueName = "PrintLetters"
    contactLettersTemplateColumn.HeaderStyle.CssClass = "gridFont"
    contactLettersTemplateColumn.HeaderStyle.Width = 80
    contactLettersTemplateColumn.ItemStyle.CssClass = "gridFont"
    'Add Columns To Grid
    rgdOrders.MasterTableView.Columns.Add(orderIDColumn)
    rgdOrders.MasterTableView.Columns.Add(customerTemplateColumn)
    rgdOrders.MasterTableView.Columns.Add(dateTemplateColumn)
    rgdOrders.MasterTableView.Columns.Add(statusColumn)
    rgdOrders.MasterTableView.Columns.Add(repCodeScanNoTemplateColumn)
    rgdOrders.MasterTableView.Columns.Add(contactLettersTemplateColumn)
End Sub
Private Sub rgdOrders_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs)
    Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
    Select Case e.DetailTableView.DetailTableIndex
        Case 0
            Dim myOrderId As Decimal = CDec(dataItem.Item("mkOrderId").Text)
            Dim myDataSet As New DataSet
            '===Get the DetailTable data===
            myDataSet = DataManager.OrderLinesGet(myOrderId)
            e.DetailTableView.DataSource = myDataSet.Tables("OrderLines")
            e.DetailTableView.AutoGenerateColumns = False
            e.DetailTableView.CommandItemDisplay = GridCommandItemDisplay.Top
            e.DetailTableView.CommandItemSettings.ShowAddNewRecordButton = False
            e.DetailTableView.CommandItemSettings.ShowRefreshButton = False
            e.DetailTableView.Name = "AdminOrdersOrderlinesDetailTable"
            e.DetailTableView.AllowPaging = True
            Dim boundColumn As GridBoundColumn
            'Product Name Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Product Name"
            boundColumn.UniqueName = "ProductName"
            boundColumn.DataField = "ProductName"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'Quantity Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Quantity"
            boundColumn.UniqueName = "Quantity"
            boundColumn.DataField = "Quantity"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 120
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'Unit Price Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Unit Price"
            boundColumn.UniqueName = "UnitPrice"
            boundColumn.DataField = "UnitPrice"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 120
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'Line Total Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Line Total"
            boundColumn.UniqueName = "LineTotal"
            boundColumn.DataField = "LineTotal"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 120
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
        Case 1
            Dim myOrderId As Decimal = CDec(dataItem.Item("mkOrderId").Text)
            Dim myDataSet As New DataSet
            '===Get the DetailTable data===
            myDataSet = DataManager.OrderNotesGet(myOrderId)
            e.DetailTableView.DataSource = myDataSet.Tables("OrderNotesGet")
            e.DetailTableView.AutoGenerateColumns = False
            e.DetailTableView.CommandItemDisplay = GridCommandItemDisplay.Top
            e.DetailTableView.CommandItemSettings.AddNewRecordImageUrl = "../img/AddRecord.gif"
            e.DetailTableView.CommandItemSettings.AddNewRecordText = "Add New Record"
            e.DetailTableView.CommandItemSettings.ShowRefreshButton = False
            e.DetailTableView.Name = "AdminOrdersNotesDetailTable"
            e.DetailTableView.AllowPaging = True
            Dim boundColumn As GridBoundColumn
            'Date / Time Added Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Date / Time Added"
            boundColumn.UniqueName = "DateTimeAdded"
            boundColumn.DataField = "DateTimeAdded"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 120
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'Note Type Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Note Type"
            boundColumn.UniqueName = "Type"
            boundColumn.DataField = "Type"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 80
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'Note Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "Note"
            boundColumn.UniqueName = "Note"
            boundColumn.DataField = "Note"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
            'User Column
            boundColumn = New GridBoundColumn()
            boundColumn.HeaderText = "User"
            boundColumn.UniqueName = "UserName"
            boundColumn.DataField = "UserName"
            boundColumn.HeaderStyle.CssClass = "gridFont"
            boundColumn.HeaderStyle.Width = 80
            boundColumn.ItemStyle.CssClass = "gridFont"
            e.DetailTableView.Columns.Add(boundColumn)
    End Select
End Sub

Any help on this problem would be greatly appreciated.
Rahul
Top achievements
Rank 1
 answered on 21 May 2020
2 answers
341 views

Hello.

I have to support old legacy project based on Telerik.Web.UI, 2011.3.1115.40.

 

Please help: where i can find documentation for controls ?

Andrew
Top achievements
Rank 1
 answered on 21 May 2020
1 answer
436 views

Hi!

I am using a radgrid in batch EditMode with EditType Cell.

Inside the grid i have several GridTemplateColumns with a raddropdown control each, which should change style according to the value selected on each.

I am trying to find a way on BatchEditClosed or BatchEditCellValueChanged events to re-attach the css class that i use in ItemTemplate for dislpaying the selected value.

Here is my grid:

<telerik:RadGrid
                            RenderMode="Lightweight"
                            runat="server"
                            ID="RadGridLesions"
                            AllowPaging="True"
                            AllowSorting="True"
                            AutoGenerateColumns="False"
                            Skin="BlackMetroTouch"
                            CssClass="dark-grey"
                            OnNeedDataSource="RadGridLesions_NeedDataSource"
                            OnPreRender="RadGridLesions_PreRender"
                            OnItemDataBound="RadGridLesions_ItemDataBound"
                            ShowStatusBar="True"
                             
                            AllowAutomaticInserts="False"
                            AllowAutomaticDeletes="True"
                            AllowAutomaticUpdates="True"
                             
                            ItemCommand="RadGridLesions_ItemCommand"
                            UpdateCommand="RadGridLesions_UpdateCommand"
                            DeleteCommand="RadGridLesions_DeleteCommand"
                            OnBatchEditCommand="RadGridLesions_BatchEditCommand"
                            >
                            <MasterTableView
                                CommandItemDisplay="Top"
                                EditMode="Batch"
                                DataKeyNames="Id, Segment, Level, Side"
                                Name="GradesTable"
                                >
                                <PagerStyle />
 
                                <BatchEditingSettings
                                    SaveAllHierarchyLevels="false"
                                    HighlightDeletedRows="false"
                                    EditType="Cell"
                                    OpenEditingEvent="Click" />
                                <Columns>
 
                                       <telerik:GridTemplateColumn
                                        HeaderText="T2"
                                        HeaderStyle-Width="70px"
                                        ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                        UniqueName="T2Grade"
                                        DataField="T2Grade">
                                        <ItemTemplate>
                                            <div id="T2Grade-container" class='<%# "grade a" & Eval("T2Grade") %>'>
                                                <%# Eval("T2Grade") %>
                                            </div>
                                        </ItemTemplate>
                                        <EditItemTemplate>
                                            <telerik:RadDropDownList
                                                RenderMode="Lightweight"
                                                runat="server"
                                                ID="T2GradeDropDownList"
                                                AutoPostBack="false"
                                                Skin="BlackMetroTouch"
                                                SelectedValue='<%# Eval("T2Grade") %>'>
                                                <Items>
                                                    <telerik:DropDownListItem Text="1" Value="1" CssClass="one" />
                                                    <telerik:DropDownListItem Text="2" Value="2" CssClass="two" />
                                                    <telerik:DropDownListItem Text="3" Value="3" CssClass="three" />
                                                    <telerik:DropDownListItem Text="4" Value="4" CssClass="four" />
                                                    <telerik:DropDownListItem Text="5" Value="5" CssClass="five" />
                                                </Items>
                                            </telerik:RadDropDownList>
                                        </EditItemTemplate>
                                    </telerik:GridTemplateColumn>

 

The issue i have now is that if i select a different value in the drop-down the styling of the "old" one remains and changes only when i press the save button.

I would like to re-evaluate the expression attaching the css class to the div (class='<%# "grade a" & Eval("T2Grade") %>') on client side, when the value is changed in the drop down.

I assume i can do that like:

function BatchEditCellValueChanged(sender, args) {
 
                    //alert(BatchEditCellValueChanged);
                    var grid = sender;
                    var masterTableView = sender.get_masterTableView();
                    var batchEditingManager = sender.get_batchEditingManager();
 
                    var row = args.get_row();
                    var cell = args.get_cell();
                    var tableView = args.get_tableView();
                    var column = args.get_column();
                    var columnUniqueName = args.get_columnUniqueName();
                    //new value
                    var editorValue = args.get_editorValue();
                    //old value
                    var cellValue = args.get_cellValue();
                     
 
                    if (args.get_columnUniqueName() === "T2Grade") {
 
                        //try and change css class of edited cell -
    //something like: cell.findElement("T2Grade-container").className = "<%re-evaluate expression%>";
                         
                    }     
                     
                }

 

Any ideas on how i can achieve that? Up to the moment i have not found a way to grad the div element inside the itemTemplate and change its css class.

 

 

 

Doncho
Telerik team
 answered on 21 May 2020
2 answers
110 views
I spent some time looking around for info on this and didn't find a good answer as to how to do this without having to use the detailstable databinding and databound events. In all the examples I found they all used the radgrid.MasterTableView.Items collection specifically. My solution turned out to be simpler by using e.Column.Owner.Items from the GridCustomAggregateEventArgs. By checking the e.Owner.Name that is set in the designer properties I can then tell which table that I'm trying to preform the custom Aggregate for and return different results.

In an effort to save others some time here, I'm posting some example code for this.

Protected Sub rg_CustomAggregate(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCustomAggregateEventArgs) Handles rg.CustomAggregate
 
    Dim i, j, k, l, m, n As Integer
    For Each di As GridDataItem In e.Column.Owner.Items
        If e.Column.Owner.Name = "MainTableName" Then
            'preform you custom aggregation calculations
            i += CType(di.GetDataKeyValue("maintablecolumn1"), Integer)
            j += CType(di.GetDataKeyValue("maintablecolumn2"), Integer)
            k += CType(di.GetDataKeyValue("maintablecolumn3"), Integer)
            e.Result = Decimal.Round(Convert.ToDecimal((i + j) / k * 100), 2)
        End If
        If e.Column.Owner.Name = "DetailTableName" Then
            l += CType(di.GetDataKeyValue("detailtablecolumn1"), Integer)
            m += CType(di.GetDataKeyValue("detailtablecolumn2"), Integer)
            n += CType(di.GetDataKeyValue("detailtablecolumn3"), Integer)
            e.Result = Decimal.Round(Convert.ToDecimal((i + j) / k * 100), 2)
        End If
    Next
End Sub
Key
Top achievements
Rank 1
 answered on 21 May 2020
6 answers
108 views

Im creating an user control. In my control I need to create programmatically some Combo Boxes. In some cases, I need a Calendar as a Template in my comboBox but im facing two situations.

1. I cannot deselect dates in my calendar. Once I make a selection, calendar has always at least one selected date and if I click the selected day, this day remains selected.

As you can see in the 1.gif file attached, I can select dates normally but I try to deselect by clicking on 15th several times and I'm not able to. I can change the date selection (I moved to 12th) but is not possible to unselect.

2. When I clic Calendar header to choose years and mothes, the popup appears behind the combobox. See 2.gif

 

Javascript fucntions

function OnClientDropDownClosing(sender, args) {
        if (args.get_domEvent().target == sender.get_imageDomElement()) {
            args.set_cancel(false);
        }
        else {
            args.set_cancel(true);
        }
    }
 
    function OnClientDropDownClosed(sender, args) {
        var SenderId = sender.get_id().replace("FiltrosNativos_","");
        var CalId = SenderId.replace("RadComboBox", "RadCalendar");
        var Cal = sender.get_items().getItem(0).findControl(CalId);
 
        var dates = Cal.get_selectedDates();
         
        if (dates.length == 0) { sender.set_emptyMessage("Elija Fechas"); }
        else {
            var dt1 = dates[0];
            var dt2 = dates[dates.length - 1];
            var rango = dt1[2] + '/' + dt1[1] + '/' + dt1[0] + ' -- ' + dt2[2] + '/' + dt2[1] + '/' + dt2[0];
            sender.set_emptyMessage(rango);
             
        }
         
    }

 

 

 

 

VB

Private Sub CrearObjetos()
 
        Dim uPass As New UtilSecurity
        Dim sCnnStr As String = uPass.Desencrit(ConfigurationManager.AppSettings("CnnStringSE").Trim)
        Dim uDBA As New UtilBDAccess(sCnnStr)
        Tabla = New Table
 
        Tabla.ID = "TbFiltros"
 
 
 
        For Each row As DataRow In _dtFiltros.Rows
            Dim CBO As New RadComboBox
 
            Dim sLabel As String = row("Label").ToString.Trim
            Dim Label As New Label
            Dim Tr As New TableRow
            Dim TcLabel As New TableCell
            Dim TcObj As New TableCell
 
            Label.Text = sLabel & ":" & RepetirCadena(" ", 15 - sLabel.Length - 1)
            'Label.Text = sLabel & ":" & RepetirCadena(" ", 15 - sLabel.Length - 1)
 
            TcLabel.Controls.Add(Label)
 
            CBO.ID = "RadComboBox" & row("TargetCatField")
            CBO.Width = Unit.Pixel(IIf(_Width = 0, 500, _Width))
            CBO.RenderMode = RenderMode.Lightweight
            CBO.Skin = _Skin
            CBO.Label = ""
 
 
 
            If row("TargetType") = "DATE" Then
                CBO.EmptyMessage = "Elija Fechas"
                CBO.OnClientDropDownClosing = "OnClientDropDownClosing"
                CBO.OnClientDropDownClosed = "OnClientDropDownClosed"
                CBO.ItemTemplate = New CboTmplCalendar("RadCalendar" & row("TargetCatField"), _Skin)
                CBO.Items.Add(New RadComboBoxItem(""))
 
                CBO.DataBind()
            Else
                CBO.MarkFirstMatch = True
                CBO.EnableLoadOnDemand = True
                CBO.Filter = RadComboBoxFilter.Contains
                CBO.EmptyMessage = "Elija " & row("Label")
                uDBA.BindOnjectDB(CBO, row("Query"), row("DataTextField"), row("DataValueField"))
            End If
 
 
            TcObj.Controls.Add(CBO)
            Tr.Cells.Add(TcLabel)
            Tr.Cells.Add(TcObj)
 
            Tabla.Rows.Add(Tr)
 
 
        Next
        PHCbosFiltros.Controls.Add(Tabla)
    End Sub
 
Private Class CboTmplCalendar
        Implements ITemplate
        Protected MyCalendar As RadCalendar
 
        Private _ObjName As String
        Private _Skin As String
        Public Sub New(ByVal objName As String, Skin As String)
            _ObjName = objName
            _Skin = Skin
        End Sub
        Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
 
            MyCalendar = New RadCalendar()
            With MyCalendar
 
                .EnableViewState = True
                .ID = _ObjName
                .Skin = _Skin
                .RenderMode = RenderMode.Lightweight
                .AutoPostBack = False
                .RangeSelectionMode = Calendar.RangeSelectionMode.ConsecutiveClicks
 
 
            End With
            container.Controls.Add(MyCalendar)
        End Sub
 
    End Class
Gilberto
Top achievements
Rank 1
Veteran
 answered on 21 May 2020
1 answer
544 views

Hello,

I have read the other threads, and I am not having much success. I can export a URL as text, but I haven't been able to get it to show up as a clickable link in an xlsx file. Can someone please help me? Below are the examples preceded by a note about its behavior:

 

[ This one doesn't show anything in the text cell. I read on an old post that this is to be expected. ]
<telerik:GridHyperLinkColumn AllowFiltering="False" AllowSorting="False" Visible="true"
 HeaderText="View0.0"
 Text="View Page"
 Target="_blank"
 DataNavigateUrlFormatString="page.aspx?autoid={0}"
 DataNavigateUrlFields="SpecimenAutoID">
    <HeaderStyle Width="50px" HorizontalAlign="Center"></HeaderStyle>
</telerik:GridHyperLinkColumn>

[This displays the cell as source html.]
<telerik:GridTemplateColumn HeaderText="View1.0" >
    <ItemTemplate>
        <a href="https://www.google.com">Click here to open the folder</a>
    </ItemTemplate>
    <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>
</telerik:GridTemplateColumn>

[This displays the cell as source html.]
<telerik:GridTemplateColumn HeaderText="View1.1" >
    <ItemTemplate>
        <a href="https://www.google.com">https://www.google.com</a>
    </ItemTemplate>
    <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>
</telerik:GridTemplateColumn>

 

[This displays the link as a text string.]
<telerik:GridTemplateColumn HeaderText="View1.2" >
    <ItemTemplate>
        https://www.google.com
    </ItemTemplate>
    <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>
</telerik:GridTemplateColumn>

[This displays the data field as text string]
<telerik:GridBoundColumn Visible="false" SortExpression="directURL" HeaderText="View Specimen" HeaderButtonType="TextButton"
                         DataField="directURL" Exportable="True" UniqueName="hiddenDirectURL" >
    <HeaderStyle Width="200px" HorizontalAlign="Center"></HeaderStyle>
</telerik:GridBoundColumn>

Any suggestions would be appreciated. Thanks.

Dan

 

Doncho
Telerik team
 answered on 21 May 2020
3 answers
418 views
i am trying to use two rad grid on the same page. the grid is working fine but i am unable to see the second grid. i am getting the value from the first grid and then on button click i am filling the other grid. any idea why i am not getting the second grid on the run time. as i can still both of the grids in design mode.

if you need i can post the coding also.

thanks & Regards
Doncho
Telerik team
 answered on 20 May 2020
1 answer
173 views

Hi

I am using the asp.net charting control.  I am plotting data over time, sometimes over days, weeks, months and years.  I would like th X axis (which shows time) on the graph to be sequential even if the data is not.  eg, if a week/month/year is missing it will plot a the item on the X axis but not have a value (hope that makes sense).  So effectively the chart looks like a timeline of data, the gaps shows missing data

 

Is this possible with the chart control?

Many thanks in advance

 

 

 

 


Vessy
Telerik team
 answered on 20 May 2020
2 answers
510 views
I have a grid form in ASP.Net VB.Net with the following Special Char "≤". It is appearing fine in the Web form and Excel export but the PDF it replaces with a # char. How can I get this character, â‰¤ to display.
Chuck
Top achievements
Rank 1
Veteran
 answered on 20 May 2020
11 answers
343 views
Hi,

From client side code, Is it possible to retrieve data from the current datasource of the HtmlChart to an array of JSON objects and store it in a variable?

Thanks,
Teena.
Vessy
Telerik team
 answered on 20 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?