Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
42 views
I was wondering if the navigation on the TabStrip demo pages was a TabStip?

I really like that navigation and would like to do the same for a new project that I'm starting.

Is there a demo for that navigation?

Thanks
Dimitar Terziev
Telerik team
 answered on 14 Oct 2014
1 answer
112 views
Hi,

This isn't really a Telerik question...but I'm hoping that that maybe someone reading this forum has already been down this road and can help.  I'm trying to convert our mapping from Infragistics to Telerik.  We have several ESRI shape files that I'm trying to convert to json for use with the telerik mapping control.  I've found the jdal tool ogr2ogr.exe that performs the conversion.  The following command converts the schools.shp shape file to a schools.json file.

ogr2ogr -f "GeoJSON" Schools.json Schools.shp

The problem is that the shape files use a coordinate system other that latitude/longitude...so the conversion outputs a json file with ridiculous numbers for the latitude and longitude.  Apparently, there are supposed to be prj files that accompany the shape files that define the coordinate system used, but those are missing.  The ogr2ogr utility accepts command line parameters to perform coordinate system conversions.  And I have the markup (see below) that allowed the infragistics control to properly interpret the shape file coordinates...so I'm fairly sure it contains the critical information to allow the ogr2ogr utility to perform the conversion.  But so far my efforts to translate the infragistics markup into the appropriate ogr2ogr command line parameters have failed.  I'm hoping that someone with more experience in GIS will be able to help?

<igMap:ShapeFileReader.CoordinateSystem>
  <igMap:CoordinateSystem UnitType="FT" FalseEasting="1312335.958" FalseNorthing="0.0">
    <igMap:CoordinateSystem.Projection>
      <igMap:LambertConformalConic EllipsoidType="GRS1980" CentralMeridian="-120.5"
            StandardParallelNorth="43.0" StandardParallelSouth="45.5" LatitudeOrigin="41.75"/>
    </igMap:CoordinateSystem.Projection>
  </igMap:CoordinateSystem>
</igMap:ShapeFileReader.CoordinateSystem>
Ianko
Telerik team
 answered on 14 Oct 2014
1 answer
97 views
Hi Everyone,

I need to disaply xml data in db in to grid template column linkbutton so when clicked linkbutton it should open a html page with xml data
Please help me with this as soon as possible
Eyup
Telerik team
 answered on 14 Oct 2014
0 answers
242 views
Grid Batch 로 일괄 데이터 저장을 사용하는 중 문제가 발생되었습니다.

GridNumericColumn Column에서 Value값을 변경하여도
원래 Value 값으로 되돌아갑니다. (예를 들어 10 -> 101 로 변경시 10로 되돌아감, 변경 Status도 바뀌지 않음.)

그리고 GridBoundColumn의 경우 각 Cell을 Tab으로 이동시 focus를 잃어버립니다.
Click하여 사용하는 것이 아닌 Tab key 및 화살표 key 이동으로 사용하는데 문제가 있습니다.

다른 방법으로 저 문제를 고칠 수 있는지 궁금합니다.
KIM
Top achievements
Rank 1
 asked on 14 Oct 2014
5 answers
1.7K+ views
I am trying to set the size of the columns on my radgrid to no avail. From reading the documentation and online the following should suffice but it makes no difference whatsoever:

 

 

GridColumn gridCol = radgrdResultDetail.MasterTableView.GetColumn("Description");
 gridCol.HeaderStyle.Width = System.Web.UI.WebControls.Unit.Pixel(500);

 

 

I have put this in the pre_render method like advised but the columns do not change size. Any help would be greatly appreciated.

Micahel

 

Pavlina
Telerik team
 answered on 13 Oct 2014
2 answers
981 views
I want to be able to Export to Excel from a RadGrid. The RadGrids on various pages could have 1 detail table or multiple nested detail tables (detail tables inside detail tables.)

I want the user to be able to expand one or more records to view the detail tables and if they export to excel, export it exactly as they see it with paging ignored. There may be multiple expanded detail tables on the same level, or nested tables may be expanded.

Here's the HTML and VB.NET code behind of a fully independent sample page of how our grids are implemented. This has a fake datasource hard coded, we're using LINQ queries to a SQL database in the real website.

This was made in Visual Studio 2012.

Thanks for any help you can offer. We haven't found any help online that has worked.






<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="DetailTableExportSample.WebForm1" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <b>Thanks for helping!</b><br />
        What we want is for one or more of the records in the master (top level) RadGrid to be expanded to display the detail table and then that view, exactly as you see it, to be exportable to Excel.
        <br /><br />
        Below is a simplified example to illustrate our setup. The solution will also need to work if there are multiple detail tables nested (meaning the detail table has it's own detail table).
        <br /><br />
        Please post a response in the forum thread.
 
    </div>
        <br /><br />
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
 
        <telerik:RadGrid AllowSorting="true" ID="rgPeople" runat="server" AutoGenerateColumns="False" Width="500px" CellSpacing="0" GridLines="None">
            <GroupingSettings CaseSensitive="false" />
            <ExportSettings FileName="PM Export" IgnorePaging="true" HideStructureColumns="true" OpenInNewWindow="true" Excel-Format="Html" ExportOnlyData="true" />
            <MasterTableView PageSize="25" DataKeyNames="LName" CommandItemDisplay="Top" AllowPaging="true" AllowSorting="true">
                  <DetailTables>
                       <telerik:GridTableView DataKeyNames="courseID" Name="rgDetail" Width="100%" AllowFilteringByColumn="false">
                           <Columns>
                               <telerik:GridBoundColumn DataField="courseID" HeaderText="Course ID" />
                               <telerik:GridBoundColumn DataField="name" HeaderText="Course" />
                               <telerik:GridBoundColumn DataField="classroom" HeaderText="Room" />
                           </Columns>
                       </telerik:GridTableView>
                  </DetailTables>
                <EditFormSettings EditColumn-InsertText="Add" EditColumn-ButtonType="ImageButton" />
                <CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" />
                <Columns>
                    <telerik:GridBoundColumn DataField="FName" HeaderText="First" />
                    <telerik:GridBoundColumn DataField="LName" HeaderText="Last" />
                    <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" />
                </Columns>
                <PagerStyle AlwaysVisible="true" PageSizeControlType="RadComboBox" PageSizes="25,50,100,200,500" />
            </MasterTableView>
        </telerik:RadGrid>
    </form>
</body>
</html>

Imports Telerik.Web.UI
 
Public Class WebForm1
    Inherits System.Web.UI.Page
    Property people As List(Of person)
        Get
            Return ViewState("_people")
        End Get
        Set(value As List(Of person))
            ViewState("_people") = value
        End Set
    End Property
    Property classes As List(Of course)
        Get
            Return ViewState("_classes")
        End Get
        Set(value As List(Of course))
            ViewState("_classes") = value
        End Set
    End Property
 
    Property attendees As List(Of enrollment)
        Get
            Return ViewState("_attendees")
        End Get
        Set(value As List(Of enrollment))
            ViewState("_attendees") = value
        End Set
    End Property
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            MakePeopleList()
            MakeClassesList()
            MakeAttendeesList()
 
            rgPeople.Rebind()
        End If
    End Sub
 
    Private Sub rgPeople_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles rgPeople.DetailTableDataBind
        Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
        Select Case e.DetailTableView.Name
            Case "rgDetail"
                Dim student As String = dataItem.GetDataKeyValue("LName").ToString
                e.DetailTableView.DataSource = From a In attendees
                                               Join c In classes On c.courseID Equals a.courseID
                                               Where a.student_LName = student
                                               Select c
 
        End Select
    End Sub
 
    Private Sub rgPeople_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgPeople.NeedDataSource
        'our actual datasource is a LINQ-SQL query
        If people.Count = 0 Then
            rgPeople.DataSource = Nothing
        Else
            rgPeople.DataSource = From p In people
        End If
    End Sub
 
 
 
#Region "Make_Fake_DataSources"
    Sub MakePeopleList()
        Dim p As New List(Of person)
 
        'people = New List(Of person)
        p.Add(New person("Gary", "Ritter", "Male"))
        p.Add(New person("Bill", "Becker", "Male"))
        p.Add(New person("Michael", "McClary", "Male"))
        p.Add(New person("Angela", "Paulone", "Female"))
        p.Add(New person("Alison", "Weichert", "Female"))
 
        people = p
 
    End Sub
 
    Sub MakeClassesList()
        Dim c As New List(Of course)
        c.Add(New course("HIS101", "American History", "H13"))
        c.Add(New course("ENG101", "English - Freshman", "E10"))
        c.Add(New course("PHY101", "Physical Education", "GYM"))
        c.Add(New course("MTH201", "Algebra 2", "M04"))
        c.Add(New course("SCI106", "Computer Basics", "L03"))
        c.Add(New course("SCI110", "AFJROTC", "S10"))
        classes = c
 
    End Sub
 
    Sub MakeAttendeesList()
        Dim a As New List(Of enrollment)
        a.Add(New enrollment("Ritter", "MTH201"))
        a.Add(New enrollment("Ritter", "SCI110"))
        a.Add(New enrollment("Ritter", "PHY101"))
 
        a.Add(New enrollment("Becker", "SCI106"))
        a.Add(New enrollment("Becker", "HIS101"))
 
        a.Add(New enrollment("McClary", "HIS101"))
        a.Add(New enrollment("McClary", "SCI106"))
        a.Add(New enrollment("McClary", "ENG101"))
 
        a.Add(New enrollment("Paulone", "HIS101"))
        a.Add(New enrollment("Paulone", "PHY101"))
        a.Add(New enrollment("Paulone", "SCI110"))
 
        a.Add(New enrollment("Weichert", "PHY101"))
        a.Add(New enrollment("Weichert", "ENG101"))
        a.Add(New enrollment("Weichert", "MTH201"))
 
        attendees = a
    End Sub
#End Region
End Class
 
 
#Region "Datasource_Classes"
<Serializable>
Public Class person
    Public Property FName As String
    Public Property LName As String
    Public Property Gender As String
 
    Public Sub New(First_Name As String, Last_Name As String, my_Gender As String)
        Me.FName = First_Name
        Me.LName = Last_Name
        Me.Gender = my_Gender
    End Sub
 
    Public Sub New()
    End Sub
End Class
 
<Serializable>
Public Class course
    Public Property courseID As String
    Public Property name As String
    Public Property classroom As String
 
    Public Sub New(id As String, course_name As String, classroom_number As String)
        Me.courseID = id
        Me.name = course_name
        Me.classroom = classroom_number
    End Sub
 
    Public Sub New()
    End Sub
End Class
 
<Serializable>
Public Class enrollment
    Public Property student_LName As String
    Public Property courseID As String
 
    Public Sub New(Last_Name As String, id As String)
        Me.student_LName = Last_Name
        Me.courseID = id
    End Sub
 
    Public Sub New()
    End Sub
End Class
#End Region
David
Top achievements
Rank 1
 answered on 13 Oct 2014
1 answer
125 views
I have a tab strip with scrolling enabled.  When I select a tab, a postback occurs, and then the tab strip always scrolls back to the top, leaving our users no way to know which tab they've selected unless they scroll back.  Has anyone else experienced this?  I've tried setting the ScrollPosition during the postback, but it had no effect.  I've tried this with PerTabScrolling set to both true and false.  Any ideas?
Matt DiPietro
Top achievements
Rank 1
 answered on 13 Oct 2014
1 answer
328 views
01.<telerik:RadGrid ID="RadGrid1"  runat="server">       
02.    <MasterTableView DataKeyNames="EntityID" AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false">
03.        <Columns>
04.            <telerik:GridTemplateColumn UniqueName="EntitySelector">
05.                <ItemTemplate>
06.                    <div  class="item">
07.                        <label class="name"><%# ((Domain.Entities.Model)Container.DataItem).ModelName%></label>
08.                        <label class="abbr"><%# ((Domain.Entities.Model)Container.DataItem).ModelTypeName %></label>
09.                        <img class="type" src="media/<%# ((Domain.Entities.Model)Container.DataItem).ModelTypeImageURI %>" alt="<%# ((Domain.Entities.Model)Container.DataItem).ModelTypeName %>" />
10.                        <telerik:RadButton ID="btnSelectModel" runat="server" OnClick="btnSelectModel_Click" Value="<%# ((Domain.Entities.Model)Container.DataItem).EntityID %>" Text="Select Entity"></telerik:RadButton>
11.                    </div>
12.                </ItemTemplate>
13.            </telerik:GridTemplateColumn>
14.        </Columns>
15.    </MasterTableView>                           
16.</telerik:RadGrid>


This preceeding code functions, what I want is to have the content template of the RadButton contain the div [class=item] section, so that I can make the entire gridItem clickable (handled server-side).. when I attempt to do that, I get a design time error regarding Telerik.Web.UI.RibbonBarTemplateItem (Container) not containing DataItem. 

I'm really just looking for a clickable container here to wrap my content.. it doesn't have to be the RadButton

Brett
Top achievements
Rank 1
 answered on 13 Oct 2014
4 answers
167 views
I tried enabling the scrolling feature for a grid. This works perfectly if the grid isn't contained in a <table> tag.... But if the grid is inside a table, Weird things happen....

If you use IE7, and you resize the IE7 window, IE freezes..
If you use Firefox 2 or Safari, about 2% of the grid will show up.. Resizing it will only show 1 column for Firefox2...

Is there anyone out there experiencing these behaviours? Anyone got a solution?

Thanks.
Joel R
Top achievements
Rank 1
 answered on 13 Oct 2014
2 answers
263 views
Having trouble getting RadBarcodes to scan unless made larger than default with LineWidth = 2.  UPC-A and EAN are the troublemakers with LineWidth = 1.  ITF-14 scans ok at LineWidth = 1. 

As documentation suggests, we tried setting Height and Width to empty strings to let control size things as it needs based on LineWidth setting.  Also tried using code like Height = New Unit(1.02, UnitType.inch) and Width = New Unit(1.469, UnitType.inch) to set to standard UPCA 1.02in x 1.469in size, but the RadBarcode control seems to just ignore the settings.  Any clues as to why LineWidth = 1 won't scan?   I can't find any other RadBarcode control properties that would help.

When I check the industry standard on UPCA, it says that the size is allowed to be anywhere from 80% to 200% of 1.02in x 1.469in.  But I can't find any way to make the RadBarcode create it in anything but mutliple of LineWidth (i.e. LineWidth=1 is default size, LineWidth=2 is twice as large, ...etc).

Its not a problem with our scanner, which is able to scan other smaller UPCA and ITF14 barcodes (not generated from RadBarcode) without problem. We are using a pretty standard Motorola LS2208 handheld scanner for testing, which is what our vendors are using.

Declaring control as
<telerik:RadBarcode runat="server" ID="cuBarCode" Width="" Height="" ></telerik:RadBarcode>

Setting up in codebehind as follows since we have to support 4 different barcodes types based on user choice...
Public Sub SetRadbarcodeProperties(ByVal barcodeCtl As RadBarcode, ByVal bc As FPHBarCode)
 
    barcodeCtl.OutputType = BarcodeOutputType.EmbeddedPNG
    barcodeCtl.Text = bc.Value
 
    Select Case bc.Type
        Case "ITF-14"
            barcodeCtl.Type = BarcodeType.Code25Interleaved
            barcodeCtl.RenderChecksum = False
            barcodeCtl.LineWidth = 2
        Case "UPC-A"
            barcodeCtl.Type = BarcodeType.UPCA
            barcodeCtl.RenderChecksum = True
            barcodeCtl.LineWidth = 2
        Case "EAN-13"
            barcodeCtl.Type = BarcodeType.EAN13
            barcodeCtl.RenderChecksum = True
            barcodeCtl.LineWidth = 2
        Case "UPC-E"
            barcodeCtl.Type = BarcodeType.UPCE
            barcodeCtl.RenderChecksum = True
            barcodeCtl.LineWidth = 2
        Case Else
            Throw New InvalidOperationException("Cannot handle barcode type=" + bc.Type)
    End Select
 
End Sub
John
Top achievements
Rank 1
 answered on 13 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?