Telerik Forums
UI for ASP.NET AJAX Forum
10 answers
402 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
117 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
55 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
201 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
120 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
1 answer
232 views
Hi 

OnRowDblClick is not firing  when i used OnRowSelected, i need to achieve below

when user selected a row, i need to display information
during double click they can able to edit those information.

if i didn't use OnRowSelected OnRowDblClick is firing. 
Princy
Top achievements
Rank 2
 answered on 05 Jun 2014
1 answer
70 views
HI Team,

  My requirement is showing Grid Header text dynamically from Data base,here is the below code which i am binding the header text statically, here i need to get from data base and bind to it , below is the code and please find the attached screen shot for requirement .

 <telerik:RadGrid ID="frmvwQDOB" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                            DataMember="Firstname" GridLines="None" Width="100%">
                            <MasterTableView AutoGenerateColumns="False" TableLayout="Fixed">
                                <Columns>
                                    <telerik:GridTemplateColumn HeaderText="Incoming Record">
                                        <ItemTemplate>
                                            <div class="row-fluid data-fields gridbackcolor">                                        
                                              <%-- Header Text code --%>
                                                <asp:label runat="server" ID="lblg1Middlecol">
                                                    Middle Name</asp:label>                                                                                        
                                                <asp:label runat="server" ID="lblg1Lastnamecol">
                                                    Last Name</asp:label>                                                                                       
                                                <asp:label runat="server" ID="lblg1DOBcol">
                                                    Date of Birth</asp:label>                                                                                        
                                                <asp:label runat="server" ID="lblg1gradecol">
                                                    Grade</asp:label>                                                                                        
                                                <asp:label runat="server" ID="lblg1Racecol">
                                                    Race Code</asp:label>                                                                                        
                                                <asp:label runat="server" ID="lblg1Gendercol">
                                                    Gender</asp:label>                                            
                                            </div>                                        
                                            <div class="row-fluid data-fields">                                                
                                                    <asp:Label runat="server" ID="lblFirstName" Text='<%# Bind("Firstname") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblMiddleName" Text='<%# Bind("Middlename") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblLastname" Text='<%# Bind("Lastname") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblDob" Text='<%# Bind("DOB") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblGrade" Text='<%# Bind("GradeName") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblRace" Text='<%# Bind("Race") %>'></asp:Label>&nbsp;                                                                                                
                                                    <asp:Label runat="server" ID="lblGender" Text='<%# Bind("GenderName") %>'></asp:Label>&nbsp;
                                                </div>                                           
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>


Thank you.
 
Princy
Top achievements
Rank 2
 answered on 05 Jun 2014
5 answers
66 views
I upgraded my AJAX to the December, 2012 version for .Net 2010, and now my Telerik Tab Strip errors out when I go to a page with it. I am using an AJAX Update Panel.

Here is the error message and part of my markup. It is a .net 2010 web site on Windows 2008 server and also Windows 2012 server with an older version of AJAX.

System.NullReferenceException:
Object reference not set to an instance of an object.
at Telerik.RadTabStripUtils.RadControl.GetUpdatingUpdatePanel(Control target)
at Telerik.RadTabStripUtils.RadControl.IsInAjaxUpdatePanel(Control target)
at Telerik.RadTabStripUtils.RadControl.Page_PreRenderComplete(Object sender,
EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)

<ajax:ToolkitScriptManager ID="ToolkitScriptManager1112" runat="server">
</ajax:ToolkitScriptManager><asp:UpdatePanel id="UpdatePanel111" runat="server" UpdateMode="Always">
      <ContentTemplate>
         <div id="divTabStripAdminIncident" runat="server"
              style="background-color:#FFFFCC; width:100%;"
              visible="false">
            <radTS:RadTabStrip ID="TabStripAdminIncident" runat="server" AutoPostBack="True"
               Font-Bold="True" Skin="WebBlue">
               <Tabs>
                  <radTS:Tab ID="tabAdminEmpInfo" runat="server"
                             Text="Emp Info"
                             Value="AdminEmpInfo.aspx" />
                  <radTS:Tab ID="tabAdminMedicalData" runat="server"
                             Text="Medical Data"
                             Value="AdminMedicalData.aspx" />
                  <radTS:Tab ID="tabAdminInjuryData" runat="server"
                             Text="Injury Data"
                             Value="AdminInjuryData.aspx" />
                  <radTS:Tab ID="tabAdminInjuryDesc" runat="server"
                             Text="Injury Description"
                             Value="AdminInjuryDesc.aspx" />
                  <radTS:Tab ID="tabAdminRiskAssessment" runat="server"
                             Text="Risk Assessment"
                             Value="AdminRiskAssessment.aspx" />
                  <radTS:Tab ID="tabAdminDaysOffRestricted" runat="server"
                             Text="Days Off/Restr."
                             Value="AdminDaysOffRestricted.aspx" />
                  <radTS:Tab ID="tabAdminRootCF" runat="server"
                             Text="Root CF"
                             Value="AdminRootCF.aspx" />
                  <radTS:Tab ID="tabAdminContribCF" runat="server"
                             Text="Contrib CF"
                             Value="AdminContribCF.aspx" />
                  <radTS:Tab ID="tabAdminCorrectiveAction" runat="server"
                             Text="Corrective Actions"
                             Value="AdminCorrectiveAction.aspx" />
                  <radTS:Tab ID="AdminCorrectiveActionContractor" runat="server"
                             Text="Contractor Corrective Actions"
                             Value="AdminCorrectiveActionContractor.aspx" />
                  <radTS:Tab ID="tabAdminRiskAssessmentPotential" runat="server"
                             Text="Risk Assessment Potential"
                             Value="AdminRiskAssessmentPotential.aspx" />
                  <radTS:Tab ID="tabAdminApproval" runat="server"
                             Text="Approvals"
                             Value="AdminApproval.aspx" />
                  <radTS:Tab ID="tabAdminIncidentEMail" runat="server"
                             Text="EMail Incident Report" Visible="false"
                             Value="AdminIncidentEMail.aspx" />
                  <radTS:Tab ID="tabAdminSubmit" runat="server"
                             Text="Submit" Visible="false"
                             Value="AdminSubmit.aspx" />
               </Tabs>
            </radts:RadTabStrip>
         </div>
...
Kostadin
Telerik team
 answered on 05 Jun 2014
1 answer
230 views
I would like to style my group headers slightly different than the subgroup headers. I would also like to style my group footers slightly different than my subgroup footers.

by default, the group and subgroups are styled the exact same and it is hard to differentiate if you are looking at a group or subgroup, especially when looking at the footers.

See the attached picture. Ideally the group header text color would be different than the subgroup header text color. and the group footer bg color would be different from the subgroup footer bg color.

Any help is appreciated. Thanks.

Justin

Konstantin Dikov
Telerik team
 answered on 05 Jun 2014
1 answer
106 views
I've got  one Radgrid and inside it's GridTemplateColumn I've got RAdComboBox

The problem is that all this is inside a user control

<%@ Control Language="C#" AutoEventWireup="true" Inherits="MvcBeaWeb.GridLanguageView" CodeFile="GridLanguageView.ascx.cs" %>
<%@ Import Namespace="MvcBeaWeb" %>
<%@ Register Assembly="Telerik.Web.UI" TagPrefix="telerik" Namespace="Telerik.Web.UI" %>


  
    <telerik:RadScriptManager
        ID="RadScriptManager1"   
        runat="server"   
      >
    </telerik:RadScriptManager>
  
  
        
            <telerik:RadGrid ID="RadGridLang" runat="server" AutoGenerateColumns="False"  EnableEmbeddedSkins="False"  RegisterWithScriptManager=false 
                 DataTextField="Descr" DataValueField="LanImg"
                Height="100%" Width="120px" AppendDataBoundItems="true" CellSpacing="0" GridLines="None" OnLoad="RadGridLang_Load">
                <MasterTableView>
                    <Columns>
                        <telerik:GridTemplateColumn DataField="LanCd">
                            <ItemTemplate>
                                <img src="<%#DataBinder.Eval(Container.DataItem, "LanImg")%>" alt="ASP.NET hosting" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn DataField="LanCd">
                            <ItemTemplate>
                            <telerik:RadComboBox ID="RadComboBoxLang" runat="server"   EnableLoadOnDemand="true"  EnableEventValidation="true" AllowCustomText="true"   AppendDataBoundItems="true">
                               
                                 
                            </telerik:RadComboBox>
                          
                                           
                              
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
                                  ---------------------------------------------------------------------------
                                                 Myquestion is can someone help me step by step how can I add dybnamically in my .cs code of my user control   an ItemTemplate to my radcombobox which should be an anchor element <a href="" >descr </a>
The innerHtml (descr)  I should get from my list which should be the datasource for my radcombobox;; 

I saw this example:   http://www.telerik.com/help/aspnet-ajax/combobox-templates-adding.html but as my radcombobox is in user control I can find it in Page_Init event


      
Shinu
Top achievements
Rank 2
 answered on 05 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?