Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
63 views
Hi Telerik,

I want to display the selected day on the RadCalendar Title Bar.

Similar to 21st Month Label in titlebar of Attached Image.

Please help me to sort out this issue.

Dimo
Telerik team
 answered on 07 Sep 2010
3 answers
689 views
Hye,

I am using the RadGrid v2010.2.826.20 and I notice a strange behavior.
The RadGrid works when it is linked on a DataSource by its ID
But when I linked the RadGrid by the DataSource (the object reference ), the Column sorting doesn't work.
 

Common part
<asp:SqlDataSource runat="server" ID="SqlDataSource2"
    ConnectionString="<%$ ConnectionStrings:DEV_3.1ConnectionString %>"
    OldValuesParameterFormatString="original_{0}"
    SelectCommand="SELECT * FROM [M9999_Table]">
</asp:SqlDataSource>
 
<telerik:RadGrid ID="RadGrid2" runat="server" >
    <MasterTableView AllowSorting="true">
     </MasterTableView>
</telerik:RadGrid>

A) The code that works.
protected void Page_Load(object sender, EventArgs e)
{
    this.RadGrid2.DataSourceID = this.SqlDataSource2.ID;
}

B )The code that doesn't work.
protected void Page_Load(object sender, EventArgs e)
{
    this.RadGrid2.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid2_NeedDataSource);
}
 
void RadGrid2_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
{
    this.LoadData();
}
 
private void LoadData()
{
    this.RadGrid2.DataSource = this.SqlDataSource2;  
}




I attached handlers on the Selected and Selecting events od the SqlDataSource.
When I click on a column header in order to sort it.
By Method A : Two events are raised :
 - Selecting with a correct SortExpression.
 - Selected with a correct SortExpression.

By Method B : Four events are raised :
 - Selecting with a correct SortExpression.
 - Selected with a correct SortExpression.
and then
- Selecting with an empty SortExpression.
- Selected with an empty SortExpression.


I guest do something wrong, but I don't know what.

Any help will be appreciated.


Iana Tsolova
Telerik team
 answered on 07 Sep 2010
9 answers
276 views
I have a Grid to which I have added a context menu that appears when the OnRowContextMenu event fires.  This works perfectly on Windows systems, but on a Mac (using Firefox), the OnRowContextMenu event doesn't seem to fire at all.  I've tested several of the other ClientEvents, and they all seem to fire.  Is this a problem with Mac, or am I doing something wrong?

Thanks for any help.
Pavel
Telerik team
 answered on 07 Sep 2010
1 answer
491 views
Hi, i'm trying to use RadAjaxLoadingPanel, with the IsSticky property set to true.

The loading panel shows up just fine, but under my RadMenu instance, and any other RadWindow instance.

Inside this webpage: http://www.telerik.com/help/aspnet-ajax/controlling-absolute-positioning-with-zindex.html telerik says that LoadingPanel's z-index is 90000, RadWindow is 3000 and RadMenu is 7000.
If that is true can you tell me why my LoadingPanel keeps under those controls(Menu and Window)?

If I set the IsSticky property to false then the LoadingPanel goes over RadMenu and RadWindow, but it doesn't cover all my page, and I need it to cover it ALL, not just a piece of it.

I need one of these two solutions:

1) You tell me how to make the Loading panel cover all my page when IsSticky is set to false. When I say all my page, I really mean the ENTIRE space, even if I drag my RadWindow down and the space grows up.
2) You tell me how to force the Sticky LoadingPanel z-index so it really work over RadWindow and RadMenu;

Hope seeing any answer soon.

Thanks!

Cezar
Dimo
Telerik team
 answered on 07 Sep 2010
5 answers
355 views

  protected void hyGeneratePdf_Click(object sender, EventArgs e)
        {
            LinkButton linbutton = (System.Web.UI.WebControls.LinkButton)sender;
            HttpContext context = this.Context;
            string fileName = linbutton.Text.Trim();
            string pdfFolderPath = Path.Combine(Server.MapPath("PDF/"), Session["UserName"].ToString());
            string filePath = Path.Combine(pdfFolderPath, fileName);
            string needZipFiles = filePath;
            byte[] zipFileContent = DownLoadSelectFile.createZip(context, needZipFiles, 1);
            if (zipFileContent != null)
            {
                _downPdfFile(zipFileContent,fileName, 1);
            }
        }
when  implementing this code there has en error:The name 'hyGeneratePdf' does not exist in the current context
Can you help me ,where is worng?
this is my code behind:
<asp:Panel ID="panelPdfList" runat="server" ScrollBars="Auto" Height="304px" Width="430px"
                                                valign="top">
                                                <telerik:RadScriptBlock ID="rsbDownLoad" runat="server">
                                                    <script type="text/javascript">
                                                        function RequestStart(sender, args) {
                                                            if (args.get_eventTarget() == "<%=hyGeneratePdf.UniqueID %>",) {
                                                                args.set_enableAjax(false);
                                                            }
                                                        }
                                                    </script>
                                                </telerik:RadScriptBlock>
                                                <telerik:RadAjaxPanel ID="rapGridView" runat="server">
                                                    <asp:GridView ID="grvPdfFileList" runat="server" AutoGenerateColumns="False" GridLines="None"
                                                        Width="400px" ShowHeader="False" OnRowDataBound="grvPdfFileList_RowDataBound">
                                                        <Columns>
                                                            <asp:TemplateField>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:CheckBox ID="chkIsChecked" runat="server" OnCheckedChanged="chkIsChecked_CheckedChanged" />
                                                                </ItemTemplate>
                                                                <ItemStyle Font-Names="Calibri" Font-Size="11pt" HorizontalAlign="Left" Width="40px"
                                                                    Height="15px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                   <telerik:RadAjaxPanel ID="rapLinkButton" runat="server" ClientEvents-OnRequestStart="RequestStart">
                                                                        <asp:LinkButton ID="hyGeneratePdf" CssClass="leftnav" Style="color: Black; font-family: Calibri;"
                                                                            runat="server" Text='<%#Eval("UserName") %>' OnClick="hyGeneratePdf_Click"></asp:LinkButton>
                                                                    </telerik:RadAjaxPanel>
                                                                </ItemTemplate>
                                                                <ItemStyle Font-Names="Calibri" Font-Size="11pt" HorizontalAlign="Left" Width="240px"
                                                                    Height="15px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGenerateTime" runat="server" Text='<%#Eval("UserPassword") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <ItemStyle Font-Names="Calibri" Font-Size="11pt" HorizontalAlign="Left" Width="130px"
                                                                    Height="15px" />
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <HeaderStyle Height="0px" />
                                                        <RowStyle Height="10px" />
                                                    </asp:GridView>
                                                </telerik:RadAjaxPanel>
                                            </asp:Panel>
Diana
Top achievements
Rank 1
 answered on 07 Sep 2010
1 answer
92 views
Hello,

Column

A

Column

               B

 

 

 

protected void RadGrid1_ExcelMLExportRowCreated(object source, GridExportExcelMLRowCreatedArgs e)
    {
        if (e.RowType == GridExportExcelMLRowType.HeaderRow)
        {
            for (int i = 0; i < e.Row.Cells.Count; i++)
            {
                e.Row.Cells[i].Data.DataItem = e.Row.Cells[i].Data.DataItem.ToString().Replace("<br />", "\r\n");
            }
        }
    }

The above grid has 2 columns which are 'Column<br />A' and 'Column<br />B'.

When I export data using excelml, I replace '<br />' with '\r\n'. However it is not working.

How can I insert new line?

Thank you.

Minkyu Lee.
Shinu
Top achievements
Rank 2
 answered on 07 Sep 2010
4 answers
108 views
i think there is a bug , something in the highlightning gets inversed when you click a menu item, try this code:
click the first item, then hover on the second.
it also can highlight two menu items at the same time.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<head runat="server">
    <title></title>
</head>
<body dir="rtl">
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
    <telerik:RadMenu ID="RadMenu1" runat="server" style="padding-top:20px; padding-bottom: 30px;"
             EnableRoundedCorners="True" EnableShadows="True" Flow="Vertical" Skin="Outlook" ClickToOpen="True" 
                    CollapseDelay="100"
                    EnableSelection="False">
             <Items>
               <telerik:RadMenuItem Text="one">
                        <Items>
                            <telerik:RadMenuItem Text="first" PostBack="False"/>
                            <telerik:RadMenuItem runat="server" Text="second" PostBack="False">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenuItem>
                                   <telerik:RadMenuItem Text="two">
                        <Items>
                            <telerik:RadMenuItem Text="first" PostBack="False"/>
                            <telerik:RadMenuItem runat="server" Text="second" PostBack="False">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenuItem>
                    <telerik:RadMenuItem Text="three" 
                     NavigateUrl="http://telerik.com" Target="_blank">
                    </telerik:RadMenuItem>
                    </Items>
                    <ExpandAnimation Duration="1000" />
                    </telerik:RadMenu>
    </div>
    </form>
</body>
</html>

also how can i disable the highlightning upon hovering?
Peter
Telerik team
 answered on 07 Sep 2010
1 answer
115 views
hi

i have on my aspx page a select command:

  <telerik:GridButtonColumn CommandName="Select" DataTextField="ZipCode"
            HeaderText="Zipl Code"  Text="Zip Code" UniqueName="ZipCode">
        </telerik:GridButtonColumn>

I am trying to pass the value of zip code a session but is empty. Zip code is not a primary key and i can see the zip code display in the grid. How do get the zip code value? thanks

If e.CommandName = "Select" Then
Dim selectedRow As GridDataItem = DirectCast(e.Item, GridDataItem)
            Session("zipcode") = selectedRow("zipcode").Text

End if

Princy
Top achievements
Rank 2
 answered on 07 Sep 2010
1 answer
119 views
I am unable to get the self-referencing hierarchy to work. The table consists of many columns, but the two keys are svcref_id and svcref_parent_id - if it's a root node, those two would be the same, If it's a child, the svcref_parent_id would point to another svcref_id.

The way I have my grid set up is:
<telerik:RadGrid runat="server" ID="rgdSearch" OnNeedDataSource="rgdSearch_NeedDataSource" Height="180px" Skin="WebBlue" Width="775px" OnItemCommand="rgdSearch_ItemCommand" OnColumnCreated="RadGrid1_ColumnCreated" OnItemCreated="RadGrid1_ItemCreated" OnItemDataBound="RadGrid1_ItemDataBound">
    <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" AutoGenerateColumns="false" AllowPaging="true" DataKeyNames="svcref_id, svcref_parent_id" PageSize="5" FilterExpression="svcref_parent_id = svcref_id">
        <SelfHierarchySettings ParentKeyName="svcref_parent_id" KeyName="svcref_id" />
        <PagerStyle AlwaysVisible="true" />
        <Columns>
            <telerik:GridBoundColumn DataField="svcref_id" UniqueName="svcref_id" Visible="false" />
            <telerik:GridBoundColumn DataField="svcref_parent_id" UniqueName="svcref_parent_id" Visible="false" />
            <telerik:GridBoundColumn HeaderText="Service" HeaderStyle-Height="20px" DataField="svc_name" UniqueName="svc_name" />
        </Columns>
        <NoRecordsTemplate>
            <asp:Label runat="server" ID="lblNoRecords" Text="There are no records to display." meta:resourckey="lblNoRecords"></asp:Label>
        </NoRecordsTemplate>
    </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="true" AllowExpandCollapse="true">
        <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
        <Scrolling AllowScroll="true" UseStaticHeaders="true" />
    </ClientSettings>
</telerik:RadGrid>

I have followed the example on your website, but this is how my grid looks at run-time (attached picture)

The only thing I changed (that I know of), besides changing RadGrid1 to the name of my grid, from your tutorial/demo is the following lines (my key).
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    CreateExpandCollapseButton(e.Item, "svcref_id");
}

and (also my key),
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    CreateExpandCollapseButton(e.Item, "svcref_id");

Thanks
Pavlina
Telerik team
 answered on 07 Sep 2010
1 answer
103 views
Hi,
I'm using RadMenu. I have to change opacity of whole page. So I wrote a code:

protected void Page_Load(object sender, EventArgs e)
    {
        ClientScript.RegisterStartupScript(typeof(string), "DoDarker", "$('html').css('opacity', 0.7);", true);
    }

and an aspx file:

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" 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">
 
<head runat="server">
    <title></title>
 
    <script src="jquery-1.4.2.min.js" type="text/javascript"></script>
</head>
<body style="background-color: Maroon;">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadMenu ID="RadMenu1" runat="server">
            <Items>
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem1">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 2">
                        </telerik:RadMenuItem>
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 3">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
                <telerik:RadMenuItem runat="server" Text="Root RadMenuItem2">
                    <Items>
                        <telerik:RadMenuItem runat="server" Text="Child RadMenuItem 1">
                        </telerik:RadMenuItem>
                    </Items>
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="Button" />
    </form>
</body>
</html>
And now when I open that page Firefox, everything is ok. In IE8 there is an error - child items in menu are white. I attached screens:
Firefox: 
http://i51.tinypic.com/2it3tf.jpg
IE8:
http://i52.tinypic.com/6tfiif.jpg

How to fix this?
Kamen Bundev
Telerik team
 answered on 07 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?