Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
170 views
I have a global theme with all grid having the same skin like this:
<telerik:RadGrid   
    runat="server"
    Skin="360Core"
    EnableEmbeddedSkins="false"
    >
</telerik:RadGrid>

However I would like to set back to default telerik skin for a certain radgrid.
I tried to set the skin value to "" and "Default" for the radgrid I want the default skin for, but this did not work.
How can I override the global skin for all the radgrids for a certain radgrid, and set back to the default telerik skin?
Pavlina
Telerik team
 answered on 10 Jul 2014
5 answers
594 views
I have a grid with 4 levels of detail tables. I have not set the width of the grid, but have specified the width of every column using the HeaderStyle width. I also set TableLayout="Fixed" on the MasterTableView. However, the column widths don't seem to match the widths that I specified. The first level (the one that appears when the grid initially loads) is showing the correct column widths, plus 16. So if I specified 85px for a column, it shows up as 101px. The second level has the same issue. The third level seems to be doing something else altogether, ignoring the specific width of the first column and automatically adjusting the others. The first column's heading and data field are being set in the code behind, along with the width. Is this a known issue?
Pavlina
Telerik team
 answered on 10 Jul 2014
3 answers
204 views
Hi,

I have downloaded trial version of Telerik and trying to ceck whether my requirement are fullfill by telerik export functionality. All thing are seems fine just now wanted to give page number in PDF document on top like "Page 7 of 10", "Page 1 of 10"

Can you pls help me to sort out problem

Thanks in advance
Nayan Paregi
Marie
Top achievements
Rank 1
 answered on 10 Jul 2014
1 answer
97 views
Are there any issues running version 2014.2.618.35 in VS 2008.  It all seems to work when running but when in the designer view all the controls get 

Error Creating Control
Could not load file or assembly 'Telerik.Web.UI, version.....
Marin Bratanov
Telerik team
 answered on 10 Jul 2014
6 answers
370 views
Hi there

Most of my question is in the title, can anyone advise please? I have a radEditor that I am moving around the DOM using Javascript, so I can use the same control in different locations on the page, in a similar way to that discussed here:

http://www.telerik.com/community/forums/aspnet-ajax/editor/jquery---single-radeditor-for-multiple-editable-bodies-on-page.aspx

My particular problem is that I am using the facility for specifying in the markup, a dedicated ContentArea Iframe external CSS file, i.e.,

                        <CssFiles>
                            <trk:EditorCssFile Value="~/<pathtomyskinfiles...>/EditorContentArea.PD_RadSkin_1.css" />
                        </CssFiles>

The styles in this external file work fine, that is, until AFTER I use Javascript to perform the client-side move of the editor control within the DOM, at which stage the IFrame content reverts back to a default element styling, which Firebug for example reports as that the element has no styling at all, apparently not even in-line styles. I am calling onParentNodeChanged() on the editor after the move, as this is evidently necessary for the Iframe to reshow its content text ... unfortunately it does not seem to refresh the styling rendered from the external style sheet in question.

Any ideas have I can work around this? Thanks very much.

Regards


Ianko
Telerik team
 answered on 10 Jul 2014
17 answers
558 views

Hello.

I have a problem with RadAutoCompleteBox.EntryAdded server event. I created a user control (.ascx) called PeopleAndMachinesPicker with RadAutoCompleteBox (InputType="Token") in it.

RadAutoCompleteBox causes full page postback when server-side EntryAdded event handler is set. I tried to wrap my PeopleAndMachinesPicker control with UpdatePanel, but it causes JavaScript error:

"Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'PeopleAndMachinesPicker1_RadAutoCompleteBox2' can't be added to the application."

How can I process server-side EntryAdded event without full page postback? I tried __doPostBack() to update other controls on the page on ClientEntryAdded javascript event handler, but it's not suitable for my PeopleAndMachinesPicker control isolation.

Browser used: IE9 (9.0.8112.16421) 64 bit
Telerik.Web.UI assembly version: 2012.2.1002.35

Nencho
Telerik team
 answered on 10 Jul 2014
3 answers
100 views
I recently upgraded my controls to the 2014 Q2 Release and discovered that a page on my site was not working the way it had with the previous release of the controls that I had been using (2012 Q3... I know, it has been a while since we upgraded).

The page has a RadTabStrip with multiple tabs/pages.  One of the RadPageView nodes contains an panel with a RadGrid which contains a NestedViewTemplate with a Save and Cancel button on it.

The functionality I want is that the user should not be able to switch to a different tab while the NestedViewTemplate contents are visible (this functionality didn't work in the previous version; however, the validation blocked the switch as long as data was not keyed into the textbox).  If the Save button is clicked, the data would be validated and if valid the NestedViewTemplate contents are no longer shown (this functionality works).  If the Cancel button is clicked, the NestedViewTemplate contents are no longer shown (works but...) and if the user then attempts to switch to a different tab, they should be able to (this is what does not work in the new release, but did work in the old release).

What do I need to do to insure the user cannot tab when the NestedViewTemplate is open and so they can tab when it is closed via the "Cancel" button?

Here is the CodeBehind:
Imports System.Data
Imports Telerik.Web.UI
 
Public Class TestPage
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim dt As New DataTable("MyData")
 
            Dim i As Integer = 1
 
            dt.Columns.Add("Key", GetType(Integer))
            dt.Columns.Add("Description", GetType(String))
 
            Dim dr As DataRow = dt.NewRow
            dr("Key") = 1
            dr("Description") = "My Data Row"
            dt.Rows.Add(dr)
 
            Me.MyList.DataSource = dt
            Me.MyList.DataBind()
        End If
    End Sub
 
    Public Sub MyList_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs)
        If (e.CommandName = RadGrid.ExpandCollapseCommandName) Then
            If Not e.Item.Expanded Then
                AdjustPageAvailability(False)
            End If
        End If
    End Sub
 
    Public Sub MyList_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
        If (TypeOf e.Item Is GridDataItem) Then
            Dim item = CType(e.Item, GridDataItem)
 
            Dim column = item("ExpandColumn")
            If (column IsNot Nothing) Then
                column.Controls(0).Visible = True
            End If
        End If
    End Sub
 
    Protected Sub Cancel_Click(ByVal sender As Object, ByVal e As EventArgs)
        For Each item As GridDataItem In MyList.Items
            If item.Expanded Then
                item.Expanded = False
            End If
        Next
 
        Me.AdjustPageAvailability(True)
    End Sub
 
    Protected Sub Save_Click(ByVal sender As Object, ByVal e As EventArgs)
        Page.Validate(CType(sender, IButtonControl).ValidationGroup)
        If (Not Page.IsValid) Then
            Return
        End If
 
        For Each item As GridDataItem In MyList.Items
            If item.Expanded Then
                item.Expanded = False
            End If
        Next
 
        Me.AdjustPageAvailability(True)
    End Sub
 
    Private Sub AdjustPageAvailability(ByVal visible As Boolean)
        Dim column As TableCell
 
        For Each item As GridDataItem In Me.MyList.Items
            column = item("ExpandColumn")
            If (column IsNot Nothing) Then
                column.Controls(0).Visible = visible
            End If
        Next
    End Sub
 
End Class


Here is the Markup for the page:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="TestPage.aspx.vb" Inherits="Telerik2014Q2Issue.TestPage" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
 
        <tel:RadScriptManager ID="sm" runat="server" ClientIDMode="Static" >
        </tel:RadScriptManager>
 
        <tel:RadTabStrip ID="DetailsTabs" runat="server" SelectedIndex="0" MultiPageID="DetailsPages">
            <Tabs>
                <tel:RadTab runat="server" Text="Details" />
                <tel:RadTab runat="server" Text="History" />
            </Tabs>
        </tel:RadTabStrip>
        <tel:RadMultiPage ID="DetailsPages" runat="server" SelectedIndex="0">
            <tel:RadPageView ID="RadPageView1" runat="server">
                <asp:Panel runat="server" ID="DetailsForm">
                    <h3>DEP Well Details</h3>
                    <p>
                        <tel:RadGrid ID="MyList" runat="server" OnItemDataBound="MyList_ItemDataBound"
                            OnItemCommand="MyList_ItemCommand">
                            <MasterTableView AutoGenerateColumns="False" AllowPaging="False" AllowSorting="False"
                                AllowCustomPaging="False" HierarchyLoadMode="ServerOnDemand" DataKeyNames="Key">
                                <Columns>
                                    <tel:GridBoundColumn HeaderText="Description" DataField="Description" />
                                </Columns>
                                <NestedViewTemplate>
                                    <asp:Panel ID="Panel1" runat="server">
                                        <h3>More Details</h3>
                                        <div>
                                            <asp:ValidationSummary ID="MyValidationSummary" runat="server" HeaderText="The following errors have occurred:" />
                                            <table>
                                                <thead></thead>
                                                <tbody>
                                                    <tr>
                                                        <td>
                                                            <tel:RadTextBox ID="txtNotes" runat="server" TextMode="MultiLine" Rows="4" Columns="60" CssClass="MultiLineTextBox" />
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <asp:RequiredFieldValidator ID="NotesRequired" runat="server" ControlToValidate="txtNotes"
                                                                Text="* Required" ErrorMessage="Please enter a something in the box." />
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                        <div>
                                            <ul class="inline">
                                                <li>
                                                    <tel:RadButton ID="Save" runat="server" Text="Save" CausesValidation="true" OnClick="Save_Click" />
                                                </li>
                                                <li>
                                                    <tel:RadButton ID="Cancel" runat="server" Text="Cancel" CausesValidation="false" OnClick="Cancel_Click" />
                                                </li>
                                            </ul>
                                        </div>
                                    </asp:Panel>
                                </NestedViewTemplate>
                            </MasterTableView>
                        </tel:RadGrid>
                    </p>
                </asp:Panel>
            </tel:RadPageView>
            <tel:RadPageView ID="RadPageView2" runat="server">
                <div>
                    <p>History</p>
                </div>
            </tel:RadPageView>
        </tel:RadMultiPage>
     
    </div>
    </form>
</body>
</html>
Nencho
Telerik team
 answered on 10 Jul 2014
6 answers
386 views

Hi-

In our project we need to provide functionality to print the RAD Grid, the printed output should support the following features
 
1. Print all records, not just the first page ignoring Pagination
2. Print output should preserve and show the layout changes applied to grid i.e. If user has grouped the data by one or more columns print output should show the grouping
3.  Print output should not show the quick filters on the grid
4.  Add custom header and footer both of which would have dynamic contents including page number
5. At beginning of every printed page column headers of the grid should be displayed followed by data
6. Change the look and feel to be suitable for printing- Apply different CSS for printing
7. Have the option export the printed output to a PDF document

I would appreciate any help on solving these requirements.

Thanks,
Steve

Asutosh
Top achievements
Rank 1
 answered on 10 Jul 2014
2 answers
75 views
I have a radchart nested inside a datalist in my aspx page. The radchart properties and plot area is set inside datalist itemdatabound event.

The problem is that even though zoom is enabled for rad chart, zooming the chart doesn't reset the chart as per client selection while this control is inside a data list.

Please give a workaround for this issue.
Stamo Gochev
Telerik team
 answered on 10 Jul 2014
8 answers
1.7K+ views
Hello,

I would need some clarification on state preservation of the RadGrid

As indicated here the grid should preserve grouping when view state is enable.

I use the last release a simple grid with a dummy data-source taken from Persist Groups Expanded State on Rebind sample.

<telerik:RadGrid ID="RadGrid1" runat="server"   
    AllowSorting="true" ShowGroupPanel="True"                 
    OnNeedDataSource="RadGrid1_NeedDataSource" 
   AllowMultiRowSelection="false" 
   Skin="Vista" 
    > 
    <ClientSettings AllowDragToGroup="True" EnablePostBackOnRowClick="true">  
    </ClientSettings> 
    <MasterTableView GroupLoadMode="Server" > 
        <GroupByExpressions> 
            <telerik:GridGroupByExpression> 
                <GroupByFields> 
                    <telerik:GridGroupByField FieldName="Group" /> 
                </GroupByFields> 
                <SelectFields> 
                    <telerik:GridGroupByField FieldName="Group" /> 
                </SelectFields> 
            </telerik:GridGroupByExpression> 
        </GroupByExpressions> 
    </MasterTableView> 
</telerik:RadGrid> 
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /> 

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
 
        DataTable tbl = new DataTable();  
        DataColumn col = new DataColumn("ID");  
        col.DataType = typeof(int);  
        tbl.Columns.Add(col);  
        col = new DataColumn("Name");  
        col.DataType = typeof(string);  
        tbl.Columns.Add(col);  
        col = new DataColumn("Group");  
        col.DataType = typeof(string);  
        tbl.Columns.Add(col);  
 
        int size = 15;  
        int maxLen = size.ToString().Length;  
        for (int i = 1; i <= size; i++)  
        {  
            tbl.Rows.Add(new object[] { i, "Name" + i.ToString("D" + maxLen), "Group" + i % 5 });  
        }  
        RadGrid1.DataSource = tbl;  
    }  
 
    protected void Button1_Click(object sender, EventArgs e)  
    {  
       /*RadGrid1.Rebind();*/ 
    } 

Then
- with grouping (server side) the postback button will keep state as Rebind command has been commented out, but if Rebind command is activated the collapsed section information get lost
- with grouping ( still server side ) acting on the sorting reset the collapsed section as well.
- with grouping (client side) selected row and collapsed area are lost as well.

On key Feature page the #19 provide us the following : "an unique feature of Telerik RadGrid is the ability to preserve its appearance, group-by state, sorting, current page, edit or selected state, and resizing after postbacks"

Some links concerning previous built are available like Client-Side Row Selection Persisted With PagingPersist Groups Expanded State on Rebind  .. but don't know if they are still valuable for the last release.

Could someone clarify the situation on what is available / built-in and what should be done manually or not, in order to preserve ALL state, in case of server side and client side usage. ( a kind of matrix would be fine ... plus some links on how to do stuff manually, pointing to avaliable threads like the two above.) A grid demo including all available stuff would be nice as well.

Many thanks in advance for your time.
Maria Ilieva
Telerik team
 answered on 10 Jul 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?