Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
61 views
Hi,
I use radgrid to create a grid and GridBoundColumn was used to display some field.
Everything works fine except sorting. When I do sorting, there is a grey button-alike image appears in the header of the column. A screen-shot was attached. 
The grey "button" just appears for less than 1 second and then disappears.
I search for a while and I can't find someone having the same problem. Could you please advise me on how I can have that removed?

Regards,
Xavier
Maria Ilieva
Telerik team
 answered on 16 Sep 2014
7 answers
762 views
I have the below code, data is bound to the grid. All the filters work great except GridDateTimeColumn filters - for some reason the filters do not respect the values that I feed into the text box. eg: if I put in 6/10/2009 and choose equal to - I get no rows. Can Someone please tell me why ? I used to use GridBoundColumn for the date , the filter seemed to work but the problem was when users enter 06/10/2009 , it would not convert it back to 6/10/2009. For this reason I changed it to GridDateTimeColumn and now the filters do not work at all. My version of the controls is 2008.3.1314.35.

  <telerik:RadGrid ID="gridInvoices" DataSourceID="odsInvoices" AllowSorting="true" 
        AllowPaging="true" AllowFilteringByColumn="true" AutoGenerateColumns="false" 
        runat="server" EnableLinqExpressions="false" Skin="Office2007" PageSize="15"   
         OnItemDataBound="gridInvoices_ItemDataBound"  OnInit="gridInvoices_Init" 
         AllowAutomaticDeletes="true" >  
        <PagerStyle Mode="Slider"    />  
 
        <MasterTableView DataKeyNames="TRX_NUMBER" ClientDataKeyNames="TRX_NUMBER" CommandItemDisplay="Top">  
            <Columns>  
                    <telerik:GridHyperLinkColumn  HeaderStyle-Width="30px"  NavigateUrl="NonContract.aspx"  UniqueName="Edit" 
                    Text="Edit">  
                      
                    <FilterTemplate>  
                    <asp:LinkButton ID="btnShowAll" runat="server" OnClick="btnShowAll_Click" Text="Clear Filters"></asp:LinkButton>  
                      
                    </FilterTemplate>  
                      
                    </telerik:GridHyperLinkColumn>  
 
                <telerik:GridHyperLinkColumn AllowFiltering="false" ShowFilterIcon="false" HeaderStyle-Width="30px" 
                    NavigateUrl="NonContract.aspx" UniqueName="Copy" HeaderText="" Text="Copy">  
                </telerik:GridHyperLinkColumn>  
                  
                <telerik:GridNumericColumn HeaderStyle-Width="50px" FilterControlWidth="50px" HeaderStyle-HorizontalAlign="center" ItemStyle-HorizontalAlign="right"  DataField="INVOICE_AMOUNT" DataFormatString="{0:c}" HeaderText="Amount" 
               
                <telerik:GridDateTimeColumn HeaderStyle-Width="60px" FilterControlWidth="60px" HeaderStyle-HorizontalAlign="center" DataField="CREATION_DATE" DataFormatString="{0:d}" 
                    CurrentFilterFunction="EqualTo"  ShowFilterIcon="true" HeaderText="Creation Date"  DataType="System.DateTime" PickerType="None" HtmlEncode="false"      />  
       
              </Columns>  
        </MasterTableView>  
        <PagerStyle AlwaysVisible="true" />  
        <ClientSettings>  
            <ClientEvents OnFilterMenuShowing="filterMenushowing" />  
        </ClientSettings>  
    </telerik:RadGrid>  
   
Pavlina
Telerik team
 answered on 16 Sep 2014
1 answer
219 views

Hi 

We design a radlistview in a radlistview item tamplate and thats all in a rad grid (radgrid > radlistview1 > radlistview2)
so when we update grid , we have to access radlistview2's contents but we couldn't find radlistview2 in radgridupdate_command 



our asp code 

   <telerik:RadGrid runat="server" AllowMultiRowSelection="true" AutoGenerateColumns="false" AllowFilteringByColumn="true"
                        AllowPaging="true" PageSize="10" AllowSorting="true"  ID="kategorilerGrid" AllowAutomaticInserts="true" EnableLinqExpressions="false"
                        OnItemDataBound="kategorilerGrid_ItemDataBound"
                        OnUpdateCommand="kategorilerGrid_UpdateCommand" OnDeleteCommand="kategorilerGrid_DeleteCommand"
                        OnNeedDataSource="kategorilerGrid_NeedDataSource" CssClass="RadGrid_gg RadGridRTL_gg">
                        <ClientSettings EnablePostBackOnRowClick="false">
                            <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                        </ClientSettings>
                        <MasterTableView CommandItemDisplay="Top" DataKeyNames="ID">
                            <EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit Item: {0}"
                                CaptionDataField="ID" PopUpSettings-Modal="true">
                            </EditFormSettings>
                            <Columns>
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" />
                                <telerik:GridBoundColumn FilterControlWidth="90%" DataField="ID" UniqueName="ID" AllowFiltering="false"
                                    HeaderText="ID" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                                    Visible="false" ShowFilterIcon="false">
                                </telerik:GridBoundColumn>
                                
                                <telerik:GridButtonColumn ConfirmText="Kayıt Silinsin Mi?" ConfirmDialogType="RadWindow"
                                    ConfirmTitle="Delete" ButtonType="ImageButton" CommandName="Delete" />
                            </Columns>
                            <EditFormSettings EditFormType="Template">
                                <EditColumn ButtonType="ImageButton" />
                                <FormTemplate>
                                    <div style="height: 300px; width: 100%;">
                                        <div class="KategoriLeftEditColumn" style="margin-top: 1%;">
                                            <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                <asp:Label runat="server" ID="KategoriKodLabel">Kategori Kodu :</asp:Label>
                                            </div>
                                            <div class="KategoriEditRightRow">
                                                <telerik:RadTextBox runat="server" ID="KategoriKodTexBox" Width="100%" Text=' <%# Eval("KOD") %>'>
                                                </telerik:RadTextBox>
                                            </div></div>
                                           
                                            <div style="width: 100%; height:35%">
                                                <telerik:RadListView ID="radKategoriDilListView" Width="100%" DataKeyNames="ID" runat="server"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriDegerLabel"><%# Eval("ISIM") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                            <telerik:RadTextBox runat="server" ToolTip=' <%# Eval("ID") %>' ID="KategoriDegerTextBox"
                                                                Width="100%" Text=' <%# Eval("DEGER") %>'>
                                                            </telerik:RadTextBox>
                                                          
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                            </div>
                                       
                                            <div class="KategoriEditRow">
                                               <div class="KategoriEditLeftRow">
                                                <asp:Label runat="server" ID="Label1">Kategori Sınıfı :</asp:Label>
                                            </div>
                                            <div class="KategoriEditRightRow">
                                              <telerik:RadComboBox runat="server" ID="KategoriSinifCombo" EmptyMessage="Kategori Sınıfı Seçiniz.." DataSourceID="SqlDataSource2" DataTextField="DEGER" DataValueField="ID" Width="100%"></telerik:RadComboBox>
                                            </div></div>
                                        </div>
                                        <div class="KategoriRightEditColumn" style="margin-top: 1%">
                                            <div style="width: 100%; height:100%">
                                                <telerik:RadListView ID="KategoriSlaListView" Width="100%" DataKeyNames="ID" runat="server"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriSlaDegerLabel"><%# Eval("PARAMETREDEGER") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                             <telerik:RadListView ID="radKategoriSlaDilListView" Width="100%" DataKeyNames="ID" runat="server" DataSourceID="SqlDataSource3"
                                                    GroupItemCount="2" VirtualItemCount="2">
                                                    <ItemTemplate>
                                                        <div class="KategoriListEditRow">
                                            <div class="KategoriEditLeftRow">
                                                            <asp:Label runat="server" ID="KategoriDegerLabel"><%# Eval("ISIM") %> :</asp:Label>
                                                        </div>
                                                         <div class="KategoriEditRightRow">
                                                            <telerik:RadTextBox runat="server" ToolTip=' <%# Eval("ID") %>' ID="KategoriDegerTextBox"
                                                                Width="100%" Text=' <%# Eval("DEGER") %>'>
                                                            </telerik:RadTextBox>
                                                          
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                                              <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:TYS20DEVConnectionString %>"
            SelectCommand="(SELECT ID, ISIM, NULL AS DEGER FROM DIL)">
        </asp:SqlDataSource>
                                                        </div></div>
                                                    </ItemTemplate>
                                                </telerik:RadListView>
                                            </div>
                                           
                                        </div>
                                        <div style="width: 15%; padding-left: 85%; height: 30px; margin-bottom:0">
                                            <telerik:RadButton runat="server" ID="ParametreUpdateButton" Height="26px" Width="26px"
                                                CommandName="Update" CommandArgument=' <%# Eval("ID") %>'>
                                                <Image ImageUrl="../Images/chk.gif" IsBackgroundImage="true" />
                                            </telerik:RadButton>
                                            <telerik:RadButton runat="server" ID="RadButton1" CommandName="Cancel" Height="26px"
                                                Width="26px">
                                                <Image ImageUrl="../Images/cncl.gif" IsBackgroundImage="true" />
                                            </telerik:RadButton>
                                        </div>
                                    </div>
                                </FormTemplate>
                            </EditFormSettings>
                        </MasterTableView>
                    </telerik:RadGrid>



Konstantin Dikov
Telerik team
 answered on 16 Sep 2014
4 answers
100 views
Is there a way to make the ajax swirl appear via code?  In my case I have a "main" page.  If a user selects an item from the radMenu, I'd like the ajax swirl to appear while the next page is loading, can that be done?
Stacy
Top achievements
Rank 1
 answered on 16 Sep 2014
1 answer
221 views
I have noticed that when not providing any parameters to the manager, it saves data to the App_Data directory of the web server.

So when I create a custom StorageProvider, how do I save data in the same fashion?
Peter Filipov
Telerik team
 answered on 16 Sep 2014
1 answer
63 views
Hello guys,

I tested the RadEditor for SharePoint in my SharePoint farm. After installation, I have only one toolbar, with a few tools. For my request not enougth. I downloaded the full set of Tools on this website: http://www.telerik.com/support/kb/details/default-toolsfile-xml-file-of-radeditor-for-asp-net-ajax

All works fine, but all drop-down-tools can´t show any options (see attachment).

I read the documentation and searched for errors in the configfiles, without results.




Marin Bratanov
Telerik team
 answered on 16 Sep 2014
1 answer
133 views
I had to struggle with this one a while, but I finally found a solution and I thought I would share it. I don't like fixed-width popup edit forms because they can really screw up on different systems, but the RadGrid automatically affixes a width=400px style if you don't specify one. I found a way to remove this and get the popup to center anyway.
(Forgive me for not showing this as code, but I haven't figured out how to do that yet.)

function PopUpShowing(sender, eventArgs) {
// Get the popup element
popUp = eventArgs.get_popUp();

// Remove the style attribute. This removes the 'width' attribute that RadGrid puts in automatically.
popUp.removeAttribute("style");

// Add the fixed position attribute back in. (Note: This has to be done before getting the size element)
popUp.style.position = "fixed";

// Get the main window size and the popup sizes
var viewportWidth = $(window).width();
var viewportHeight = $(window).height();
var popUpWidth = popUp.offsetWidth;
var popUpHeight = popUp.offsetHeight;

// Center the popup window to the main window
popUp.style.left = Math.floor((viewportWidth - popUpWidth) / 2) + "px";
popUp.style.top = Math.floor((viewportHeight - popUpHeight) / 2) + "px";
}
Maria Ilieva
Telerik team
 answered on 16 Sep 2014
3 answers
409 views

Hi Telerik Forum.

How do I make the RadMenu automatically scroll when the page is resized and there is not enough room for the menu?
In my example I have a menu that changes depending on what page you are at, but the menu is also resized with the page.
When the menu contains too many root elements I would like the scroll bars to automatically appear if the user makes the page too narrow. My problem is, if I enable root scroll, the scroll bars does not appear if no width is set and the menu items are wrapped. See RadMenuWrap.gif.

If I do set a fixed size, then the menu is not resized with the page. I have tried to make a javascript onresize that resizes the RadMenu div and the child scroll div, but this does not work properly. The script looked like this:

var oMenu = document.getElementById("RadMainMenu")  
var oTD = document.getElementById("menutd");  
var width = oTD.clientWidth;  
oMenu.style.width = width;  
var oScrollDiv = oMenu.firstChild;  
oScrollDiv.style.width = width;  
 

The menu did resize with the window, but it was like the menu never realized it had been resized and didn't reorder. I tried to call the menu's repaint() method, but still the same.

I know I could rearrange the menu items into sub menus but this is not an option, please let me know if you have a solution?

 

See the following basic example of a page with a menu to use as an example:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
<%@ 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 id="Head1" runat="server">  
    <title></title>  
    <style type="text/css">  
     .body, .html, .form   
     {  
       width: 100%;  
       height: 100%;  
     }  
    </style> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <h1> 
  <telerik:RadScriptManager Runat="server">  
  </telerik:RadScriptManager> 
      Header</h1> 
    <table style="width:100%; height:100%">  
      <tr> 
        <td width="100%" id="menutd">  
               <telerik:RadMenu ID="RadMainMenu" runat="server" Skin="Outlook" 
                  CollapseAnimation-Duration="10" 
                 CollapseDelay="10" CollapseAnimation-Type="None" Font-Bold="true" EnableAutoScroll="true" EnableRootItemScroll="true" width="200px">  
                 <CollapseAnimation Duration="10" Type="Linear" /> 
                   <Items> 
                    <telerik:RadMenuItem Text="Welcome" AccessKey="W">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Documents" AccessKey="D">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Maps" AccessKey="M">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Import" AccessKey="I">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Export" AccessKey="E">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Tools" AccessKey="T">  
                    </telerik:RadMenuItem> 
                    <telerik:RadMenuItem Text="Login" AccessKey="L">  
                    </telerik:RadMenuItem> 
                </Items> 
 
               </telerik:RadMenu> 
        </td> 
        <td width="1" style="white-space:nowrap;"><input type="text" />&nbsp;<input type="button" value="Search" /></td>  
      </tr> 
      <tr> 
      <td colspan="2">Main site content</td> 
      </tr> 
    </table> 
    </form> 
</body> 
</html> 
 

Regards Hans Milling
Magdalena
Telerik team
 answered on 16 Sep 2014
1 answer
108 views
I have a RadGrid that I am building dynamically from the Page_Init event in the code behind and was wondering if it is possible to change the displayed filter items by column?

Say I have two text fields that are bound I may want to have Contains and Does Not Contain displayed with the first column and Starts With for the second column. This will be based on a conditional switch within my code.

I understand how to filter the FilterMenu globally for all columns but need a column specific implementation. I have seen this  ( http://www.telerik.com/forums/radgrid-reducing-the-filter-menu-options-by-column ) example which shows a JavaScript based solution but I don't think this will work for me as I building everything dynamically.

Phil
Eyup
Telerik team
 answered on 16 Sep 2014
1 answer
102 views
Hello,

1.
Image manager doesn't display the correct image width and height in the image editor.

Scenario to reproduce:
1. Add an image to the editor and set it's width and height.
2. Select the image and click in the toolbar on the image manager, click on the Properties tab, you can notice that the width and height are not correct.
 correct width and height.

Image manager doesn't display preview for non English file names

Scenario to reproduce:
1. Add an image to the editor which the image name is not in English.
2. Select the image and click in the toolbar on the image manager, you can notice that the image is not display in the Preview.

Thanks,



Vessy
Telerik team
 answered on 16 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?