Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views

Hello there,

I have combox, I am using a treeview to populate its data. When I am selecting the combobox it throws me the following error.

OS - os version: OS X EI Captain version 10.11.2

browser - safari version: 9.0.2 (11601.3.9)

 

Error

Failed to load resource: Could not connect to the server.
_initRightToLeftScriptResource.axd:8396TypeError: null is not an object (evaluating 'c.set_additionalQueryString')
_initRightToLeftScriptResource.axd:8395
initializeScriptResource.axd:8332
endUpdateTelerik.Web.UI.WebResource.axd:2:49050
endCreateComponentsTelerik.Web.UI.WebResource.axd:2:63458
_raiseInitTelerik.Web.UI.WebResource.axd:2:65559
_doInitializeTelerik.Web.UI.WebResource.axd:2:63974
(anonymous function)Telerik.Web.UI.WebResource.axd:2:65784
(anonymous function)Telerik.Web.UI.WebResource.axd:2:50713
pTelerik.Web.UI.WebResource.axd:2:558
_2PassTelerik.Web.UI.WebResource.axd:2:50697
FTelerik.Web.UI.WebResource.axd:2:1539
dTelerik.Web.UI.WebResource.axd:2:1898
cTelerik.Web.UI.WebResource.axd:2:1294

Dimitar
Telerik team
 answered on 13 Jan 2016
3 answers
399 views
I have a RadGrid in batch edit mode.
I have  a EditTemplate column which has a dropdown. On selection change of the dropdown I want to show\hide column is the next adjacent column the column that I can show can be Text box or Listbox  + Texbox + button. 
Also I need to handle the button click of this button in the edit mode.

For show\hide of control based of dropdown value selected I expect the ItemBoundEvent to fire and 
to handle the button click event I expect ItemCommandEvent event to fire. 

But it seems that in Batch Edit mode neither of the above two events gets fired. So I'm stuck on how to implement this functionality.

How do I achieve this functionality in this case? 
Thank you
Danail Vasilev
Telerik team
 answered on 13 Jan 2016
3 answers
372 views
I have a Radgrid with 4 ItemTemplate columns each item template column has a Textbox. I need to fire SelectedCellChanged event when I move (click tab) from one cell (textbox) to other cell (I need to call a method which does calculations whenever a cell is changed). Please suggest.

Thanks in advance.

Note: I'm working on a web application using c#.

Regards,
Mohan.
Viktor Tachev
Telerik team
 answered on 13 Jan 2016
1 answer
151 views

We have nearly 160+ records in Telerik Grid added to aspx page and if the number of records in the database is going to be increased, it is taking lot of time to execute the DataBind() method executing line even though the SP is getting the data in less time. Please let us know the reason for this Telerik Grid behaviour and also the solution, if any to resolve this...

 

 Regards:

Ravi Chandra.D

Viktor Tachev
Telerik team
 answered on 13 Jan 2016
1 answer
116 views

I have a RadView and I add data and controls to it. There is a checkbox and two labels.  I also add in a Rad Panel to allow for collapse/expand of a RadEditor.  All seems to work, except the click event.  I need two clicks to expand the RadPanelItem (once it seems to get focus and then the second to open) This only happens once - after that a single click expands and then a single click collapses the RadPanel.  Also the down arrow disappears.

How can I stop the initial two click requirement?

example asp

<asp:WizardStep ID="wsoptionQuestions" StepType="Step" Title="option Questions"
    runat="server">
    <h3 style="background-color: #4D85AC;">
        <asp:Literal ID="litoptionQuestionsTitle" runat="server">option Questions</asp:Literal></h3>
    <p class="instructionBlue">
        <asp:Literal ID="litoptionQuestionsInstructions" runat="server">You may want to collect option.</asp:Literal></p>
    <div class="selectAll">
        <asp:LinkButton ID="lboptionQuestionSelectAll" CausesValidation="false" ToolTip="Click here to select all option questions"
            runat="server">Select All</asp:LinkButton> | <asp:LinkButton ID="lboptionQuestionClearAll"
                CausesValidation="false" ToolTip="Click here to unselect all option questions"
                runat="server">Clear All</asp:LinkButton>
    </div>
    <telerik:RadListView ID="lvoptionQuestions" DataKeyNames="optionQuestionID"
        ItemPlaceholderID="itemPlaceHolder" runat="server">
        <LayoutTemplate>
            <fieldset>
                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
            </fieldset>
        </LayoutTemplate>
        <ItemTemplate>
            <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Telerik" Width="100%" ExpandMode="FullExpandedItem">
                <Items>
                    <telerik:RadPanelItem ID="RadPanelItem" runat="server" Enabled="True">
                        <Items>
                            <telerik:RadPanelItem ID="RadPanelItemItem" runat="server" />
                        </Items>
                        <ItemTemplate>
                            <div class="module" style="width: 100%; float: left">
                                <asp:Table ID="tbloptionQuestion" CellPadding="0" CellSpacing="0" CssClass="formTable"
                                    runat="server">
                                    <asp:TableRow CssClass="formRow">
                                        <asp:TableCell CssClass="formPrompt" Style="width: 4%">
                                            <asp:CheckBox ID="cboptionQuestionSelected" ToolTip="Check this box to select this option question"
                                                OnCheckedChanged="cboptionQuestion_CheckedChanged" runat="server" />
                                        </asp:TableCell>
                                        <asp:TableCell CssClass="formPrompt" Style="width: 4%">
                                            <asp:Label ID="lbloptionQuestionOrder" runat="server"></asp:Label>
                                        </asp:TableCell>
                                        <asp:TableCell CssClass="formValue" Style="width: 90%">
                                            <asp:Label ID="lbloptionQuestion" runat="server"></asp:Label><asp:Label ID="lbloptionQuestionDisabled"
                                                Enabled="false" Text="<br />This question is not available for this location."
                                                Visible="false" runat="server"></asp:Label>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                </asp:Table>
                                <!-- Empty template to suppress global template -->
                            </div>
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
                <ItemTemplate>
                    <div class="module" style="width: 100%; float: left">
                        <asp:HiddenField ID="hfoptionQuestionName" runat="server" Value='<%#Eval("optionQuestionShort")%>' />
                        <asp:Table ID="tbloptionQuestionDisclaimer" CellPadding="0" CellSpacing="0"
                            CssClass="formTable" runat="server">
                            <asp:TableRow CssClass="formRowShaded">
                                <asp:TableCell Style="width: 99%" ColumnSpan="3">
                                    <p class="instructionBlue">
                                        <asp:Literal ID="litoptionQuestionDisclaimer" runat="server">If you have selected any option.</asp:Literal>
                                        <asp:Literal ID="litoptionQuestionDisclaimerDefault" runat="server">Click on the
                            DEFAULT button to import the default text for this disclaimer.</asp:Literal>
                                    </p>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow CssClass="formRowShaded">
                                <asp:TableCell Style="width: 99%" ColumnSpan="3">
                                    <strong>
                                        <asp:Literal ID="litoptionDisclaimerPrompt" runat="server">option Disclaimer</asp:Literal>:</strong>
                                    <asp:CustomValidator ID="cvoptionDisclaimer" ControlToValidate="tboptionDisclaimer"
                                        CssClass="error" Display="Dynamic" ErrorMessage="<br />You have selected option questions. You must also provide a disclaimer."
                                        ForeColor="" SetFocusOnError="true" ValidateEmptyText="true" runat="server"></asp:CustomValidator>
                                    <telerik:RadEditor ID="radoptionDisclaimer" AutoResizeHeight="false" BorderColor="#4D85AC"
                                        BorderStyle="Solid" BorderWidth="1px" ContentAreaCssFile="~/app_themes/editor.css"
                                        EditModes="Design" ExternalDialogsPath="~/RadEditorDialogs/EditorDialogs/" EnableEmbeddedSkins="true"
                                        Height="180px" StripFormattingOptions="ConvertWordLists,Css,MSWordNoMargins,Span"
                                        Skin="Metro" Width="99%" runat="server" OnClientLoad="OnClientLoad">
                                        <CssFiles>
                                            <telerik:EditorCssFile Value="~/app_themes/editor.css" />
                                        </CssFiles>
                                        <Tools>
                                            <telerik:EditorToolGroup Tag="AppearanceToolbar">
                                                <telerik:EditorDropDown Name="FormatBlock" Text="Normal">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorDropDown Name="FontName" Text="Font">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorDropDown Name="RealFontSize" Text="Size">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorTool Name="StripAll" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ColorToolbar">
                                                <telerik:EditorSplitButton Name="ForeColor" Text="Color">
                                                </telerik:EditorSplitButton>
                                                <telerik:EditorSplitButton Name="BackColor" Text="Background">
                                                </telerik:EditorSplitButton>
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="LinkToolbar">
                                                <telerik:EditorTool Name="LinkManager" Text="Change Link" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="AlignmentToolbar">
                                                <telerik:EditorTool Name="JustifyLeft" />
                                                <telerik:EditorTool Name="JustifyCenter" />
                                                <telerik:EditorTool Name="JustifyRight" />
                                                <telerik:EditorTool Name="JustifyFull" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="IndentToolbar">
                                                <telerik:EditorTool Name="Indent" />
                                                <telerik:EditorTool Name="Outdent" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ListToolbar">
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="LineToolbar">
                                                <telerik:EditorTool Name="InsertHorizontalRule" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="FormatToolbar">
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Bold" ShortCut="CTRL+B / CMD+B" />
                                                <telerik:EditorTool Name="Italic" ShortCut="CTRL+I / CMD+I" />
                                                <telerik:EditorTool Name="Underline" ShortCut="CTRL+U / CMD+U" />
                                                <telerik:EditorTool Name="StrikeThrough" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Superscript" />
                                                <telerik:EditorTool Name="Subscript" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ClipboardToolbar">
                                                <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A / CMD+A" />
                                                <telerik:EditorTool Name="Cut" ShortCut="CTRL+X / CMD+X" />
                                                <telerik:EditorTool Name="Copy" ShortCut="CTRL+C / CMD+C" />
                                                <telerik:EditorTool Name="Paste" ShortCut="CTRL+V / CMD+V" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="UndoToolbar">
                                                <telerik:EditorSplitButton Name="Undo">
                                                </telerik:EditorSplitButton>
                                                <telerik:EditorSplitButton Name="Redo">
                                                </telerik:EditorSplitButton>
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="PrintToolbar">
                                                <telerik:EditorTool Name="Print" ShortCut="CTRL+P / CMD+P" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                    </telerik:RadEditor>
                                    <asp:Panel ID="pnloptionDisclaimerDefault" CssClass="formPanel" Visible="false"
                                        runat="server">
                                        <asp:Button ID="btnoptionDefault" CausesValidation="false" Text="Default" ToolTip="Click here to import the default option disclaimer"
                                            OnClick="btnoptionDefault_Click" runat="server" />
                                        <asp:Label ID="lbloptionDisclaimerDefault" Visible="false" runat="server"></asp:Label>
                                    </asp:Panel>
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </div>
                </ItemTemplate>
            </telerik:RadPanelBar>
        </ItemTemplate>
        <AlternatingItemTemplate>
            <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Telerik" Width="100%" ExpandMode="FullExpandedItem">
                <Items>
                    <telerik:RadPanelItem ID="RadPanelItem" runat="server" Enabled="True">
                        <Items>
                            <telerik:RadPanelItem ID="RadPanelItemItem" runat="server" />
                        </Items>
                        <ItemTemplate>
                            <div class="module" style="width: 100%; float: left">
                                <asp:Table ID="tbloptionQuestion" CellPadding="0" CellSpacing="0" CssClass="formTable"
                                    runat="server">
                                    <asp:TableRow CssClass="formRow">
                                        <asp:TableCell CssClass="formPrompt" Style="width: 5%">
                                            <asp:CheckBox ID="cboptionQuestionSelected" ToolTip="Check this box to select this option question"
                                                OnCheckedChanged="cboptionQuestion_CheckedChanged" runat="server" />
                                        </asp:TableCell>
                                        <asp:TableCell CssClass="formPrompt" Style="width: 5%">
                                            <asp:Label ID="lbloptionQuestionOrder" runat="server"></asp:Label>
                                        </asp:TableCell>
                                        <asp:TableCell CssClass="formValue" Style="width: 90%">
                                            <asp:Label ID="lbloptionQuestion" runat="server"></asp:Label>
                                            <asp:Label ID="lbloptionQuestionDisabled" Enabled="false" Text="<br />This question is not available for this location."
                                                Visible="false" runat="server"></asp:Label>
                                        </asp:TableCell>
                                    </asp:TableRow>
                                </asp:Table>
                            </div>
                        </ItemTemplate>
                    </telerik:RadPanelItem>
                </Items>
                <ItemTemplate>
                    <div class="module" style="width: 100%; float: left">
                        <asp:HiddenField ID="hfoptionQuestionName" runat="server" />
                        <asp:Table ID="tbloptionQuestionDisclaimer" CellPadding="0" CellSpacing="0"
                            CssClass="formTable" runat="server">
                            <asp:TableRow CssClass="formRowShaded">
                                <asp:TableCell Style="width: 99%" ColumnSpan="3">
                                    <p class="instructionBlue">
                                        <asp:Literal ID="litoptionQuestionDisclaimer" runat="server">If you have selected any options. </asp:Literal>
                                        <asp:Literal ID="litoptionQuestionDisclaimerDefault" runat="server">Click on the
                                DEFAULT button to import the default text for this disclaimer.</asp:Literal>
                                    </p>
                                </asp:TableCell>
                            </asp:TableRow>
                            <asp:TableRow CssClass="formRowShaded">
                                <asp:TableCell Style="width: 99%" ColumnSpan="3">
                                    <strong>
                                        <asp:Literal ID="litoptionDisclaimerPrompt" runat="server">option Disclaimer</asp:Literal>:</strong>
                                    <asp:CustomValidator ID="cvoptionDisclaimer" ControlToValidate="tboptionDisclaimer"
                                        CssClass="error" Display="Dynamic" ErrorMessage="<br />You have selected option questions. You must also provide a disclaimer."
                                        ForeColor="" SetFocusOnError="true" ValidateEmptyText="true" runat="server"></asp:CustomValidator>
                                    <telerik:RadEditor ID="radoptionDisclaimer" AutoResizeHeight="false" BorderColor="#4D85AC"
                                        BorderStyle="Solid" BorderWidth="1px" ContentAreaCssFile="~/app_themes/editor.css"
                                        EditModes="Design" ExternalDialogsPath="~/RadEditorDialogs/EditorDialogs/" EnableEmbeddedSkins="true"
                                        Height="180px" StripFormattingOptions="ConvertWordLists,Css,MSWordNoMargins,Span"
                                        Skin="Metro" Width="99%" runat="server" OnClientLoad="OnClientLoad">
                                        <CssFiles>
                                            <telerik:EditorCssFile Value="~/app_themes/editor.css" />
                                        </CssFiles>
                                        <Tools>
                                            <telerik:EditorToolGroup Tag="AppearanceToolbar">
                                                <telerik:EditorDropDown Name="FormatBlock" Text="Normal">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorDropDown Name="FontName" Text="Font">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorDropDown Name="RealFontSize" Text="Size">
                                                </telerik:EditorDropDown>
                                                <telerik:EditorTool Name="StripAll" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ColorToolbar">
                                                <telerik:EditorSplitButton Name="ForeColor" Text="Color">
                                                </telerik:EditorSplitButton>
                                                <telerik:EditorSplitButton Name="BackColor" Text="Background">
                                                </telerik:EditorSplitButton>
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="LinkToolbar">
                                                <telerik:EditorTool Name="LinkManager" Text="Change Link" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="AlignmentToolbar">
                                                <telerik:EditorTool Name="JustifyLeft" />
                                                <telerik:EditorTool Name="JustifyCenter" />
                                                <telerik:EditorTool Name="JustifyRight" />
                                                <telerik:EditorTool Name="JustifyFull" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="IndentToolbar">
                                                <telerik:EditorTool Name="Indent" />
                                                <telerik:EditorTool Name="Outdent" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ListToolbar">
                                                <telerik:EditorTool Name="InsertOrderedList" />
                                                <telerik:EditorTool Name="InsertUnorderedList" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="LineToolbar">
                                                <telerik:EditorTool Name="InsertHorizontalRule" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="FormatToolbar">
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Bold" ShortCut="CTRL+B / CMD+B" />
                                                <telerik:EditorTool Name="Italic" ShortCut="CTRL+I / CMD+I" />
                                                <telerik:EditorTool Name="Underline" ShortCut="CTRL+U / CMD+U" />
                                                <telerik:EditorTool Name="StrikeThrough" />
                                                <telerik:EditorSeparator />
                                                <telerik:EditorTool Name="Superscript" />
                                                <telerik:EditorTool Name="Subscript" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="ClipboardToolbar">
                                                <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A / CMD+A" />
                                                <telerik:EditorTool Name="Cut" ShortCut="CTRL+X / CMD+X" />
                                                <telerik:EditorTool Name="Copy" ShortCut="CTRL+C / CMD+C" />
                                                <telerik:EditorTool Name="Paste" ShortCut="CTRL+V / CMD+V" />
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="UndoToolbar">
                                                <telerik:EditorSplitButton Name="Undo">
                                                </telerik:EditorSplitButton>
                                                <telerik:EditorSplitButton Name="Redo">
                                                </telerik:EditorSplitButton>
                                            </telerik:EditorToolGroup>
                                            <telerik:EditorToolGroup Tag="PrintToolbar">
                                                <telerik:EditorTool Name="Print" ShortCut="CTRL+P / CMD+P" />
                                            </telerik:EditorToolGroup>
                                        </Tools>
                                    </telerik:RadEditor>
                                    <asp:Panel ID="pnloptionDisclaimerDefault" CssClass="formPanel" Visible="false"
                                        runat="server">
                                        <asp:Button ID="btnoptionDefault" CausesValidation="false" Text="Default" ToolTip="Click here to import the default option disclaimer"
                                            OnClick="btnoptionDefault_Click" runat="server" />
                                        <asp:Label ID="lbloptionDisclaimerDefault" Visible="false" runat="server"></asp:Label>
                                    </asp:Panel>
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </div>
                </ItemTemplate>
            </telerik:RadPanelBar>
        </AlternatingItemTemplate>
    </telerik:RadListView>
</asp:WizardStep>

 

 

Veselin Tsvetanov
Telerik team
 answered on 13 Jan 2016
1 answer
124 views

All,

 

I am new with Telerik and to this forum. I'm working on a Radgrid with a dropdown box that will be populated on pre-render. This works fine and the values come in as expected. However, when I try to grab them they will not appear in newValues. If I change the RadDropDownList back to a GrindBoundColumn the function works as expected.

Any help is appreciated! Thanks!

ASPX:

      <telerik:GridTemplateColumn HeaderText="Bin #" HeaderStyle-Width="260px" DataField="Bin_no" UniqueName="Mat_Bin_no">
                                        <ItemTemplate>
                                            <telerik:RadDropDownList runat="server" ID="rddBin_no" Width="250px" 
                                                DataTextField="Bin_no" DataValueField="Bin_no">
                                            </telerik:RadDropDownList>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>

 

VB:

  Private Function FindMaterialData(ByVal sender As Object, ByVal e As GridBatchEditingEventArgs, sOrdNo As String, sLoc As String) As Boolean
        Dim bErrorsFound As Boolean = False
        Dim p_iWisysReturnValue As Integer = 0
       
        Dim iSequenceNo As String
        Dim sItemNo As String
        Dim sBin As String
        Dim sSerialLot As String
        Dim dqty As Double
        Dim dtExpDate As Date
        Dim e2 As Telerik.Web.UI.GridItemEventArgs
        Dim bIsEdited As Boolean = True
        Dim lOffset As Long = 0
        
        
        For Each row As GridDataItem In rgMaterial.Items
                 
            Dim Command As GridBatchEditingCommand
            Try
                Command = e.Commands.Item(row.ItemIndex - lOffset)
                If Command.Item.DataSetIndex <> row.ItemIndex Then
                    bIsEdited = False
                    lOffset = lOffset + 1
                Else
                    bIsEdited = True
                End If
            Catch
                bIsEdited = False
            End Try
            
            iSequenceNo = row("Mat_seq_no").Text
            sItemNo = row("Mat_item_no").Text
            
          
            ''Edited rows
            If bIsEdited Then
                Dim newValues As Hashtable = Command.NewValues
                Dim oldValues As Hashtable = Command.OldValues
                
                sSerialLot = newValues("ser_lot_no")
                sBin = newValues("bin_no")
                dqty = newValues("QtyRemaining")
            Else
           
                'Non edited rows
                sSerialLot = row("Mat_ser_lot_no").Text
                sBin = row("Mat_bin_no").Text
                dqty = row("Mat_QtyRemaining").Text

            End If
            If dqty <> 0 Then
               doSomething()
            End If
        Next
        FindMaterialData = Not bErrorsFound
    End Function

Eyup
Telerik team
 answered on 13 Jan 2016
1 answer
155 views
I have a hierarchical grid with Filtering enabled. My Detail Tables no not have any filtering allowed. How do I hide the filter row for detail tables?
Eyup
Telerik team
 answered on 13 Jan 2016
1 answer
664 views
I looked at the sample code for OnCellSelected and OnCellSelecting but it just had limited information.  Is there a way to set the cell value in Javascript?  I imagine it's something like dataItem.set_value() but that's just a guess.  Thanks!
Eyup
Telerik team
 answered on 13 Jan 2016
3 answers
117 views
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!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>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
 
    </div>
    <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0" Skin="WebBlue">
<ExportSettings>
<Pdf>
<PageHeader>
<LeftCell Text=""></LeftCell>
 
<MiddleCell Text=""></MiddleCell>
 
<RightCell Text=""></RightCell>
</PageHeader>
 
<PageFooter>
<LeftCell Text=""></LeftCell>
 
<MiddleCell Text=""></MiddleCell>
 
<RightCell Text=""></RightCell>
</PageFooter>
</Pdf>
</ExportSettings>
 
        <ClientSettings AllowKeyboardNavigation="True">
            <Selecting CellSelectionMode="MultiCell" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
 
<MasterTableView ShowFooter="False">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
 
<ExpandCollapseColumn Visible="True"
        FilterControlAltText="Filter ExpandColumn column" Created="True">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
 
<BatchEditingSettings EditType="Cell"></BatchEditingSettings>
 
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
</MasterTableView>
 
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
 
        <SelectedItemStyle BackColor="#FF9999" />
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
    </telerik:RadGrid>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Highlight any cells in the grid above then click this button.  Do that twice, and notice how it is off by one column."
        onclick="RadButton1_Click" Height="112px" Width="1263px" Font-Size="Large">
    </telerik:RadButton>
    <p>
         </p>
    </form>
</body>
</html>

 

 

 

 

 

 

 

 

//the following is code-behind (default.aspx.cs) 
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
         
    protected void Page_Load(object sender, EventArgs e)
    {
        //populate RadGrid with test table data
        if (IsPostBack == false)
        {
            RadGrid1.DataSource = GenerateTestTable( );
            RadGrid1.DataBind();
        }
    }
 
    
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        //do something with selected/hilighted cells - WHY IS IT OFF BY ONE COLUMN?!?!?!?!?!?!?
        foreach (GridTableCell  item in RadGrid1.SelectedCells )
        {
            item.Text = "Hello!";
            item.BackColor = System.Drawing.Color.Aquamarine;
        }
    }
 
 
    static DataTable GenerateTestTable()
    {
        // create DataTable columns
        DataTable dt = new DataTable();
        for (int i = 0; i < 8; i++) { dt.Columns.Add("Column_" + i.ToString(), typeof(int)); }
 
        // create DataTable rows
        DataRow dr = null;
        for (int row = 0; row < 8; row++)
        {
            dr = dt.NewRow();
            for (int col = 0; col < 8; col++) { dr[col] = col +row*8; }
            dt.Rows.Add(dr);
        }
        
        return dt;
    }
 
 
}

 

 

// why is it off by one column?!?!?!?!?



Konstantin Dikov
Telerik team
 answered on 13 Jan 2016
2 answers
43 views

I have a master page that contains a radMenu. On another page, which uses this master page, my content contains a radPanelBar with various radPanelItems (links mostly) and then a radTabStrip. Inside those tabs our pageViews with radGrids and other content. 

 

So you have on the left side of the screen a menu, then a panel bar to the right of that. Then to the right of that a tab strip with it's PageView content displayed based on whichever tab is currently active. 

 The issue I'm seeing once I installed the new version of Telerik's controls is that the controls are laying on top of each other. The radPanelBar, instead of appearing to the right of the radMenu is actually underneath it. The tab strip is off to the right but the header of the page is over laying the menu as well. So all the positioning of all the rad controls is completely messed up. I'm just reporting this as a caution. The solution was easy. Just don't use the latest version of the Telerik controls. I could have posted the code but it would have been quite lengthy and I think with this you could replicate a test scenario using master pages with a Panel Bar and TabStrip.

 

Thanks,

 

Julian

Ivan Danchev
Telerik team
 answered on 13 Jan 2016
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?