Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
143 views
I have created a RadGrid in the Page_init and have declared a GridTableView to incorporate the hierarchy.

RadGrid1.MasterTableView.HierarchyDefaultExpanded = True
Dim tableSubCode As New GridTableView(RadGrid1)
tableSubCode.Name = "SubCodes"
tableSubCode.Width = Unit.Percentage(100)
Dim relationFields1 As GridRelationFields = New GridRelationFields()
relationFields1.MasterKeyField = "DetailID"
relationFields1.DetailKeyField = "DetailID"
tableSubCode.ParentTableRelation.Add(relationFields1)
RadGrid1.MasterTableView.DetailTables.Add(tableSubCode)
columnSubCodeCreation("SubCode", "Sub_Code", tableSubCode)
columnSubCodeCreation("Household", "HouseHold_Count", tableSubCode)
If mstrClientDataCategoryID1Description.Trim <> "" Then
    columnSubCodeCreation(mstrClientDataCategoryID1Description.Trim, "CD1", tableSubCode)
End If
If mstrClientDataCategoryID2Description.Trim <> "" Then
    columnSubCodeCreation(mstrClientDataCategoryID2Description.Trim, "CD2", tableSubCode)
End If
If mstrClientDataCategoryID3Description.Trim <> "" Then
    columnSubCodeCreation(mstrClientDataCategoryID3Description.Trim, "CD3", tableSubCode)
End If
If mstrReportDemographicID1Description.Trim <> "" Then
    columnSubCodeCreation(mstrReportDemographicID1Description.Trim, "Demographic1", tableSubCode)
End If
If mstrReportDemographicID2Description.Trim <> "" Then
    columnSubCodeCreation(mstrReportDemographicID2Description.Trim, "Demographic2", tableSubCode)
End If
If mstrReportDemographicID3Description.Trim <> "" Then
    columnSubCodeCreation(mstrReportDemographicID3Description.Trim, "Demographic3", tableSubCode)
End If
If mstrReportDemographicID4Description.Trim <> "" Then
    columnSubCodeCreation(mstrReportDemographicID4Description.Trim, "Demographic4", tableSubCode)
End If
If mstrReportDemographicID5Description.Trim <> "" Then
    columnSubCodeCreation(mstrReportDemographicID5Description.Trim, "Demographic5", tableSubCode)
End If
columnSubCodeCreation("Selected", "Selected", tableSubCode)
If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
    columnSubCodeCreation("Forced", "Forced", tableSubCode)
End If
columnSubCodeCreation("Circ", "Circ", tableSubCode)
columnSubCodeCreation("Coverage", "Coverage", tableSubCode)
If UcHeader.objSession.ApplicationId <> CInt(ConfigurationManager.AppSettings("MediaviewerAppID")) Then
    Dim dpCounter As Integer = 1
    Dim dpCollection As IList(Of RadListBoxItem) = rlbDistributionPatterns.CheckedItems
    For Each item As RadListBoxItem In dpCollection
        columnSubCodeCreation(item.Text, "DP" & dpCounter.ToString, tableSubCode)
        dpCounter += 1
    Next
End If

My Hierarchy is expanded as a default. So the RadGrid1_DetailTableDataBind is called for every parent row about 1200 with a pagesize of 100. I only want to set the datasource when dealing with 3 of my parents.
Private Sub RadGrid1_DetailTableDataBind(sender As Object, e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind
    Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
    Select Case e.DetailTableView.Name
        Case "SubCodes"
            Dim detailID As Integer = dataItem.GetDataKeyValue("DetailID").ToString()
            'Dim Geography As String = dataItem.GetDataKeyValue("Geography").ToString()
            'Dim CirculationTypeID As Integer = dataItem.GetDataKeyValue("CirculationTypeID").ToString()
            Dim Day As String = dataItem.GetDataKeyValue("Day").ToString()
            If mintCircSetID > 0 And (detailID = 29 Or detailID = 506 Or detailID = 509) Then
                e.DetailTableView.DataSource = GetDataTable(mstrSQL & ",1," & detailID & ",'" & Day & "'")
            End If
    End Select
End Sub

When I do this, for the parent rows that I do not want to call the datasource, a Child View does come up with the Parents information in it. For the 3 rows I actually call, the correct information comes up. I do not want the Child View of the other parents to show. I am doing this this way for effeciency. I see my performance times greatly shrink if I only assign the datasource to the parents I want and not have the call to every parent. How can I stop from the child view showing up on the other parents?
David Kucharski
Top achievements
Rank 1
 answered on 08 May 2013
3 answers
300 views
Dear Telerik team

I have the same issue that requested in this post.

I want to load all the records into the radgrid without using Normal paging or Virtual scrolling /paging.

for example my datasource have 9,000 rows, i want to render first 100 record at user button click
then automatically loading the rest by 100 row per travel to server appending the data displayed on the grid.

something like buffering.

Is that applicable with RadGrid ?

Thanks in advance. 


Elliott
Top achievements
Rank 2
 answered on 08 May 2013
0 answers
209 views
How can i remove RadScriptManager from a page?  I want to include the JS manualy with <script /> tags instead of using the  RadScriptManager on a few pages I have.  I already found all the JS the Telerik controls on the page are using but when I try and include them outside the RadScriptManager the page throws JS errors.
Andrew
Top achievements
Rank 1
 asked on 08 May 2013
3 answers
335 views
I have created a usercontrol to edit the values on a RadGrid.  One of the fields on the grid is stored in the database as a comma separated string.  In order to allow the user to change the stored values for this field, a multiselect listbox has been placed on the usercontrol.  Currently I use the edit event to store the currentvalues in this field in a session variable.  Then on the databound event, I retrieve the value from the session variable, parse them and select the appropriate rows in the listbox to show what the past values were.  The code works but I was wondering if there was any way to use the bind statement to effect the same end?  If there is only one value to be selected the bind will work but if more than one value is to be selected I don't know of or how the bind statement would work.
Daniel
Telerik team
 answered on 08 May 2013
6 answers
258 views
I have a RadGrid with some bound columns and calculated columns. There is a calculated column for each month in a year which calculates a value multiplied by a UnitPrice. I am getting an error when I try to group by any of the columns, even the bound columns. For example, I have a column called "July" and when I try to group by any of the columns I get an error saying "Column 'JulyResult' does not belong to table." There is no column in my DataTable called 'JulyResult', I assume this column is created because it's a calculated column. The same error happens for all the other calculated columns. I am using the NeedDataSource event to set the RadGrid's datasource to a DataTable. I am using Telerik RadControls for ASP.NET Ajax Q1 2011 SP2. Any ideas why I am getting this error? Thanks.
Scott
Top achievements
Rank 1
 answered on 08 May 2013
1 answer
76 views
In my browser window i have a rad ribbon bar at 100% width, and i have buttons all the way to the right of the ribbon bar.

When you mouseover to show the tooltip on the buttons at the very right hand side of the window the tooltip overflows the browser window and i cant read the content.

You can see this using the tooltip demo page and resizing the browser, see attached image.

I imagine this is a bug - in the mean time is there a client side event i can attach to in order to reposition the tooltip ?
Kate
Telerik team
 answered on 08 May 2013
3 answers
169 views
We are using Radgrid with paging. But at the time of export we need to export all records (6000 row and 56 columns). If we use normal export it takes lot of time to export to excel. One more case is that we do not want to use HTML format for excel as it shows warning while opening. Hence we decided to go for third party library NPOI. we are referring to 

http://www.telerik.com/community/code-library/aspnet-ajax/grid/export-to-excel-with-third-party-library-npoi.aspx

One issue is that it is displaying two empty columns in the starting in the excel sheet. All columns are added runtime. I have checked and there is no extra column added. 

<telerik:RadGrid ID="grdDetailreport" runat="server" GridLines="None" AllowSorting="True"
    AllowPaging="True" PageSize="50" AllowCustomPaging="true" AllowFilteringByColumn="true"
    OnNeedDataSource="grdDetailreport_NeedDataSource" OnSortCommand="grdDetailreport_SortCommand"
    OnItemDataBound="grdDetailreport_ItemDataBound" Width="950px">
    <ClientSettings AllowDragToGroup="false">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="5" SaveScrollPosition="true">
        </Scrolling>
    </ClientSettings>
    <PagerStyle Mode="NextPrevNumericAndAdvanced" Position="Bottom"></PagerStyle>
    <MasterTableView RetrieveAllDataFields="false" AutoGenerateColumns="false" EnableColumnsViewState="true"
        AllowCustomSorting="true" CommandItemDisplay="Top" TableLayout="Auto">
        <CommandItemSettings ShowExportToExcelButton="false" ShowAddNewRecordButton="false"
            ShowRefreshButton="false" ExportToExcelText="Export to excel"></CommandItemSettings>
        <Columns>
        </Columns>
    </MasterTableView>
    <ExportSettings IgnorePaging="true">
        <Excel Format="Biff" ></Excel>
    </ExportSettings>
</telerik:RadGrid>

Kostadin
Telerik team
 answered on 08 May 2013
1 answer
123 views
Hi telerik,
1. I have a RadPanelBar with FullExplandMode,but it seems that when I expland the item, the children item height is not correct,please see the first pic, when I click "Child RadPanelItem 2" at the first time of the page load, it will be ok, but if I click "Child RadPanelItem 1" first, and then click "Child RadPanelItem 2", it will have a scroll bar which I don't want.
2. Some times it will turn up a margin after some clicks, if I have many items and multilevel, but not every time, pls see the pic-2.

the version is v2013.1.417.40, I remember these two problems not present in the previous version.
Boyan Dimitrov
Telerik team
 answered on 08 May 2013
4 answers
278 views
I have seen a couple threads in here that older versions of Telerik don't allow an email to be sent and attaching the radgrid as an attachment.  Has there been an update that I have missed? 

What I am look for is to view a grid, click a button and send the grid as an email attachment in an excel format.
Mike
Top achievements
Rank 1
 answered on 08 May 2013
3 answers
182 views
Hi
Im new in Ajax, I'm following the example to bind my Employee table to Radorgchart but i get the following error. Any suggestions?

Kate
Telerik team
 answered on 08 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?