Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
141 views
I have an annoying white line in my grid on the CommandItemSettings line right beside my export to excel button.  Is there anyway of getting rid of it?

Here is my ASPX code

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenItemsInventory.aspx.cs"

 

 

Inherits="Sterling.SNEF.Tax.Web.OpenItemsInventory" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Open Items Inventory</title>

 

</

 

head>

 

<

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

 

var rad_val;

 

 

function onFutureInventory(sender, args) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = true;

 

 

GetRadioValue();

 

var windowURL = "FutureInventoryDialog.aspx?ViewByType=" + rad_val

 

 

var oWnd = $find("<%= dlgFutureInventory.ClientID%>");

 

oWnd.setUrl(windowURL);

oWnd.SetSize(470, 505);

oWnd.show();

oWnd.set_initialBehaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);

oWnd.SetModal(

true);

 

 

}

 

 

function GetRadioValue()

 

{

message =

"";

 

surplusMessage =

"";

 

 

 

if (document.getElementById('<%= rdoAssignee.ClientID %>').checked)

 

{

rad_val =

"Assignee";

 

}

 

else

 

{

rad_val =

"State";

 

}

}

 

 

function onFutureInventoryClose(sender, eventArgs) {

 

document.getElementById(

'<%= btnFutureInventory.ClientID %>').disabled = false;

 

}

 

 

function onRequestStart(sender, args)

 

{

 

if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0)

 

{

args.set_enableAjax(

false);

 

}

}

 

 

</script>

 

</

 

telerik:RadCodeBlock>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="OpenItemsInventoryScriptManager" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<ClientEvents OnRequestStart="onRequestStart" />

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="Panel1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadWindow ID="dlgFutureInventory" runat="server" Skin="Web20" EnableViewState="False"

 

 

KeepInScreenBounds="True" ReloadOnShow="True" ShowContentDuringLoad="False" VisibleStatusbar="False"

 

 

Behaviors="None" OnClientClose="onFutureInventoryClose" onclientOverlay="True">

 

 

</telerik:RadWindow>

 

 

<telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Skin="Web20">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

<asp:Panel ID="Panel1" runat="server">

 

 

<asp:Label ID="lblViewBy" runat="server" Font-Bold="True" Text="View By:" Font-Names="Arial"></asp:Label>

 

 

<asp:RadioButton ID="rdoAssignee" runat="server" Text="Assignee" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" Checked="true" AutoPostBack="true"

 

 

Font-Names="Arial" Font-Size="Smaller" />&nbsp;&nbsp;

 

 

<asp:RadioButton ID="rdoState" runat="server" Text="State" GroupName="ViewByGroup"

 

 

OnCheckedChanged="ViewByGroup_CheckedChanged" AutoPostBack="true" Font-Names="Arial"

 

 

Font-Size="Smaller" />

 

 

<br />

 

 

<br />

 

 

<div style=" border: thin solid #5177B5; left: 5px; position: relative; left: 5px; width: 760px;">

 

 

<table border="1" width="760px" style="border-collapse: collapse;">

 

 

<tr>

 

 

<td align="center" style="width: 145px; background-color: #7FA5D7;">

 

 

<asp:Label ID="lblhdrAssignee" runat="server" Text="Assignee" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label2" runat="server" Text="Jurisdictions" Font-Bold="True" Font-Names="arial,sans-serif"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label6" runat="server" Text="Prior Open Items" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label7" runat="server" Text="Current Open Items" Font-Bold="True"

 

 

Font-Names="Arial" Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 110px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label4" runat="server" Text="Items Left to Pay" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px; background-color: #7FA5D7;">

 

 

<asp:Label ID="Label5" runat="server" Text="% Complete" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="12px" ForeColor="White"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td align="center" style="width: 150px;">

 

 

<asp:Label ID="Label1" runat="server" Text="Totals" Font-Bold="True" Font-Names="Arial"

 

 

Font-Size="Smaller" ></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrJurisdictions" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPrior" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrCurrent" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrItemsLeft" runat="server"></asp:Label>

 

 

</td>

 

 

<td align="center" style="width: 100px;">

 

 

<asp:Label ID="lblhdrPctComplete" runat="server"></asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</div>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Label ID="lblCurrentandPrior" runat="server" Font-Bold="True" Font-Size="Large"

 

 

Font-Names="Arial">Current and

 

Prior Inventory by Assignee

</asp:Label>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<table>

 

 

<tr>

 

 

<td colspan="3">

 

 

<telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowSorting="True" AutoGenerateColumns="False"

 

 

GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="770px" Height="265px"

 

 

OnNeedDataSource="grdCurrentandPrior_NeedDataSource">

 

 

<ExportSettings FileName="OpenItemsCurrentInventory" IgnorePaging="True" OpenInNewWindow="True"

 

 

ExportOnlyData="true" >

 

 

<Excel Format="HTML" />

 

 

</ExportSettings>

 

 

<MasterTableView CommandItemDisplay="Bottom" AllowNaturalSort="false">

 

 

<CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"

 

 

ShowRefreshButton="false" />

 

 

<Columns>

 

 

<telerik:GridTemplateColumn HeaderText="Assignee" UniqueName="Assignee" SortExpression="Assignee">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="State" UniqueName="State" SortExpression="State"

 

 

Visible="false">

 

 

<HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Jurisdictions" UniqueName="JurisdictionCount"

 

 

SortExpression="JurisdictionCount">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Prior Open Items" UniqueName="OpenItemsCountPrior"

 

 

SortExpression="OpenItemsCountPrior">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbPrior" runat="server" Text='<%# Eval("OpenItemsCountPrior", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Current Open Items" UniqueName="OpenItemsCountCurrent"

 

 

SortExpression="OpenItemsCountCurrent">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lbCurrent" runat="server" Text='<%# Eval("OpenItemsCountCurrent", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="Items Left to Pay" UniqueName="TotalRemainingItems"

 

 

SortExpression="TotalRemainingItems">

 

 

<HeaderStyle Font-Bold="True" Width="105px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridTemplateColumn HeaderText="% Complete" UniqueName="clmPctComplete" SortExpression="PercentComplete">

 

 

<HeaderStyle Font-Bold="True" Width="100px" HorizontalAlign="Center" Font-Names="Arial" />

 

 

<ItemTemplate>

 

 

<asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:F2}%")%>'></asp:Label>

 

 

</ItemTemplate>

 

 

<ItemStyle HorizontalAlign="Right" ForeColor="Black" />

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="AssigneeEmployeeKey" ReadOnly="True" UniqueName="AssigneeEmployeeKey"

 

 

Visible="False">

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderStyle BorderStyle="Solid" />

 

 

<ClientSettings>

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

</telerik:RadGrid>

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

<br />

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

<asp:Button ID="btnFutureInventory" runat="server" Text="Future Inventory" SkinID="Web20"

 

 

OnClientClick="onFutureInventory(); return false;" Width="164px" UseSubmitBehavior="false" />

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</asp:Panel>

 

 

</form>

 

</

 

body>

 

</

 

html>

 



Any help would be appreciated.

MBEN
Top achievements
Rank 2
Veteran
 answered on 09 Jan 2013
3 answers
123 views
Some days ago, I asked a question to remove the header row and making a label with the header text on the filter row, and switching to the filter when the label is clicked, and going back to the label when the textbox blurs.

The code to achieve that is:

C#
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridHeaderItem)
    {
        e.Item.Visible = false;
        e.Item.Display = false;
    }
    if (e.Item is GridFilteringItem)
    {
        GridHeaderItem header = RadGrid1.MasterTableView.GetItems(GridItemType.Header)[0] as GridHeaderItem;
 
        GridFilteringItem filterItem = e.Item as GridFilteringItem;
        for (int i = 0; i < header.Cells.Count; i++)
        {
            Label label = new Label();
            label.Text = header.Cells[i].Text;
             
            if (filterItem.Cells[i].Controls.Count > 0)
            {
                TextBox textbox = filterItem.Cells[i].Controls[0] as TextBox;
                textbox.CssClass = "hidden";
 
                Button button = filterItem.Cells[i].Controls[1] as Button;
                button.CssClass = "hidden";
                 
                filterItem.Cells[i].Controls.Add(label);
 
                label.Attributes.Add("onclick", "showFilterItem('" + label.ClientID + "','" + textbox.ClientID + "','" + button.ClientID + "')");
                textbox.Attributes.Add("onblur", "hideFilterItem('" + label.ClientID + "','" + textbox.ClientID + "','" + button.ClientID + "')");
            }
        }
    }
}

Javascript:
<script type="text/javascript">
    //Put your JavaScript code here.
    function showFilterItem(labelID, textID, buttonID) {
        $get(labelID).className = "hidden";
        $get(textID).className = "visible";
        $get(buttonID).className = "visibleButton";
    }
    function hideFilterItem(labelID, textID, buttonID) {
        $get(labelID).className = "visible";
        $get(textID).className = "hidden";
        $get(buttonID).className = "hidden";
    }
 
 
</script>

CSS
<style type="text/css">
    .hidden
    {
        display: none !important;
    }
    .visible
    {
        display: "";
        margin-top: 0px;
        height: 10px;
    }
    .rcbArrowCell
    {
        display: none !important;
    }
    .rgFilterRow td
    {
        border-right: none !important;
    }
    .RadGrid .rgFilterRow .rcbInputCell
    {
        padding:0;
        border-width:0;
    }
    .visibleButton
    {
        display: "";           
        background-image: url('icon-filter.gif');
        height: 16px;
        background-repeat: no-repeat;
    }
 
</style>


But if I set the radgrid property AllowSorting to True, the label disappears, as the headercell does not contain any text (the label doesn't disappear, but its text is null). I know it is a hyperlink, but I cant get the href link with code behind.

How do I fetch the Sort function from the header cell, so I can put the function in a button right beside the label?
David
Top achievements
Rank 1
 answered on 09 Jan 2013
2 answers
93 views
Hi, 

When a telerik grid is loaded ,  the column headers and item width match and they are aligned properly. 
But when we click on header context menu and hide one column then there is a mismatch with columns.
If i set AllowStaticHeaders="false" it works fine but i want static headers. I assigned fixed width for each column using Header style width property and TabeleLayout is Fixed.

Is there anyway to fix the issue?

Thanks,
Nimmy
Nirmala
Top achievements
Rank 1
 answered on 09 Jan 2013
1 answer
98 views

Elliott
Top achievements
Rank 2
 answered on 09 Jan 2013
2 answers
181 views
I keep getting this error when there are more than 30 rows in my grid.

Windows Internet Explorer
Stop running this script?

A script on this page is causing Internet Explorer to run slowly.
If it Continues to run, your computer may become
unresponsive.

                    YES         NO

Here is the code for the Grid:
    <telerik:RadGrid ID="RadGrid1"   
             AllowMultiRowSelection="True"   
             AllowSorting="True" 
             AllowNaturalSort="True"   
             AllowPaging="False" 
             AutoGenerateColumns="False"   
             AlternatingItemStyle-HorizontalAlign="Center"   
             BackColor="#ffffff"   
             CellPadding="2"   
             CellSpacing="2" 
             EnableEmbeddedSkins="False" 
             GridLines="None"   
             GroupingEnabled="True"   
             HeaderStyle-Height="20"   
             Height="470px"          
             ItemStyle-HorizontalAlign="Center"     
             OnSortCommand="RadGrid1_SortCommand"   
             OnNeedDataSource="RadGrid1_NeedDataSource"   
             OnItemDataBound="RadGrid1_ItemDataBound"   
             ShowFooter="True"   
             ShowHeader="True"   
             ShowGroupPanel="True"   
             ShowStatusBar="True"   
             Skin="MySkin"    
             Width="100%"   
             Runat="server">        
               <MasterTableView AllowMultiColumnSorting="True" DataKeyNames="Column1,Column2" EditMode="InPlace" TableLayout="Fixed" HeaderStyle-Wrap="false" > 
<Columns> 
   <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="25" /> 
   <telerik:GridBoundColumn DataField="UniqueColumnName" Visible="False" />    
  <telerik:GridBoundColumn DataField="UniqueColumnName" Visible="False" />   
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Customer ID" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Customer" HeaderButtonType="TextButton" HeaderStyle-Width="300px" ItemStyle-HorizontalAlign="Left" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Request #" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Center" SortExpression="UniqueSort" /> 
  <telerik:GridTemplateColumn HeaderText="Refresh Type"  HeaderStyle-Width="150" ItemStyle-HorizontalAlign="center">  
    <ItemTemplate> 
       <telerik:RadComboBox ID="RadComboBoxRefreshType" Width="150" Skin="Vista" runat="server">  
        <Items> 
           <telerik:RadComboBoxItem Text="Product" Value="0" /> 
           <telerik:RadComboBoxItem Text="Sales - Customer" Value="1" /> 
           <telerik:RadComboBoxItem Text="Sales - Offer" Value="2" /> 
        </Items> 
       </telerik:RadComboBox>                
     </ItemTemplate> 
  </telerik:GridTemplateColumn> 
 <%-- There is a table for Batch Type but we will just create this in the code for now--%> 
  <telerik:GridTemplateColumn HeaderText="Batch Time" ItemStyle-HorizontalAlign="center">  
      <ItemTemplate> 
         <telerik:RadComboBox ID="RadComboBoxBatchType"  Width="90" Skin="Vista" runat="server">  
           <Items> 
              <telerik:RadComboBoxItem Text="Not Set" Value="0" /> 
              <telerik:RadComboBoxItem Text="Morning" Value="1" /> 
              <telerik:RadComboBoxItem Text="Evening" Value="2" /> 
              <telerik:RadComboBoxItem Text="Both" Value="3" /> 
              <telerik:RadComboBoxItem Text="Now" Value="4" /> 
           </Items> 
          </telerik:RadComboBox>                
      </ItemTemplate> 
  </telerik:GridTemplateColumn> 
  <telerik:GridTemplateColumn HeaderText="Unique Name" ItemStyle-HorizontalAlign="center">  
          <ItemTemplate> 
               <telerik:RadDatePicker ID="RadDateRefreshThru" Style="vertical-align: middle;" MinDate="2000-2-1" Width="75" runat="server" Skin="WebBlue">   
              </telerik:RadDatePicker> 
          </ItemTemplate> 
  </telerik:GridTemplateColumn> 
  <telerik:GridTemplateColumn HeaderText="Unique Name" ItemStyle-HorizontalAlign="center">  
          <ItemTemplate> 
               <telerik:RadComboBox ID="RadComboStartBillMonth"  Width="90" Skin="Vista" runat="server" /> 
          </ItemTemplate> 
  </telerik:GridTemplateColumn> 
  <telerik:GridTemplateColumn HeaderText="Unique Name" ItemStyle-HorizontalAlign="center">  
          <ItemTemplate> 
               <telerik:RadComboBox ID="RadComboBoxEndBillMonth"  Width="90" Skin="Vista" runat="server" />   
          </ItemTemplate> 
  </telerik:GridTemplateColumn> 
  <telerik:GridTemplateColumn HeaderText="Unique Name" ItemStyle-HorizontalAlign="center">  
       <ItemTemplate> 
         <telerik:RadNumericTextBox  ID="id1" Type="Number" MaxLength="9" style="text-align:right;" Width="60" runat="server" > 
           <NumberFormat AllowRounding="False" KeepNotRoundedValue="True" /> 
        </telerik:RadNumericTextBox> 
       </ItemTemplate> 
  </telerik:GridTemplateColumn> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center"  SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" HeaderStyle-Width="150px" ItemStyle-HorizontalAlign="Left" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName"HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Left" HeaderStyle-Wrap="false" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Left" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" HeaderStyle-Width="200px" ItemStyle-HorizontalAlign="Left"  SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" HeaderStyle-Width="150px" ItemStyle-HorizontalAlign="center" HeaderStyle-Wrap="false" DataFormatString="{0:MM/dd/yyyy}" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center"  DataFormatString="{0:MM/dd/yyyy}" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center" DataFormatString="{0:MM/dd/yyyy}" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Left" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="Left" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="center" SortExpression="UniqueSort" /> 
  <telerik:GridBoundColumn DataField="UniqueColumnName" HeaderText="Unique Name" HeaderButtonType="TextButton" ItemStyle-HorizontalAlign="right" DataFormatString="{0:$#,##0.0000}" SortExpression="UniqueSort" /> 
  <telerik:GridTemplateColumn HeaderText="Comments" HeaderStyle-Width="150" ItemStyle-HorizontalAlign="center">  
      <ItemTemplate> 
          <asp:ImageButton ID="ImageButtonComment" ImageUrl="~/images/Comment.gif" AlternateText="Add Comment" Height="13" Width="13" runat="server" />              
      </ItemTemplate> 
  </telerik:GridTemplateColumn> 
 </Columns> 
 <HeaderStyle Width="100px" /> 
</MasterTableView> 
  <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True" AllowRowHide="True" > 
     <Resizing AllowColumnResize="True" AllowRowResize="False" ResizeGridOnColumnResize="False" ClipCellContentOnResize="True" EnableRealTimeResize="False" /> 
     <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"  FrozenColumnsCount="3" />     
     <Selecting AllowRowSelect="True" /> 
  </ClientSettings> 
</telerik:RadGrid>  

soraya
Top achievements
Rank 1
 answered on 09 Jan 2013
3 answers
142 views
Hi,

I am using telerik controls since last one year and these control are compatible with IE, FireFox, Chrome but not working in Safari.
I have tried to use menu control, button, combobox, grids but server side events are not working on Safari.
I found some links which are saying that they got solution, I tried them but they are of no use. here are the links

http://forums.asp.net/t/1733434.aspx/1

http://www.codeproject.com/Tips/429169/ASP-NET-menu-control-issue-in-Chrome-and-Safari

http://bettereducation.com.au/it/yaf_postsm2938_Problem-with-rendering-aspnet-menu-control-in-Chrome-and-Safari.aspx

http://dotnetslackers.com/Community/blogs/kaushalparik/archive/2009/02/13/asp-menu-server-control-cross-browser-compatibility-safari-chrome.aspx

http://dotnet-muthukrishnan.blogspot.com/2012/03/aspnet-menu-control-not-working-in.html

solution mention in above links are not working. Please help me out in this regard and please provide some test project which having mentioned controls and is working on Safari. 

Regards
Sheeraz Raza
Kate
Telerik team
 answered on 09 Jan 2013
7 answers
308 views
Hello,
I have 2 developing environments. I have developed a sharepoint project where I include the drag and drop feature from the RadGrid to RadSchdeuler. When I drag and drop an item to the schdeuler, I am showing a RadDock as a Popup from client side using

Sys.Application.add_load(openForm);

So that it will show my appointment editing window. In one environment it is working and in the other one when I drag and drop it is giving me a script exception.

"Error: Sys.InvalidOperationException: Type Telerik.Web.UI.Orientation has already been registered. The type may be defined multiple times or the script file that defines it may have already been loaded."

If I remove that Sys.Application.add_load(openForm); then it wont give me an error, but it wont load the dock.

The Dock

<asp:Panel runat="server" ID="panelAlert">
    <telerik:RadDock runat="server" ID="RadDockAlert" Width="350px" Height="120px" Closed="true"
        Style="z-index: 2000;" Title="Alert">
        <Commands>
            <telerik:DockCloseCommand></telerik:DockCloseCommand>
        </Commands>
        <ContentTemplate>
            <div align="center">
                <asp:Label ID="lbAlertMsg" runat="server"></asp:Label>
            </div>
            <br />
            <div align="center">
                <a onclick="hideAlertForm();" id="aAlertOK" runat="server">
                    <asp:Label ID="Label3" CssClass="spriteButtons popUpOkButton" runat="server">Ok</asp:Label>
                </a>
            </div>
        </ContentTemplate>
    </telerik:RadDock>
</asp:Panel>


The function to show the popup
function openAlertForm() {
 
    var dock = $find("<%= RadDockAlert.ClientID %>");
    // Center the RadDock on the screen
    var viewPort = $telerik.getViewPortSize();
    var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
    var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
    $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });
 
    dock.set_closed(false);
 
    Sys.Application.remove_load(openAlertForm);
}


Drag-n-Drop function
function rowDropping(sender, eventArgs) {
            // Fired when the user drops a grid row
            var htmlElement = eventArgs.get_destinationHtmlElement();
            var scheduler = $find('<%= RadScheduler1.ClientID %>');
            if (isPartOfSchedulerAppointmentArea(htmlElement)) {
                // The row was dropped over the scheduler appointment area
                // Find the exact time slot and save its unique index in the hidden field
 
                var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
                startDateTime = timeSlot.get_startTime();
 
                Sys.Application.add_load(openForm);
 
                $get('<%= TargetSlotHiddenField.ClientID %>').value = timeSlot.get_index();
 
                // The HTML needs to be set in order for the postback to execute normally
                eventArgs.set_destinationHtmlElement('<%= TargetSlotHiddenField.ClientID %>');
            }
            else {
                // The node was dropped elsewhere on the document
                eventArgs.set_cancel(true);
            }
        }


I am also doing this on the OnInit of the function of the page.

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/asp-updatepanel-and-radscheduler-issues.aspx

I did this because the navigation from day to week etc in the RadSchdeuler.

Any help on this would be gladly accepted.
Slav
Telerik team
 answered on 09 Jan 2013
2 answers
117 views
I have this
    <style type="text/css">
 
html .RadTreeView_Default,
html .RadTreeView_Default a.rtIn,
html .RadTreeView_Default .rtEdit .rtIn input {
  font-familyarial !important;
        font-size8pt !important;
        colorred !important;
}
 
    </style>
and my simple tree
    <telerik:RadTreeView ID="RadTreeView1" runat="server" Width="300px"   style="white-space:normal"  
        OnClientNodeExpanded="rtvExplore_OnNodeExpandedCollapsed"
                    OnClientNodeCollapsed="rtvExplore_OnNodeExpandedCollapsed" 
     >
    </telerik:RadTreeView>

but the CSS has no effect on the format?
david
Top achievements
Rank 1
 answered on 09 Jan 2013
1 answer
45 views
Hello,

Please find below a definition for a rotator with a viewport of 4 items. 5 items were placed statically inside the rotator. After clicking buttons, in either direction, in the rotator, an empty placeholder is depicted in the rotator image area. Could you please help me in fixing this problem.

Please find below the rotator definition.

<telerik:RadRotator ID="radRotator" runat="server" Width="520px" Height="120px" ItemHeight="120px" ItemWidth="120px" RotatorType="Buttons">
                <telerik:RadRotatorItem>
                    <ItemTemplate>
                        <asp:Image  runat="server" ID="imgRotatorItem" ImageUrl=""  Height="120px" Width="120px"/>
                    </ItemTemplate>
                </telerik:RadRotatorItem>


Thanks,
Oner
Slav
Telerik team
 answered on 09 Jan 2013
3 answers
124 views
Hello,

I was hoping to get some help in figuring out how to open up a form that pops up as a rad window when clicked open from the context menu on a record, with its existing data that has been previously input. I tried figuring it out, but it will only open up a new blank form, (although it shows up with the form id pertaining to that record). Is there a reason why the data does not display? I am storing and retrieving data from Management Studio SQL Server db.
Marin Bratanov
Telerik team
 answered on 09 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?