Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
70 views

Hello together,

 I'm currently playing around with the RadEditor-Control.

 And of course I want to use correct localizations.

In our existing solution, where this control is going to be used we use a ResourceProvider (https://msdn.microsoft.com/en-us/library/aa905797.aspx).

 

The telerik control uses this provider as it is declared in our web.config.

 

If the localization should work right, I'd have to copy all resource keys from the telerik resource files into our resource files which can or will result in duplicates.

To have the possibility to devide between our and your keys a customizable localization prefix would be nice.

At least I'd find it good, if your resource keys already had an prefix like "Tel_"...

 

I don't want to add an functionality for looking into different resourcemanagers.

 

Maybe I didn't search well enough to find a good and clean solution for this issue.

 

Thx in advance

Andreas

 

Vessy
Telerik team
 answered on 04 Jun 2015
1 answer
165 views

Environment:

- VS2010

- ASP.NET 2.0 

- Telerik Web 2010 Q3 (Telerik.Web.UI_2010_3_1317_Dev.msi)

The popup calendar on my RadDatepicker is not displaying properly in Chrome.  See attached image.  

I have several RadDatePicker control on my page.  The first one pops up and display correctly.  The succeeding RadDatePicker controls display out of position.  See the attached  image for reference.  

 The controls works fine in IE and Firefox.

 

Konstantin Dikov
Telerik team
 answered on 04 Jun 2015
1 answer
148 views

HI,

I have a hierarchical RadTreeList using TreeListTemplateColumns - in one of these template columns I have a label (hidden) and a RadGrid,  the purpose of the Label is to make available an ID to use to bind the RadGrid.  

If I try to put this ID into either the ParentDataKeyNames, DataKeyNames or both the treelist does not display, this is why it is in a label.

I am trying to use the OnNeedDataSource Event of the RadGrid to bind the data to it, however I cannot find / get the value from the label.

I have tried TreeListDataItem Item = (TreeListDataItem)(grid.NamingContainer); to reference the column but I just cant seem to get it right.  

01.<telerik:TreeListTemplateColumn UniqueName="Firmware" HeaderText="Firmware">
02.    <ItemTemplate>
03.        <asp:Label ID="lblPartNumberDetailsId" runat="server" Text='<%#Eval("PartNumberDetails_Id") %>' Visible="false" />
04. 
05.          <telerik:RadGrid ID="RGFirmware" runat="server" Visible="true" AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false"
06.            MasterTableView-EditMode="InPlace" AllowAutomaticInserts="true" OnNeedDataSource="RGFirmware_NeedDataSource" OnInsertCommand="RGFirmware_InsertCommand">
07.            <MasterTableView CommandItemDisplay="bottom">
08.                <CommandItemSettings AddNewRecordText="Add Firmware" ShowAddNewRecordButton="false" ShowRefreshButton="false" />
09.                <CommandItemTemplate>
10.                    <asp:LinkButton ID="AddFirmware" runat="server" Text="Add Firmware" CommandName="InitInsert" />
11.                </CommandItemTemplate>
12.                <NoRecordsTemplate></NoRecordsTemplate>
13.                <Columns>
14.                    <telerik:GridTemplateColumn UniqueName="FirmWare">
15.                        <ItemTemplate>
16.                            <asp:TextBox ID="txtFirmware" runat="server" Text='<%#Eval("FirmWare") %>' />
17. 
18.                        </ItemTemplate>
19.                        <EditItemTemplate>
20.                            <asp:TextBox ID="txtFirmware" runat="server" Text='<%#Eval("FirmWare") %>' />
21. 
22.                        </EditItemTemplate>
23.                    </telerik:GridTemplateColumn>
24.                </Columns>
25.            </MasterTableView>
26.        </telerik:RadGrid
27.    </ItemTemplate>
28.</telerik:TreeListTemplateColumn>

 

01.protected void RGFirmware_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
02.{
03.    RadGrid grid = sender as RadGrid;
04.    TreeListDataItem item = (TreeListDataItem)(grid.NamingContainer);
05.    string Value = ((Label)item["PartNumberDetails_Id"].FindControl("lblPartNumberDetailsId")).Text.ToString();
06. 
07.    if (!String.IsNullOrEmpty(Value))
08.    {
09.        DataTable objDT = new DataTable("TempTable");
10.        List<SqlParameter> parameters = new List<SqlParameter>();
11.        parameters.Add(new SqlParameter("@PartNumberDetailsId", Value));
12.        objDT = DataAccess.BuildDataTable("SelectFirmwareForPart", parameters);
13.        grid.DataSource = objDT;
14.    }
15.    else
16.    {
17.        grid.Visible = false;
18.    }
19.}

 

Any help is much appreciated

Chris

Chrisbarm
Top achievements
Rank 1
 answered on 04 Jun 2015
5 answers
192 views
Hi ,

I have a radwindow which opens as model pop up. Its working fine IE6.
I am migrating my application to IE8. In IE8 it opens a pop up window but immediately it closes.

Below is code:

Javascript function:

 function OpenAddWindow()
         {
             window.radopen('activitydetail.aspx', 'AddActivity')
         }
Wep page

 

<

 

radW:RadWindowManager ID="RadWindowManager1" runat="server">

 

 

 

 

 

<Windows>

 

 

 

 

 

<radW:RadWindow

 

 

 

 

 

Modal="true"

 

 

 

 

 

ReloadOnShow="true"

 

 

 

 

 

ID="AddActivity"

 

 

runat="server" Width="450" Height="350"

 

 

 

 

 

NavigateUrl="activitydetail.aspx"

 

 

 

 

 

OnClientClose="ClientCallWindow" />

 

 

</Windows>

 

 

 

 

 

</radW:RadWindowManager>

 

 

 

 

<

 

button  id="btnAddAct" onclick="OpenAddWindow()">Add Activity</button>

 

 

 



Danail Vasilev
Telerik team
 answered on 04 Jun 2015
1 answer
89 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
170 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
360 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 "&nbsp;" 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
505 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
161 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
620 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
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?