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

Hi,

When I click on an element in a RadToolBar on Chrome (version 43), the element stay with the class rtbItemFocused. This leaves the element highlighted. Is it a known issue? Or do I miss something?

On the other hand on IE 11 the behavior is as I expect; the element does not have the rtbItemFocused class after it has been clicked. Therefore it is not highlighted.

Any ideas?

Thanks.

Ivan Danchev
Telerik team
 answered on 04 Jun 2015
1 answer
192 views

I'm attempting to take control of the Arrow Key navigation in my RadGrid, but it does not appear that set_cancel(true) works.  I have tried a number of different things, but it still won't cancel the Arrow Keys.  I would appreciate any assistance (using the latest version of Grid).  The KeyPress event fires, but no keys are cancelled.

 function KeyPress(sender, eventArgs)

                {
                    if (eventArgs.get_keyCode() == 39) {
                        eventArgs.set_cancel(true);
                        eventArgs.get_domEvent().stopPropagation();
                        eventArgs.get_domEvent().preventDefault();

                    }
                }

Eyup
Telerik team
 answered on 04 Jun 2015
7 answers
410 views

I assign static images to RadMenuItems via the ImageUrl property, and now would like to use image sprites instead.

Because I could not find a way to do this, I next tried to configure each RadMenuItem by setting the Text value " " and a CssClass with an appropriate background image in the code behind Page_Load. But I would like to change the class on the client side, and cannot figure out how to do that. Besides, this seems like a pretty messy kludge.

What is the recommended way forward?

 

 

Resources

Current functioning RadMenu can be found in the upper right corner of this site: https://an.rsl.wustl.edu/msl/mslbrowser  -- It's the Account / Cart / Help menu.

Here is what I was trying with the CssClass approach. The RadMenu declaration on the client side:

 

<div>
  <telerik:RadAjaxManager runat="server" ID="ram"></telerik:RadAjaxManager>
  <telerik:RadScriptManager runat="server" ID="rsm"></telerik:RadScriptManager>
  <asp:PlaceHolder runat="server" ID="phTop"></asp:PlaceHolder>
  <br />
  <asp:Button runat="server" ID="bTest" Text="Test" OnClick="bTest_Click" />
  <br />
  <telerik:RadButton runat="server" ID="rbTest2" OnClientClicked="setCartIconFull" AutoPostBack="False"></telerik:RadButton>
  <asp:PlaceHolder runat="server" ID="phBottom"></asp:PlaceHolder>
 
  <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
  <telerik:RadTabStrip runat="server" ID="rts">
    <Tabs>
      <telerik:RadTab runat="server" Text="Mission" Value="rtMiss"></telerik:RadTab>
      <telerik:RadTab runat="server" Text="<span class='i-s-nav-n-s16Sol vaMid'></span> Sol" Selected="True"></telerik:RadTab>
      <telerik:RadTab runat="server" Text="<span class='i-s-nav-n-s16maps vaMid'></span> Maps"></telerik:RadTab>
    </Tabs>
  </telerik:RadTabStrip>
 
 
  <asp:Label runat="server" ID="l1" CssClass="is-nav-16-CC"></asp:Label>
  <asp:Label runat="server" ID="l2" CssClass="is-nav-16-CCw"></asp:Label>
  <asp:Label runat="server" ID="l3"></asp:Label>
  <span class="is-nav-16-CC" style="height: 16px; width: 16px;"></span>
</div>
<img src="i/n/s16null.png" />
<asp:ImageButton runat="server" ID="ibTest" CssClass="is-nav-32-cartMenuEmpty" Width="70" Height="32" />
<div>
  <telerik:RadMenu runat="server" ID="rmTest" ClickToOpen="True" Height="40" Width="505"
    EnableShadows="True" Style="z-index: 2900">
    <Items>
      <telerik:RadMenuItem runat="server" Value="rmiBarAccount">
        <GroupSettings OffsetX="0" OffsetY="4"></GroupSettings>
        <Items>
        </Items>
      </telerik:RadMenuItem>
      <telerik:RadMenuItem runat="server" Value="rmiBarHelp" Text=" ">
        <GroupSettings OffsetX="0" OffsetY="4"></GroupSettings>
        <Items>
        </Items>
      </telerik:RadMenuItem>
      <telerik:RadMenuItem runat="server" Value="rmiBarCart" Text=" ">
        <GroupSettings OffsetX="0" OffsetY="4"></GroupSettings>
        <Items>
        </Items>
      </telerik:RadMenuItem>
      <telerik:RadMenuItem runat="server" Value="rmiBarNon" Text=" ">
        <GroupSettings OffsetX="0" OffsetY="4"></GroupSettings>
        <Items>
        </Items>
      </telerik:RadMenuItem>
    </Items>
  </telerik:RadMenu>
</div>

 

 

The code behind configuration:​

 

RadMenuItem rmiAcct = rmTest.FindItemByValue("rmiBarAccount");
rmiAcct.Text = " ";
rmiAcct.CssClass = "is-nav-32-accountMenuSignedOut-rmi";
 
RadMenuItem rmiCart = rmTest.FindItemByValue("rmiBarCart");
rmiCart.Text = " ";
rmiCart.CssClass = "is-nav-32-cartMenuEmpty-rmi";
 
 
RadMenuItem rmiHelp = rmTest.FindItemByValue("rmiBarHelp");
rmiHelp.Text = " ";
rmiHelp.CssClass = "is-nav-32-ucMenuHelp-rmi";
 

 

 My CSS classes (using sprites):

.is-nav-32-accountMenuSignedIn-rmi .rmText {
  width: 128px;
  height: 32px;
  background: url('../i/s/_nav32Sprite.png') -1px -1px;
  width: 112px   /* correct for goofy RadMenu*/
  height: 31px/* correct for goofy RadMenu*/ }
 
.is-nav-32-accountMenuSignedOut-rmi .rmText {
  width: 128px;
  height: 32px;
  background: url('../i/s/_nav32Sprite.png') -130px -1px;
  width: 112px/* correct for goofy RadMenu*/
  height: 31px/* correct for goofy RadMenu*/
}
 
.is-nav-32-cartMenuEmpty-rmi .rmText {
  width: 70px;
  height: 32px;
  background: url('../i/s/_nav32Sprite.png') -325px -1px;
  width: 54px/* correct for goofy RadMenu*/
  height: 31px/* correct for goofy RadMenu*/
}
 
.is-nav-32-cartMenuFull-rmi .rmText {
  width: 70px;
  height: 32px;
  background: url('../i/s/_nav32Sprite.png') -396px -1px;
  width: 54px/* correct for goofy RadMenu*/
  height: 31px/* correct for goofy RadMenu*/
}
 
.is-nav-32-ucMenuHelp-rmi .rmText {
  width: 55px;
  height: 32px;
  background: url('../i/s/_nav32Sprite.png') -1554px -1px;
  width: 39px/* correct for goofy RadMenu*/
  height: 31px/* correct for goofy RadMenu*/
}
 
div.RadMenu .rmLink {
  padding: 0;
}

 

The sprite image is attached.

 

Tom
Top achievements
Rank 1
 answered on 04 Jun 2015
4 answers
552 views
Wondering if this is possible - that is, to edit a radgrid row that has a "multiselect" field that displays a comma separated list when viewed in the grid, but when the row is edited InPlace there is a way to select multiple items (and thus get and save their ID values), for example using RadComboBox with CheckBoxes=true, or even an autocomplete box that allows multiselection.

How to populate the box - how to populate and select items on editing the row, and how to get multiple values back on saving.

Possible? If so any examples out there?

Thanks
Maria Ilieva
Telerik team
 answered on 04 Jun 2015
1 answer
179 views

Hello,

 I'm having problems getting RadDatePicker to work.  It does not show the calendar when I click on the Icon, and the page throws errors when it reloads.

I'm setting the RadDatePicker with code.  Here are snippets of my code and some error screenshots:

_________________________________

<body style="background-color:lightsteelblue;height:100%;margin:0px">
    <form id="frmQuery" runat="server">
    <div>
    <telerik:RadScriptManager runat="server"></telerik:RadScriptManager>
        <asp:Timer ID="Timer1" runat="server" Enabled="false"></asp:Timer>
    <table border="0" width="100%">
        <tr>
            <td colspan="2">
                <center>
                <table border="0">
                    <tr>
                        <td>
                            <asp:Button ID="btnExport" runat="server" Text="Export" />
                        </td>
                        <td>
                            <asp:Button ID="btnPost" runat="server" Text="Post" />
                        </td>
                        <td>
                            <asp:Button ID="btnGIS" runat="server" Text="GIS" Visible="false" />
                        </td>
                        <td>
                            <asp:Label ID="lblCount" runat="server" Text="Records Showing: 0" style="font-family:Calibri;font-size:8pt;color:cadetblue"></asp:Label>
                        </td>
                    </tr>
                </table>
                </center>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <hr />
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="pnlFilters" runat="server" style="height:600px;border-right: thin solid white; width:300px">
                <table border="0">
                    <tr>
                        <td>
                            <center>
                            <asp:Label ID="lblHdr" runat="server" Text="Filters" style="font-family:Calibri;font-size:10pt;color:white"></asp:Label>
                            </center>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Table ID="tblFilters" runat="server"></asp:Table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <center>
                            <asp:Button ID="btnRefresh" runat="server" Text="Refresh" />
                            </center>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblWarning" runat="server" style="font-family:Calibri;font-size:8pt;color:cadetblue" Visible="false" Text=""></asp:Label>
                        </td>
                    </tr>
                 </table>
                 </asp:Panel>
            </td>
            <td>
                <asp:Panel ID="pnlGrid" runat="server"  Style="height:600px;">
                <telerik:RadGrid ID="grdResults" OnPageIndexChanged="grdList_PageIndexChanged" OnSortCommand="grdList_SortCommand" OnGroupsChanging="grdResults_GroupsChanging" ShowGroupPanel="true"
                    ShowFooter="true" AllowSorting="True" AllowPaging="True" PageSize="5"  AutoGenerateColumns="False" ShowStatusBar="true" runat="server">
                     <PagerStyle Mode="NumericPages"></PagerStyle>
                    <MasterTableView CommandItemDisplay="Top" DataKeyNames="SalesCode" Name="SalesCodes"> 
                    <CommandItemSettings ShowSaveChangesButton="false" ShowCancelChangesButton="false" ShowRefreshButton="false" ShowAddNewRecordButton="false"/>
                    </MasterTableView>
                </telerik:RadGrid>
                <br /><br />
                    <asp:Label ID="lblErrMsg" runat="server" style="font-family:Calibri;font-size:10pt;color:red" Text=""></asp:Label>
                </asp:Panel>
            </td>
        </tr>

    </table>
    </div>
    </form>
</body>

________________________________________________

                        lbl = New Label
                        lbl.ID = "dmslbl" & Trim(Str(rsCtrl.Item("FieldID")))
                        lbl.Text = rsCtrl.Item("FieldCaption")
                        lbl.Width = 100
                        lbl.CssClass = "hdrText"

radDate = New RadDatePicker
                        If Not IsDBNull(rsCtrl.Item("FieldDefault")) Then
                            radDate.ID = "dmsdat" & rsCtrl.Item("FieldName") & "|" & rsCtrl.Item("FieldDefault").ToString & "|" & rsCtrl.Item("FieldOperand")
                            Dim dDate As DateTime
                            Select Case rsCtrl.Item("FieldDefault")
                                Case "TODAY"
                                    radDate.SelectedDate = CDate(FormatDateTime(Now, DateFormat.ShortDate))
                                Case "MONTHSTART"
                                    dDate = Now
                                    dDate = dDate.AddDays(-(dDate.Day - 1))
                                    radDate.SelectedDate = CDate(FormatDateTime(dDate, DateFormat.ShortDate))
                                Case "YEARSTART"
                                    dDate = Now
                                    dDate = dDate.AddDays(-(dDate.DayOfYear - 1))
                                    radDate.SelectedDate = CDate(FormatDateTime(dDate, DateFormat.ShortDate))
                                Case Else
                                    radDate.SelectedDate = rsCtrl.Item("FieldDefault")
                            End Select
                        Else
                            radDate.ID = "dmsdat" & rsCtrl.Item("FieldName") & "||" & rsCtrl.Item("FieldOperand")
                        End If

                        fTbl = New TableRow
                        lblCol = New TableCell
                        lblCol.Controls.Add(lbl)
                        Dim dteCol As New TableCell
                        dteCol.Controls.Add(radDate)
                        fTbl.Cells.Add(lblCol)
                        fTbl.Cells.Add(dteCol)
                        tblFilters.Rows.Add(fTbl)

__________________________________________________

Unhandled exception at line 3, column 67270 in http://localhost:49646/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl03_TSM&compress=1&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=4.1.60623.0,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:187c1d17-2715-476f-9eeb-4fd46e2849ea:ea597d4b:b25378d2;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:590e1033-87cd-478b-b29a-dce35b1ad7e0:76254418;Telerik.Web.UI,+Version=2014.3.1209.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:02f074e8-49c0-421d-b27f-4d0b69725ea6:16e4e7cd:f7645509:8674cba1:7c926187:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029

0x800a138f - Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined

______________________________________________________

​

Eyup
Telerik team
 answered on 04 Jun 2015
16 answers
665 views
Hi,

Can you tell me how to loop through all the filter items on a grid and get the unique name, type and selected value of each item.  I would like to achieve this on a button click.

For Example,

Protected

 

Sub btnSettings_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSettings.Click

 

 

For Each filterItem As GridFilteringItem In rgvEmployees.MasterTableView.GetItems(GridItemType.FilteringItem)

 

 

'Loop through each item and get uniquename, type and selectedvalue        

 

 

Next

 


Thank you for your help.
Tracy
Kader
Top achievements
Rank 1
 answered on 04 Jun 2015
2 answers
317 views

i need to set the grid bound column value but using javascript when checkbox is checked or uncheked and set all rows value when i clicked select all checkox.

i can do it easily with server side code but i need to do it with client side.

Muhammad
Top achievements
Rank 1
 answered on 04 Jun 2015
5 answers
193 views

I use Html.Telerik (). Grid and I bind the event Update on the controller method. The editing line is feeding well, but I can not click the submit button that triggers nothing ...
IE and FF, it works very well ...
I'm on the 2012.3.1018 version 2013.2.611 I update in version but it did not change anything!

Can you help me please?

Thank you for your return.
Maria Ilieva
Telerik team
 answered on 04 Jun 2015
1 answer
127 views

Hello, 

I have a Simple RadGrid that is using Export to Excel.  When running locally on Visual Studio 2012 i have no issues.  When it runs on the prduction server using IIS 8 I get blank spread sheets. 

 

Markup: 

<telerik:radgrid id="rgCReport" runat="server" datasourceid="LinqDataSource1" autogeneratecolumns="false" allowpaging="True"
             allowsorting="True" clientsettings-resizing-allowcolumnresize="true" enabletheming="False"
             pagesize="20" cellspacing="0" gridlines="None">
             <ExportSettings>
                <Excel Format="ExcelML" />
             </ExportSettings>
             <MasterTableView  PagerStyle-Mode="NextPrevAndNumeric" AutoGenerateColumns="false" EditMode="InPlace" >
                 <NoRecordsTemplate>
                     No Request Found
                 </NoRecordsTemplate>
                
                 <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                 </RowIndicatorColumn>
                 <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                 </ExpandCollapseColumn>
                 <Columns>
                     <telerik:GridBoundColumn DataField="Created" HeaderText="Created" SortExpression="Created"
                         UniqueName="Created" DataFormatString="{0:d}<br/>{0:t}">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="DealerName" HeaderText="Dealer Name" SortExpression="DealerName"
                         UniqueName="DealerName">
                         <HeaderStyle Width="110px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" SortExpression="FirstName"
                         UniqueName="FirstName">
                         <HeaderStyle Width="110px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" SortExpression="LastName"
                         UniqueName="LastName">
                         <HeaderStyle Width="110px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="Phone" SortExpression="PhoneNumber"
                         UniqueName="PhoneNumber">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Email" HeaderText="Email" SortExpression="Email"
                         UniqueName="Email">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="DealerCity" HeaderText="Dealer City" SortExpression="DealerCity"
                         UniqueName="DealerCity">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="DealerState" HeaderText="Dealer State" SortExpression="DealerState"
                         UniqueName="DealerState">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="PCMethod" HeaderText="Contact Method" SortExpression="PCMethod"
                         UniqueName="PCMethod">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                     <telerik:GridBoundColumn DataField="Comments" Display="false" HeaderText="Comments" SortExpression="Comments"
                         UniqueName="Comments">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="CarModel" Display="false" HeaderText="Model" SortExpression="Comments"
                         UniqueName="CarModel">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="CarVin" Display="false" HeaderText="Vin" SortExpression="Comments"
                         UniqueName="CarVin">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="CarYear" Display="false" HeaderText="Year" SortExpression="Comments"
                         UniqueName="CarYear">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
                      <telerik:GridBoundColumn DataField="CarMake" Display="false" HeaderText="Make" SortExpression="Comments"
                         UniqueName="CarMake">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
 
                     <telerik:GridBoundColumn DataField="Preferred" HeaderText="Preferred" SortExpression="Preferred"
                         UniqueName="Preferred">
                         <HeaderStyle Width="68px" />
                     </telerik:GridBoundColumn>
 
 
                 </Columns>
                 <EditFormSettings>
                     <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                     </EditColumn>
                 </EditFormSettings>
             </MasterTableView>
   
             <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
             </HeaderContextMenu>
         </telerik:radgrid>

 

Code Behind:

protected void exportBtn_Click(object sender, EventArgs e)
 {
 
     this.rgCReport.MasterTableView.GetColumn("Comments").Display = true;
     this.rgCReport.MasterTableView.GetColumn("CarModel").Display = true;
     this.rgCReport.MasterTableView.GetColumn("CarVin").Display = true;
     this.rgCReport.MasterTableView.GetColumn("CarYear").Display = true;
     this.rgCReport.MasterTableView.GetColumn("CarMake").Display = true;
     this.rgCReport.ExportSettings.FileName = "Dealer Contact Report";
     this.rgCReport.ExportSettings.ExportOnlyData = true;
     this.rgCReport.ExportSettings.IgnorePaging = true;
     this.rgCReport.MasterTableView.ExportToExcel();
 
 }


 Is there something i can check to see why this is happening? there are no console errors in browser. 


Kostadin
Telerik team
 answered on 04 Jun 2015
1 answer
70 views
I need to create a table script as displayed in attached image .the text should be on top of image.Please help as it will decide whether to use telerik control or not.
Nencho
Telerik team
 answered on 04 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?