Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
376 views
I am attempting to use the manual CRUD processing of data in my RadGrid via the DataForm.  I am using .net 4.5 and Visual Studo 2013, language VB.net. For the insert, I am able to display the insert form and enter data, the question I have is how to retrieve the entered values from the form in the code behind.  I want to interrogate the entered values and take some additional action before using a SQL stored procedure to insert the data.  The code from the _ItemInserting routine is:

        Dim sCatName as string
        Dim insertedItem As RadDataFormEditableItem = TryCast(e.DataFormItem, RadDataFormEditableItem)
        Dim newValues As New Hashtable()

        insertedItem.ExtractValues(newValues)

        For Each entry As DictionaryEntry In newValues

            sCatName = entry.Value

        Next

In this case the entry.value is NULL.

How do I get to the data?

Thanks 
Viktor Tachev
Telerik team
 answered on 13 Jan 2015
1 answer
400 views
hi,
i have a rad wizard with previous and next button and I made cancel button as save as draft . When I click next button and if there are any required field validators it shows the message to fill required field validators. When I cancel after having validation mesSages on the screen it's not firing cancel event because there are validations on the page . How to bypass the validations and on click of save as draft the event needs to be fired without checking any validations . Can you please help me in resolving this
Boyan Dimitrov
Telerik team
 answered on 13 Jan 2015
7 answers
472 views
How do I hide the data labels in a line chart.  I have a simple databound chart and I can't turn of the data labels on either series.
I have the ShowLabels value set to False...   I'm using the Q1-2010 beta

     <telerik:RadChart ID="RadChart3" runat="server" Width="800" Height="600px" DataSourceID="ssDatasource"  
            DefaultType="Line" SeriesOrientation="Vertical" Skin="Office2007" > 
            <ChartTitle> 
                <Appearance Position-AlignedPosition="Top"
                    <FillStyle MainColor=""></FillStyle> 
                </Appearance> 
                <TextBlock Text="Application Usage"
                    <Appearance TextProperties-Font="Tahoma, 13pt" TextProperties-Color="Black"></Appearance> 
                </TextBlock> 
            </ChartTitle> 
            <Series> 
                <telerik:ChartSeries Name="PeakUsages" Type="Line"
                    <Appearance ShowLabels="False"
                        <LabelAppearance Visible="false"></LabelAppearance> 
                    </Appearance> 
                </telerik:ChartSeries> 
                <telerik:ChartSeries Name="LicenseCount" Type="Line"
                    <Appearance ShowLabels="False"
                    </Appearance> 
                </telerik:ChartSeries> 
            </Series> 
            <Appearance TextQuality="AntiAlias"
            </Appearance> 
            <Legend Visible="False">  
            </Legend> 
            <PlotArea> 
                <Appearance Dimensions-Margins="18%, 5%, 25%, 5%"
                    <FillStyle MainColor="White" FillType="Solid"></FillStyle> 
                    <Border Color="134, 134, 134"></Border> 
                </Appearance> 
                <XAxis LayoutMode="Inside" AutoScale="false" DataLabelsColumn="UsageDate"
                    <Appearance ValueFormat="ShortDate" MajorGridLines-Visible="false"
                        <MajorGridLines PenStyle="Solid" Color="209, 222, 227" Visible="False" Width="0"></MajorGridLines> 
                        <LabelAppearance RotationAngle="300" Position-AlignedPosition="Top"
                        </LabelAppearance> 
                        <TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance> 
                    </Appearance> 
                </XAxis> 
                <YAxis AutoScale="false" IsZeroBased="true" AxisMode="Normal" MinValue="0" MaxValue="35"
                    <Appearance Color="134, 134, 134" MinorTick-Color="134, 134, 134" MinorTick-Width="0" MajorTick-Color="134, 134, 134"
                        <MajorGridLines Color="209, 222, 227"></MajorGridLines> 
                        <MinorGridLines Color="233, 239, 241"></MinorGridLines> 
                        <TextAppearance TextProperties-Color="51, 51, 51"></TextAppearance> 
                    </Appearance> 
                  </YAxis> 
            </PlotArea> 
        </telerik:RadChart> 
        <br /> 

Danail Vasilev
Telerik team
 answered on 13 Jan 2015
1 answer
159 views
I want when cell selected and over lich on any place on the page. that cell selected not be reset. Mean that cell keep selected state !! 
Please help
Nencho
Telerik team
 answered on 13 Jan 2015
1 answer
146 views
Hi, I have a problem with sorting and pagination in a radgrid.It is connected to a DataSource (dsMAV). If i set the SelectCommand in declarative mode then paging and sorting work.
If I declare the SelectCommand as empty string and then modify it at runtime when the page loads:

protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
dsMAV.SelectCommand = "SELECT IDRendicontazione, [Matricola], [CodiceFiscale], [Nominativo], [Importo], [F_Scrigno], [DataIncasso], [DataContabile], Disposizione, Transazione, [Causale], [NProvvisorio], [MavKey] FROM [Rendicontazioni]";
}
}

the first load works fine but pagination and sorting don't work, returning an empty result set.
If i take the assignment out of the if then it works. But I do not understand why in the first case doesn't work because the viewstate is enabled as default.
I need to understand this because the next step is to build a filter using a form and not the radgrid filter and I must change at runtime the SelectCommand.

Thanks a lot
Konstantin Dikov
Telerik team
 answered on 13 Jan 2015
1 answer
130 views
This is more of a feature request than anything else but I need functionality to drag and drop radgrid items to the diagram area to add an shape.
suspect this would be possible if i.e. OnClientMouseDrop would be available to create a shape manually but it is not.

The background to this Is I have a list (radgrid) of items (parts relevant to a image drawing) that I want to create 'image maps' from by simply drag and drop rows into the diagram, although an image map would be more relevant I thought about using raddiagram control instead as I had hoped to be able to use the diagram out of the box and add my image/drawing as a background to the diagram and simply add custom shapes by drag and drop rows from the grid, this is not the case and in general the control seem a bit under-developed at this stage.

If anyone has an suggestion as to how I can achieve my need to create a imagemap by drag and drop grid items I´m all ears!
also need to highlight the imagemap on row hoover and vice versa.

Christian
Vessy
Telerik team
 answered on 13 Jan 2015
3 answers
93 views
Hi,

I use an Excel Export from a RadGrid.
I would like to replace an image by a text.

This code worked fine before.
But it doesn't work any more since the last update or the previous one.is it the good way to do this ?

Many thanks for your help,
Bernard
...
aRadGrid.ExportSettings.Csv.ColumnDelimiter = GridCsvDelimiter.Semicolon;
            aRadGrid.ExportSettings.FileName = aFileName;
            aRadGrid.ExportSettings.HideStructureColumns = true;
            aRadGrid.ExportSettings.ExportOnlyData = true;
            aRadGrid.ExportSettings.IgnorePaging = true;
            aRadGrid.ExportSettings.OpenInNewWindow = true;

private void Export()
        {
            ((GridClientSelectColumn)aRadGrid.MasterTableView.GetColumn(XarcT.UN_S)).Visible = false;
            foreach (GridDataItem item in aRadGrid.Items)
            {
                if (item.ItemType == GridItemType.AlternatingItem)
                {
                    item.BackColor = Color.LightGray;
                };
                TableCell cell = (TableCell)item[XarcT.UN_L];
                bool aBool = (cell.Text == @"True");
                cell = (TableCell)item[XarcT.UN_Limg];
                cell.Text = (aBool ? @"L" : null);
            };
           if (dataContainer.xarcUaLstPrm.currentAction == XarcUaLstPrm.Action.Excel)
            {
                aRadGrid.MasterTableView.ExportToExcel();
            }
            else
            {
                aRadGrid.MasterTableView.ExportToCSV();
            };
        }
Maria Ilieva
Telerik team
 answered on 13 Jan 2015
1 answer
441 views
I have the following code in a table and the control is always left aligned:

<td style="text-align: center">
     <telerik:RadDateTimePicker ID="radDtStartDate" runat="server">
     </telerik:RadDateTimePicker>
</td>

How can I get this to be center aligned?

Mark
​
Angel Petrov
Telerik team
 answered on 13 Jan 2015
1 answer
109 views
This is related to my last post which was solved:
http://www.telerik.com/forums/radeditor-stripping-html-tags-i-need

The problem I am having is that it is adding <script> tags to the <head> tag based on other <script> tags in the document.
Also it is encoding scripts that I have in the page .. these are in  /* <![CDATA[ */ tags.
Why is the control doing this.

I just want to be able to put ANYTHING in the editor and save it WITHOUT the control changing or adding anything.  I don't think this is an unreasonable request.  I am trying to build a CMS system and I keep having to fight this control.  Please help.  How do I get the editor to stop automatically changing my entries?
This is the HTML for my RadEditor:
 
<telerik:RadEditor ID="reContent" runat="server" Skin="Office2010Blue" Height="850px" Width="100%" StripFormattingOptions="MSWordRemoveAll"<br>                                EmptyMessage="Add Content Here - Content is Required" NewLineMode="Br" OnClientLoad="OnClientLoad" ContentFilters="None"><br>                            </telerik:RadEditor>


In the code-behind I have this associated with it:
Me.reContent.DisableFilter(EditorFilters.RemoveScripts)
Me.reContent.EnableFilter(EditorFilters.None)


Thanks,
Jim
Ianko
Telerik team
 answered on 13 Jan 2015
1 answer
260 views
Hey

I want to use your sample Marker to create mine.

I use your javascript file :

(function(global, undefined) {
 
    function OnMarkerCreated(e) {
        var marker = e.marker,
            tooltip = marker.options.tooltip,
            countryFlag = marker.dataItem.country.toLowerCase(),
            newTemplate = tooltip.template;
 
 
        countryFlag = countryFlag.replace(/\s/g, "");
        newTemplate = newTemplate.replace(/class='flag'/i, "class='flag flag-" + countryFlag + "'");
        tooltip.template = newTemplate;
 
        // The following custom functionality is built due to design decision that tooltips with autoHide="false"
        // should hide previously opened tooltips.
        setTimeout(function () {
            addShowHandler(marker);
        }, 0);
    }
 
    function addShowHandler(marker) {
        var tooltip = marker.element.getKendoTooltip();
        tooltip.bind("show", hideAllNonValidPopups);
    }
 
    function hideAllNonValidPopups(e) {
        var shownPopup = e.sender.popup.element[0],
            $ = $telerik.$,
            tooltipCollection = $(".k-tooltip");
 
        tooltipCollection.each(function () {
            var that = this;
 
            if (that != shownPopup) {
                $(that).getKendoPopup().close();
            }
        })
    }
    global.OnMarkerCreated = OnMarkerCreated;
 
})(window);

And your Default.aspx

<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>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js">
                </asp:ScriptReference>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js">
                </asp:ScriptReference>
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadClientDataSource runat="server" ID="RadClientDataSource1">
            <DataSource>
                <WebServiceDataSourceSettings>
                    <Select DataType="JSON" Url="JSON/MarkersData.json" />
                </WebServiceDataSourceSettings>
            </DataSource>
        </telerik:RadClientDataSource>
        <div class="demo-container size-auto">
            <h2 class="mapTitle">TELERIK OFFICES</h2>
            <telerik:RadMap runat="server" ID="RadMap1" Zoom="2" CssClass="MyMap" LayersDataSourceID="">
                <CenterSettings Latitude="23" Longitude="10" />
                <LayersCollection>
                    <telerik:MapLayer Type="Tile" Subdomains="a,b,c"
                        UrlTemplate="http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png"
                        Attribution="© <a href='http://osm.org/copyright' title='OpenStreetMap contributors' target='_blank'>OpenStreetMap contributors</a>.">
                    </telerik:MapLayer>
                    <telerik:MapLayer Type="Marker" Shape="PinTarget" ClientDataSourceID="RadClientDataSource1" LocationField="location">
                        <TooltipSettings AutoHide="false" Width="300"
                            Template="<div class='leftCol'><div class='flag'></div></div><div class='rightCol'><div class='country'>#= marker.dataItem.country #</div><div class='city'>#= marker.dataItem.city #</div><div class='address'>#= marker.dataItem.address #</div><div class='address'>#= marker.dataItem.address2 #</div><div class='phone'>p #= marker.dataItem.phone #</div><div class='email'>e <a href='mailto:#= marker.dataItem.email #'>#= marker.dataItem.email #</a></div><div class='location'>Location:#= location.lat #, #= location.lng #</div></div>">
                            <AnimationSettings>
                                <OpenSettings Duration="300" Effects="fade:in" />
                                <CloseSettings Duration="300" Effects="fade:out" />
                            </AnimationSettings>
                        </TooltipSettings>
                    </telerik:MapLayer>
                </LayersCollection>
                <ClientEvents OnMarkerCreated="OnMarkerCreated" />
            </telerik:RadMap>
            <div id="contactsContainer">
            </div>
        </div>
    </form>


Now i want to create my PinMarker in my codeBiehind, like this :
protected void Page_Load(object sender, EventArgs e)
{
       MapMarker myMarker = new MapMarker();
       myMarker.Shape = MarkerShape.PinTarget.ToString();
       myMarker.Title = "Test";
       myMarker.LocationSettings.Latitude = 0;
       myMarker.LocationSettings.Longitude = 0;
        
       RadMap1.MarkersCollection.Add(myMarker);
}


And now, how can I put the template of your ToolTipSetting etc on my PinTarget ?

But look, this is my result :
http://puu.sh/ehc4D/991a1123c6.png


Can you help me ?

Ianko
Telerik team
 answered on 13 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?