Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hi,
How to provide data to visual template dynamically using data source created at server side. I am using visual template similar as shown in below link. I want data source to be created at server side and data to be placed in TextBlock (multiple) in template. I need hyperlink in one of the text field in shape. The href value for the hyperlink will come from above data source.

Also I want to provide different colors to the shape and those color values should come from above data source. I will have three categories of shape for example category1, category2 and category3. Depending on the category, I will decide the color for the shape. Categories will come from above data source.

http://dojo.telerik.com/uZeN/6


Many Thanks
Slav
Telerik team
 answered on 16 Sep 2014
3 answers
324 views
Hello,
I want to use Client Template in RadHtmlChart but my data's column name has a special character.
My sample is here (in rune time in c#),
TooltipsAppearance.ClientTemplate = "#=dataItem."+variableX+"#";
VariableX value is "T-001" or "T - 001".

How can i define it?
ahmet
Top achievements
Rank 1
 answered on 16 Sep 2014
1 answer
48 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
708 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
190 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
80 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
194 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
48 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
103 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
358 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?