Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
85 views
We're using a localised (nl-NL) version of the editor.

In the table properties dialog, there is the option to bring up a style editor popup.
That dialog has many empty/invisible language strings, eg. most of the dropdowns there seem to be empty.

Possibly this is because of missing NL translations?

If so:
1) Why doesn't the dialog display the non-translated english default strings instead of nothing?
2) Which RESX file to we need to translate to get NL language strings for that style editor?

And if this is not because of missing NL translations: what is the cause then?

Ianko
Telerik team
 answered on 05 Jun 2014
2 answers
77 views
I have a grid with a clientselectcolumn that allows multiple row selection. When I check the header check box only the rows on the visible page get checked, not all of the rows for all pages.Is this how the header check box is supposed to work? If so, how do I force it to select all rows for all pages? Also, is there a list of command names that I can trap for in the itemcommand event. I have "RowClick" for single rows but is there one for the header click?

Thanks,
Dennis
dhuss
Top achievements
Rank 1
 answered on 05 Jun 2014
4 answers
578 views
I have tried numerous approaches to prevent the default drop zone that is added by the AsynUpload to the page from showing or firing its drag events but have come up empty handed.  As you can see by looking at my source code:

<div class="ssbUploaderDropZone">
    <asp:Label runat="server" ID="lblTop" CssClass="ssbLabel ssbTopLabel"></asp:Label>
    <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload" CssClass="ssbImageUploader" DropZones=".ssbUploaderDropZone">
    </telerik:RadAsyncUpload>
    <asp:Label runat="server" ID="lblBottom" CssClass="ssbLabel ssbBottomLabel"></asp:Label>
</div>
<asp:HiddenField runat="server" ID="hdnOrganizationNameFolder" />
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" RenderMode="Inline" style="display:none;">
    <%--Provide support for this element when it is updated by RadAjaxManager or RadAjaxPanel--%>
    <telerik:RadScriptBlock runat="server">
        <script>
            AsyncUploader.initialize('<%=this.ClientID%>');
        </script>
    </telerik:RadScriptBlock>
</telerik:RadAjaxPanel>
<telerik:RadCodeBlock runat="server" ID="RadCodeBlock">
    <script>
        $(document).ready(function () {
            AsyncUploader.initialize('<%=this.ClientID%>');
        });
    </script>
</telerik:RadCodeBlock>

/// <summary>
/// Wraps the usercontrol in a container div that is the ID of the usercontrol.
/// </summary>
/// <param name="writer"></param>
protected override void Render(HtmlTextWriter writer)
{
    //Add a containing div element
    writer.Write("<div id=\"" + this.ClientID + "\" class=\"ssbUploaderContainer\">");
    base.Render(writer);
    writer.Write("</div>");
}


.ruDropZone {
    display: none !important;
}

// -------------------------------------------------- //AsyncUploader
// Async Uploader
// -------------------------------------------------- //
 
function AsyncUploader() {
        // Avoid using the window scope:
        // return a new util object if we're in the wrong scope
        if (window === this) {
            return new AsyncUploader();
        }
  
        // Return the object
        return this;
};
 
// Prototype Functions
AsyncUploader.prototype = {
    initialize: function (controlID) {
        /// <summary>Initialize the AsyncUploader control</summary>
        /// <param name="controlID" type="String">The ID of the AsyncUpload control to initialize</param>
        control = $("[id$='" + controlID + "']");
        if (control[0]) {
            var dropZone = $(control).find(".ssbUploaderDropZone");
            dropZone.bind({ "dragenter": function (e) { AsyncUploader.dragEnter(e, dropZone); } });
            dropZone.bind({ "dragleave": function (e) { AsyncUploader.dragLeave(e, dropZone); } });
            dropZone.bind({ "drop": function (e) { AsyncUploader.drop(e, dropZone); } });
        }
    },
    dragEnter: function (e, dropZone) {
        /// <summary>Handles the DragEnter event</summary>
        /// <param name="e" type="Event">The event that has occurred</param>
        /// <param name="dropZone" type="DOM Element">The dropZone DOM element</param>
        $(dropZone).css('border', '1px solid #000000');
        $(dropZone).addClass('ssbUploaderDropZoneDragEnter');
    },
    dragLeave: function (e, dropZone) {
        /// <summary>Handles the DragLeave event</summary>
        /// <param name="e" type="Event">The event that has occurred</param>
        /// <param name="dropZone" type="DOM Element">The dropZone DOM element</param>
        $(dropZone).css('border', '0px none');
        $(dropZone).removeClass('ssbUploaderDropZoneDragEnter');
    },
    drop: function (e, dropZone) {
        /// <summary>Handles the Drop event</summary>
        /// <param name="e" type="Event">The event that has occurred</param>
        /// <param name="dropZone" type="DOM Element">The dropZone DOM element</param>
        $(dropZone).css('border', '0px none');
        $(dropZone).removeClass('ssbUploaderDropZoneDragEnter');
    }
};
 
//intialize SimplePopover for use
var AsyncUploader = new AsyncUploader();

What I am trying to do is create a custom drop zone that encompasses the AsnycUpload control and two label controls.  However, the default drop zone that the AsyncUpload also adds to the page is still added to the control as well, and as a result, the dragenter event of the default drop zone fires when you drag a file over the AsyncUpload elements (<ul> and <li> that have a dragenter event set).  I and several developers at my company have attempted to unbind the dragenter events, but it seems like they are impossible to do so.
Hristo Valyavicharski
Telerik team
 answered on 05 Jun 2014
5 answers
537 views
Hello Telerik.
I have to make RadUpload Control width=100%.

I set to width property "100%" but it wasn't work.

please let me know how can i make sure width property 100%?
Magdalena
Telerik team
 answered on 05 Jun 2014
1 answer
77 views
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

namespace MFP_ASP
{
public class CustomFilteringColumn : GridBoundColumn
{
private object listDataSource = null;
//RadGrid calls this method when it initializes the controls inside the filtering item cells
protected override void SetupFilterControls(TableCell cell)
{
base.SetupFilterControls(cell);
cell.Controls.RemoveAt(0);
DropDownList list = new DropDownList();
list.ID = "list" + this.DataField;
list.AutoPostBack = true;
list.SelectedIndexChanged += new EventHandler(list_SelectedIndexChanged);
cell.Controls.AddAt(0, list);
cell.Controls.RemoveAt(1);
list.DataTextField = this.DataField;
list.DataValueField = this.DataField;
list.DataSource = this.ListDataSource;
}
void list_SelectedIndexChanged(object sender, EventArgs e)
{
GridFilteringItem filterItem = (sender as DropDownList).NamingContainer as GridFilteringItem;
if (this.DataType == System.Type.GetType("System.Int32") || this.DataType == System.Type.GetType("System.Int16") || this.DataType == System.Type.GetType("System.Int64"))
{
filterItem.FireCommandEvent("Filter", new Pair("EqualTo", this.UniqueName));
}
else
// treat everything else like a string
filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName));
}
public object ListDataSource
{
get
{
return this.listDataSource;
}
set
{
listDataSource = value;
}
}
//RadGrid calls this method when the value should be set to the filtering input control(s)
protected override void SetCurrentFilterValueToControl(TableCell cell)
{
base.SetCurrentFilterValueToControl(cell);
DropDownList list = (DropDownList)cell.Controls[0];
if (this.CurrentFilterValue != string.Empty)
{
list.SelectedValue = this.CurrentFilterValue;
}
}
//RadGrid calls this method to extract the filtering value from the filtering input control(s)
protected override string GetCurrentFilterValueFromControl(TableCell cell)
{
DropDownList list = (DropDownList)cell.Controls[0];
return list.SelectedValue;
}
protected override string GetFilterDataField()
{
return this.DataField;
}

}
}

<%@ register namespace="MFP_ASP" tagprefix="custom" %>


<MasterTableView AutoGenerateColumns="False" DataSourceID="PMPerformanceDataSource" DataKeyNames="Branch,Cust_No" PageSize="25">
<Columns>
<custom:CustomFilteringColumn DataField="Branch" HeaderText="Branch" SortExpression="Branch" UniqueName="Branch" ListDataSource="SQLDataSourcefrmPM_Branch">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</custom:CustomFilteringColumn>I have copied the code from the demo. I added the reference in the heading. But the control is not recognized. I named mine CustomFilteringColumn and have it in a class file in the root folder. I only want to use dropdownlistboxes for the filters so if I cannot get it to work there is no sale of this product to me.
Kostadin
Telerik team
 answered on 05 Jun 2014
10 answers
343 views
We have a kind of weird rendering issue. Wonder if anyone has any insight into it.

Our rather large organization just made the move from IE7 to IE8, go figger (our servers are IIS6). Overall in our application we noticed rendering was quite different between serving from our local machines (IIS Express or Cassini) and serving from the server--I asked the web admins if there is some setting forcing the servers to send back HTML in IE7 mode, but they couldn't find anything. So we added a IE8 meta tag to our master pages. So now we have:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="X-UA-Compatible" content="IE=8" />

This worked great to fix our problems. Our rendering is consistent between local and the servers. The RadMenu stopped popping under the RadWindow. The positioned RadWindow stopped jumping all over the screen. Except, we have a lot of RadGrids. And they appear to ignore the meta tag and render in IE7 mode when being served from the server. 

We finally learned that there is a Compatibility View setting in IE8. Tools, Compatibility View Settings, uncheck "Display Intranet Sites in Compatibility View". And then the RadGrids render correctly from the server. So everything we have except the RadGrids prioritizes the meta tag over the IE Compatibility View setting. 

I have no idea if this is a Telerik thing, or a grid thing, or a what thing. But does anyone have any idea why the RadGrid ignores the meta tag? Because having our users change the Compatibility View setting is not really an option. Any pointers or suggestions would be most welcome.
Nazer
Top achievements
Rank 2
 answered on 05 Jun 2014
1 answer
91 views
My example is using Entity Framework as it's data source. The requirement is that I have a Parent grid with high level details and a child grid with more details. In order to have the usability that I desire the user will click on a link in the child and navigate off of the page and it's position on the parent grid is retained. The desired behavior is that when the user returns to the page the previous Configuration should be retained. I have tried several examples that I have found in the forums but none of them seem to work. 

protected void rgCampaignGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    List<int> reviewedCampaigns = new List<int>();
    if (Session.Contents["ReviewedCampaigns"] != null)
    {
        reviewedCampaigns = (List<int>)Session.Contents["ReviewedCampaigns"];
    }

    if (e.Item is GridDataItem)
    {
        RadGrid parent = (RadGrid)sender;

        GridDataItem item = (GridDataItem)e.Item;
        int campaignId = Convert.ToInt32(item.GetDataKeyValue("CampaignId"));
        CampaignId = campaignId;


        if(reviewedCampaigns.Contains(campaignId))
        {
            e.Item.Expanded = true;
        }

        if (!reviewedCampaigns.Contains(CampaignId))
        {
            ((HyperLink)item["ApproveColumn"].FindControl("hkApprove")).Attributes.Add("onclick", "return CheckApprove('" + campaignId.ToString() + "');");
            ((HyperLink)item["ApproveColumn"].FindControl("hkApprove")).CssClass = string.Empty;
            ((HyperLink)item["DenyColumn"].FindControl("hkDeny")).Attributes.Add("onclick", "return CheckDeny('" + campaignId.ToString() + "');");
            ((HyperLink)item["DenyColumn"].FindControl("hkDeny")).CssClass = string.Empty;
        }
        else
        {
            ((HyperLink)item["ApproveColumn"].FindControl("hkApprove")).CssClass = "launchsubmit";
            ((HyperLink)item["ApproveColumn"].FindControl("hkApprove")).Attributes.Remove("onclick");
            ((HyperLink)item["DenyColumn"].FindControl("hkDeny")).CssClass = "launchsubmit";
            ((HyperLink)item["DenyColumn"].FindControl("hkDeny")).Attributes.Remove("onclick");
        }
    }
    if (e.Item is GridNestedViewItem)
    {
        GridNestedViewItem nestedView = (GridNestedViewItem)e.Item;
        if (reviewedCampaigns.Contains(CampaignId) && nestedView != null)
        {
            ((Panel)nestedView.FindControl("InnerContainer")).Visible = true;
        }
    }
}

protected void RgCampaignGrid_ItemCommand(object sender, GridCommandEventArgs e)
{
    UCampaign.ApprovalsClass cls = new ApprovalsClass(CurrentUserSession.ClientId, CurrentUserSession.CampaignUserProfile.CampaignUserId);
    RadGrid g = (RadGrid)sender;
    CampaignId = Convert.ToInt32(g.MasterTableView.DataKeyValues[e.Item.ItemIndex]["CampaignId"]);
    GridDataItem item = (GridDataItem)e.Item;
    GridNestedViewItem nestedView = (GridNestedViewItem)item.ChildItem;

    Panel pnl = (Panel)nestedView.FindControl("InnerContainer");

    pnl.Visible = !e.Item.Expanded;
    RadGrid eventRadGrid = (RadGrid)pnl.FindControl("rgEvents");
    cls.PopulateEventsGrid(ref eventRadGrid, CampaignId);

    List<int> reviewedCampaigns = new List<int>();
    if (Session.Contents["ReviewedCampaigns"] != null)
    {
        reviewedCampaigns = (List<int>)Session.Contents["ReviewedCampaigns"];
        if (!reviewedCampaigns.Contains(CampaignId))
        {
            reviewedCampaigns.Add(CampaignId);
            Session.Contents["ReviewedCampaigns"] = reviewedCampaigns;
        }
    }
    else
    {
        reviewedCampaigns.Add(CampaignId);
        Session.Add("ReviewedCampaigns", reviewedCampaigns);
    }
}

protected void RgCampaignGrid_PreRender(object sender, EventArgs e)
{
    List<int> reviewedCampaigns = new List<int>();
    if (Session.Contents["ReviewedCampaigns"] != null)
    {
        reviewedCampaigns = (List<int>)Session.Contents["ReviewedCampaigns"];
    }

    RadGrid radGrid1 = (RadGrid)sender;
    GridItem[] nestedViewItems = radGrid1.MasterTableView.GetItems(GridItemType.NestedView);
    foreach (GridNestedViewItem nestedViewItem in nestedViewItems)
    {
        VwCampaignsReadyForApproval approval = (VwCampaignsReadyForApproval)nestedViewItem.DataItem;
        if (approval != null && reviewedCampaigns.Contains(Convert.ToInt32(approval.CampaignId)))
        {
            Panel pnl = (Panel)nestedViewItem.FindControl("InnerContainer");
            if (pnl != null)
            {
                pnl.Visible = true;
            }

        }
    }
}

Viktor Tachev
Telerik team
 answered on 05 Jun 2014
0 answers
39 views
hi

Iam using RadBar chart for WinForm .

i have set the property as
 chartSeries.Appearance.LabelAppearance.LabelLocation = StyleSeriesItemLabel.ItemLabelLocation.Outside.

but still it shows the series item label inside bar.

as shown in chart 
1  is wrong
2  is correct

even if the height of bar is 100 percent  I want it outside bar.

please help

thanks
              
Kishor
Top achievements
Rank 2
 asked on 05 Jun 2014
1 answer
162 views
Hi,

New to Telerik and using a RadGrid which outputs the following html:

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<div id="divCodeGrid">
                                                                                                    <div tabindex="0" disabled="" class="RadGrid RadGrid_Default RadGrid_Default rgMasterTable OverFlow" id="ts1_tabPnlCodeProv_rgCode" style="width: 99%;">

<div class="rgHeaderDiv" id="ts1_tabPnlCodeProv_rgCode_GridHeader" style="width: 100%; overflow: hidden;">

<table class="rgMasterTable rgClipCells" id="ts1_tabPnlCodeProv_rgCode_ctl00_Header" style="width: 100%; overflow: hidden; table-layout: fixed; empty-cells: show;" border="0" cellspacing="0">
<colgroup>
<col style="width: 60px;">
<col style="width: 60px;">
<col style="width: 160px;">
<col style="width: 80px;">
</colgroup>
<thead>
<tr>
<th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" href="">Code</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl05" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Code__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl06" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Code__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Code')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" href="">ADA</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl08" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__ADA__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl09" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__ADA__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('ADA')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" href="">Description</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl11" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Description__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl12" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Description__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Description')) return false;" type="submit" value="  "></th><th class="ColumnHeaderNote rgHeader" style="border: 1px solid white;" scope="col"><a title="Click here to sort" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" href="">Type</a><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl14" title="Sorted asc" class="rgSortAsc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Type__SortAsc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" type="submit" value="  "><input name="ts1$tabPnlCodeProv$rgCode$ctl00$ctl02$ctl00$ctl15" title="Sorted desc" class="rgSortDesc" id="ts1_tabPnlCodeProv_rgCode_ctl00__Type__SortDesc" style="display: none;" onclick="if(!$find('ts1_tabPnlCodeProv_rgCode_ctl00').sort('Type')) return false;" type="submit" value="  "></th>
</tr>
</thead><tbody style="display: none;"><tr><td colspan="4"></td></tr></tbody>
</table>
</div>
<div disabled="" class="rgDataDiv" id="ts1_tabPnlCodeProv_rgCode_GridData" style="width: 100%; height: 184.5px; overflow: auto;">

<table class="rgMasterTable rgClipCells" id="ts1_tabPnlCodeProv_rgCode_ctl00" style="width: 922px; overflow: hidden; table-layout: fixed; empty-cells: show;" border="0" cellspacing="0">
<colgroup>
<col style="width: 60px;">
<col style="width: 60px;">
<col style="width: 160px;">
<col style="width: 80px;">
</colgroup>
<tbody>
<tr class="rgNoRecords">
<td style="text-align: left;" colspan="4">
                                                                                                            </td>
</tr>
</tbody>

</table> </div>
<input name="ts1_tabPnlCodeProv_rgCode_ClientState" id="ts1_tabPnlCodeProv_rgCode_ClientState" type="hidden" autocomplete="off">
</div>

                                                                                                </div>
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
I would like to change the width to 100% instead of 922px(in the bolded text). Have already set the MasterTableView to 

1.<MasterTableView DataKeyNames="ConditionCodeID" TableLayout="Fixed" Width="100%" >

Not sure what I am missing.

Thanks,
Pavlina
Telerik team
 answered on 05 Jun 2014
1 answer
87 views
Currently this option requires to enter both dates in the range.
Is there a way to allow entering either "from" or "to" date and having the other date empty, i.e. implementing GreaterThanOrEqualTo and LessThanOrEqualTo ?
Eyup
Telerik team
 answered on 05 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?