Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
131 views
Hi,

i have a client select column and grid paging is on.when i click checkbox in the header it selects all the rows but when i move in the second page result couldnt be selected.and when i return page 1 all my selected row was removed.how can i fix this?

thanks. 
Shinu
Top achievements
Rank 2
 answered on 15 Mar 2012
2 answers
84 views
Hi guys

I saw the below two samples

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/detailtabledatabind/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/declarativerelations/defaultcs.aspx

In the detailed table can i have alternating color for each row

Can you guys help me

karthik.K
Karthik Kantharaj
Top achievements
Rank 1
 answered on 15 Mar 2012
1 answer
107 views

Suppose you have a treeview with CheckBoxes and CheckChildNodes set, and you are using LoadOnDemand.

The user clicks on a checkbox for a parent node whose children have not yet been loaded.

What happens?  Are the child nodes loaded?  If not loaded, is the altered checked state of the child nodes nevertheless transmitted to the server upon postback?

msigman
Top achievements
Rank 2
 answered on 14 Mar 2012
7 answers
167 views
Hello,

I have a Document Center Site Collection (home site) onto which I wanted to place this web part.  I tried several times to get it working, installing and uninstalling the web part a few different times.  Now, I think everything is installed correctly but when I add the web part to the page, I get the error below.  Is this because I installed and uninstalled the solution so many times?  I made sure the web part's feature was enabled on the site collection, and everything. Had to use Web Part Maintenance page to remove the part so that I could view the page again.

Thanks,
 - Matt

 

Server Error in '/' Application.

[A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidCastException: [A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[InvalidCastException: [A]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel] cannot be cast to [B]System.Collections.Generic.Dictionary`2[System.String,Telerik.Web.UI.OurUpdatePanel]. Type A originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'. Type B originates from 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in the context 'LoadNeither' at location 'C:\Windows\assembly\GAC_64\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'.]
   Telerik.Web.UI.RadAjaxControl.CreateUpdatePanel(Control initiator, String eventName, Control updated, UpdatePanelRenderMode panelRenderMode, Unit panelHeight) +439
   Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e) +1529
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Control.OnPreRender(EventArgs e) +11032190
   Microsoft.SharePoint.WebPartPages.WebPartPage.OnPreRender(EventArgs e) +50
   System.Web.UI.Control.PreRenderRecursiveInternal() +108
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394


Version Information: Microsoft .NET Framework Version:2.0.50727.4959; ASP.NET Version:2.0.50727.4955
Tesfaye
Top achievements
Rank 1
 answered on 14 Mar 2012
1 answer
49 views
We are trying to use the ToolbarProviderID functionality with multiple RadEditor controls.  The RadEditor controls are being instantiated at RunTime.  When the first RadEditor control is being created, we store the ID of that Editor to be used as the ToolbarProviderID for later Editors.

When we run, the Toolbar on the first RadPageView page where the first Editor is drawn renders as it should.  When I switch to a Tab that contains an additional Editor, we encounter a Javascript error.

My question:  how do we use the ToolbarProviderID when the ID of the control will not be visible because of the RadPageView hiding the control?
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
43 views
Hi,

When I open Hyperlink Manager for a link in RadEditor, enter some data in Email tab and click OK, its not saving that data. When I re-open the Hyperlink manager, the email tab data is cleared. Other two tabs are fine. Please let me know if I am missing something.

Thanks..
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
142 views
Hi,

    I am now integrating RadEditor into my collaborative appliaction. I found the feature "commenting in RadEditor" interesting as users are able to make comments on the contents. However, I just wonder how to change the RadEditorUser/Author attribute because everytime a user makes a comment, Radeditor would set the author as "RadEditorUser". This causes confusion as users cannot distingish their comments with those made by others.

Thanks
Nelson
Rumen
Telerik team
 answered on 14 Mar 2012
1 answer
77 views
I am trying to automatically expand to detail level the newly inserted master record (which works)
and then auto put the child into insert mode which I cant seem to get working.

It throws the 'index out of bounds' error on the :

  Dim tableView As GridTableView = DirectCast(item.ChildItem.NestedTableViews(0), GridTableView)
  tableView.IsItemInserted = True


Any advice appreciated.
Thanks in advance.

Snippet of code I am using below

<telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender" DataSourceID="SqlDataSource1" OnItemInserted="RadGrid1_ItemInserted"
            runat="server" AutoGenerateColumns="False" AllowSorting="True" AllowMultiRowSelection="False"
            AllowPaging="True" PageSize="10" GridLines="None" AllowAutomaticInserts="True"
            allowautomaticdeletes="true" AllowAutomaticUpdates="true">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <MasterTableView DataSourceID="SqlDataSource1" CommandItemDisplay="Top" DataKeyNames="custID" AllowMultiColumnSorting="True"
                            GroupLoadMode="Server">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="true">
                        <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1"
                            SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="Job Details" PageViewID="PageView1">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Scheduling" PageViewID="PageView2">
                                </telerik:RadTab>
 
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="Multipage1" SelectedIndex="0" RenderSelectedPageOnly="false">
                            <telerik:RadPageView runat="server" ID="PageView1">
                                <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("custID") %>'
                                    Visible="false" runat="server" />
                                <telerik:RadGrid runat="server" ID="OrdersGrid" DataSourceID="SqlDataSource2"
                                    ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false">
                                    <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" EditMode="InPlace"
                                        DataKeyNames="OrderID" PageSize="7" HierarchyLoadMode="ServerOnDemand" CommandItemDisplay="Top">
                                        <Columns>
                                            <telerik:GridNumericColumn SortExpression="Description" HeaderText="Description" HeaderButtonType="TextButton"
                                                DataField="Description" UniqueName="Description">
                                            </telerik:GridNumericColumn>
                                            <telerik:GridBoundColumn SortExpression="Price" HeaderText="Price" HeaderButtonType="TextButton"
                                                DataField="Price" UniqueName="Price">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridDateTimeColumn SortExpression="PayOnline" HeaderText="PayOnline" HeaderButtonType="TextButton"
                                                DataField="PayOnline" UniqueName="Payonline">
                                            </telerik:GridDateTimeColumn>
                                            <telerik:GridBoundColumn UniqueName="Frequency" DataField="FrequencyNum"
                                                HeaderText="Frequency">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                <asp:SqlDataSource ID="SqlDataSource2" ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
                                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CustJobs Where custID = @custID "
                                    runat="server">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="custID" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
 
                            </telerik:RadPageView>
                            <telerik:RadPageView runat="server" ID="PageView2" Width="600px">
                                <asp:Label ID="Label2" Font-Bold="true" Font-Italic="true" Text='<%# Eval("custID") %>'
                                    Visible="false" runat="server" />
                                <telerik:RadGrid runat="server" ID="RadGrid2" DataSourceID="SqlDataSource2"
                                    ShowFooter="true" AllowSorting="true" EnableLinqExpressions="false">
                                    <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true" EditMode="InPlace"
                                        DataKeyNames="OrderID" PageSize="7" HierarchyLoadMode="ServerOnDemand">
                                        <Columns>
                                            <telerik:GridNumericColumn SortExpression="FrequencyNum" HeaderText="Frequency" HeaderButtonType="TextButton"
                                                DataField="FrequencyNum" UniqueName="FrequencyNum">
                                            </telerik:GridNumericColumn>
                                            <telerik:GridBoundColumn SortExpression="FrequencyTerm" HeaderText=".." HeaderButtonType="TextButton"
                                                DataField="FrequencyTerm" UniqueName="FrequencyTerm">
                                            </telerik:GridBoundColumn>
                                            <telerik:GridDateTimeColumn SortExpression="FirstClean" HeaderText="FirstClean" HeaderButtonType="TextButton"
                                                DataField="FirstClean" UniqueName="FirstClean">
                                            </telerik:GridDateTimeColumn>
                                            <telerik:GridBoundColumn UniqueName="NextDue" HeaderText="Next Due" HeaderButtonType="TextButton"
                                                DataField="NextDue">
                                            </telerik:GridBoundColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                                <asp:SqlDataSource ID="SqlDataSource3" ConnectionString="<%$ ConnectionStrings:MainConnectionString %>"
                                    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM CustJobs Where custID = @custID "
                                    runat="server">
                                    <SelectParameters>
                                        <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="custID" />
                                    </SelectParameters>
                                </asp:SqlDataSource>
 
                            </telerik:RadPageView>
 
                        </telerik:RadMultiPage>
                    </asp:Panel>
                </NestedViewTemplate>
                <Columns>
                    <telerik:GridBoundColumn DataField="custID" SortExpression="custID" HeaderText="custID" Visible="false" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Name" UniqueName="Name" ItemStyle-Width="5" HeaderStyle-Width="5" FilterControlWidth="5">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Addr1" HeaderText="Address" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Addr1" UniqueName="Addr1">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Addr2" HeaderText="" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Addr2" UniqueName="Addr2">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Town" HeaderText="Town" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Town" UniqueName="Town">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="County" HeaderText="County" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="County" UniqueName="County">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="PostCode" HeaderText="PostCode" HeaderButtonType="TextButton" MaxLength="8" ItemStyle-Font-Size="Smaller"
                        DataField="PostCode" UniqueName="PostCode">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Tel" HeaderText="Tel" HeaderButtonType="TextButton" MaxLength="11" ItemStyle-Font-Size="Smaller"
                        DataField="Tel" UniqueName="Tel">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Mobile" HeaderText="Mobile" HeaderButtonType="TextButton" MaxLength="11" ItemStyle-Font-Size="Smaller"
                        DataField="Mobile" UniqueName="Mobile">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Email" HeaderText="Email" HeaderButtonType="TextButton" ItemStyle-Font-Size="Smaller"
                        DataField="Email" UniqueName="Email">
                    </telerik:GridBoundColumn>                   
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowDragToGroup="true" />
        </telerik:RadGrid>
 
 
 
 
 
 
 
 
 Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.PreRender
 
    'REPLACE with oleDB method b4 go live
    '----------
        Dim strGUID2Find As String
        strGUID2Find = Session("CustGUID")
    '-------------
    'use session var for debugging.. switch to OLEDB method before go live.
 
        ' Do nothing if RadGrid is in insert mode or no new item is inserted recently.
        If RadGrid1.MasterTableView.IsItemInserted OrElse strGUID2Find = "" Then
            Return
        End If
 
 
        Dim currentPageIndex As Integer = RadGrid1.CurrentPageIndex
 
        ' loop thru grid to find latest rec inserted..
        For i As Integer = 0 To RadGrid1.PageCount - 1
            ' Compare CustID of each item in the RadGrid with the newly inserted item custID
            For Each item As GridDataItem In RadGrid1.Items
                If strGUID2Find.Equals(item("CustID").Text) Then
                    ' Select the last inserted row
                    item.Selected = True
                    item.Expanded = True
 
                      Dim tableView As GridTableView = DirectCast(item.ChildItem.NestedTableViews(0), GridTableView)
                      tableView.IsItemInserted = True
 
                    currentPageIndex = -1
                    ' flag exit
                    Exit For
                End If
            Next
 
            ' If item is found then exit RadGrid page loop
            If currentPageIndex.Equals(-1) Then
                Exit For
            End If
 
            ' Go to next RadGrid page
            currentPageIndex += 1
            If currentPageIndex >= RadGrid1.PageCount Then
                currentPageIndex = 0
            End If
            RadGrid1.CurrentPageIndex = currentPageIndex
            RadGrid1.Rebind()
        Next
    End Sub
Tsvetina
Telerik team
 answered on 14 Mar 2012
1 answer
63 views
Hello,
I Need this example  "Filtering By ListTextField for GridDropDownColumn"
http://www.telerik.com/help/aspnet-ajax/grid-filtering-by-listtextfield-for-griddropdowncolumn.html
but I use the HeaderContextMenu.
My e.Item is a GridHeaderItem  insteadOf GridFilteringItem  Thanks in advance
Richard
Top achievements
Rank 1
 answered on 14 Mar 2012
1 answer
98 views
Hi everyone,

I have a question about if I can to create my sql query with some telerik controls;

Could I with radtreeview or radfilter create my sql query and then fill my  grid?
What happens is that I don´t want to get all the records at once but only those who will need.


Regards,
Tsvetina
Telerik team
 answered on 14 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?