Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
201 views
protected void grdContactList_PreRender(object sender, EventArgs e)  
        {  
            foreach (GridGroupHeaderItem groupHeader in grdContactList.MasterTableView.GetItems(GridItemType.GroupHeader))  
            {  
                string strtxt = groupHeader.DataCell.Text; // accessing the groupheader text     
                HyperLink link = new HyperLink();  
                LinkButton hyperlnk = new LinkButton(); // creting new link     
                hyperlnk.Text = "mailto:" + strtxt;  
                groupHeader.DataCell.Controls.Clear();  
                groupHeader.DataCell.Controls.Add(hyperlnk);  
            }  
        } 

Dear telerik,

Can you please help me in how to add mailto syntax in the groupheaderitem.
I need them to be able to click them and open the user mail default with the groupheaderitem emailaddress in mail to.

Thank you

Regards
Maria Ilieva
Telerik team
 answered on 19 Apr 2010
1 answer
125 views
Using Rad Controls for ASP.NET AJAX Q3 2009 SP2

All the skins I have seen have one image for the Track Bar.
Is it possible to use different images for the track bar ends? I need to create a slider bar that has rounded ends.
Bozhidar
Telerik team
 answered on 19 Apr 2010
1 answer
135 views
Hello,

here is my problem: I've got two radbinaryimages and each one is in a wizardstep inside an asp.net wizard. In step one, the first binaryimage is displayed, but when I switch to page 2, the second one is empty and I get an "Object reference not set" in the processrequestinternalmethod of the radbinaryimagehandler.
If I look inside the cache, I can see the data from the visible image but not from the second one.

The sample belows reproduce the problem. Though it's not a wizard, it's the same problem.

Did I miss something?

Best regards

Laurent

ASPX:
<telerik:RadBinaryImage runat="server" Visible="true" ID="binaryImage1" /> 
<telerik:RadBinaryImage runat="server" Visible="false" ID="binaryImage2" /> 
<asp:Button runat="server" ID="btn" OnClick="btn_Click" /> 

CS:
 protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!Page.IsPostBack) 
            { 
                byte[] img = File.ReadAllBytes(@"d:\mydocuments\My Pictures\IMG_2787.JPG"); 
                binaryImage1.DataValue = img; 
                binaryImage2.DataValue = img; 
            } 
        } 
protected void btn_Click(object sender, EventArgs e) 
        { 
            binaryImage1.Visible = !binaryImage1.Visible; 
            binaryImage2.Visible = !binaryImage2.Visible; 
        } 

Rosen
Telerik team
 answered on 19 Apr 2010
1 answer
91 views
Hi all,

RadTabStrip does not work and does not show any control like RadGrid, Calender, RadUpload etc. in RadMultiPage, RadPageView in IE8 but its working on Firefox, Chorme.
bellow my sample code:
<telerik:RadTabStrip runat="server" ID="tabStrip" Skin="Vista" MultiPageID="radMultiPage">
        <Tabs>
            <telerik:RadTab Text="Consumption Chart">
            </telerik:RadTab>
            <telerik:RadTab Text="Audit">
            </telerik:RadTab>
            <telerik:RadTab Text="Real Time Weather">
            </telerik:RadTab>
            <telerik:RadTab Text="Consumption Import">
            </telerik:RadTab>
            <telerik:RadTab Text="Profile">
            </telerik:RadTab>
            <telerik:RadTab Text="Utility">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage runat="server" ID="radMultiPage">
        <telerik:RadPageView runat="server" Selected="true">
            <iframe frameborder="0" width='850' height='1000' scrolling="yes" src="ConsumptionChart.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="Audit.aspx?Id=<%=Request.QueryString["Id"]%>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="weather.aspx?city=<%=city %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="consumptionImport.aspx?Id=<%=Request.QueryString["Id"]%>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="no" src="Profile.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
        <telerik:RadPageView runat="server">
            <iframe frameborder="0" width='850' height='1000' scrolling="yes" src="UtilityData.aspx?Id=<%=accountId %>">
            </iframe>
        </telerik:RadPageView>
    </telerik:RadMultiPage>

attach Firefox working sample.

Thanks
Yana
Telerik team
 answered on 19 Apr 2010
4 answers
161 views
Hello,

i have Hierarchy rad grid in my application. as telerik site have eg for the same in demo. (Grid / Hierarchy with Templates ).

on click of expand image it will open another Hierarchy grid... i want to do multiple sorting for the same.
how i will do multiple sorting for nested grid. actually i am not aable to get grid id to bind it in NeedDataSource event.
 how i will do the sorting for the same.
please let me knw.
Iana Tsolova
Telerik team
 answered on 19 Apr 2010
1 answer
137 views
We've started using the RadControls DatePicker for a site we're developer, and we've noticed that the DatePicker is calculating the week number incorrectly. It's easiest to see the cause of this problem if you look back to the start of the year. According to the ISO standard for week numbers (available here: http://en.wikipedia.org/wiki/ISO_week_date#Calculating_the_week_number_of_a_given_date) the first week of the year is the week that contains the first Thursday. However in your calculation the first week starts with the week containing the 1st day of the year (it appears).

Subsequently, your week numbers are incorrect by 1. Additional information can also be found here: http://wapedia.mobi/en/ISO_week_date

We would appreciate this issue looked into and hopefully fixed, as it is resulting in inaccurate data entry for our staff who use the DatePicker to find out the current week number.
Dimo
Telerik team
 answered on 19 Apr 2010
3 answers
104 views
I need to disable and enable a field in a popup edit form depending on edit or insert mode.  The grid has a MasterTableView and One Detail Table.  When I expand the MasterTableView, the Detail Table has a command Item Insert link along with edit and delete buttons.  I tried to do this in the RadGrid1_ItemCommand routine when the command is "InitInsert" but I cannot get a handle on the field I need.  How can I do this?

protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            if ("Detail".Equals(e.Item.OwnerTableView.Name)) 
            { 
                 
                if ("InitInsert".Equals(e.CommandName)) 
                {                     
                    (e.Item as GridEditableItem)["PackageName"].Enabled = true; 
                }                 
            } 
        } 



        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1"  
            GridLines="None"  AutoGenerateColumns="False"  
             OnInsertCommand="RadGrid1_InsertCommand" 
             OnItemUpdate="RadGrid1_UpdateCommand"  
             OnItemCommand="RadGrid1_ItemCommand"> 
<HeaderContextMenu EnableTheming="True"> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</HeaderContextMenu> 
 
<MasterTableView datasourceid="SqlDataSource1" DataKeyNames="Group_Name"  
                AllowFilteringByColumn="True"  Name="Header"> 
    <DetailTables> 
        <telerik:GridTableView runat="server" DataSourceID="SqlDataSource2" 
             DataKeyNames="Group_Name" CommandItemDisplay="Top" Name="Detail"  
            AllowAutomaticUpdates="False" EditMode="PopUp"> 
            <ParentTableRelation> 
               <telerik:GridRelationFields DetailKeyField="Group_Name" MasterKeyField="Group_Name" /> 
            </ParentTableRelation>   
            <CommandItemSettings AddNewRecordImageUrl="\Images\AddRecord.gif" /> 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px" /> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px" /> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridEditCommandColumn> 
                </telerik:GridEditCommandColumn> 
                <telerik:GridButtonColumn CommandName="Delete" Text="Delete"  
                    UniqueName="column3"> 
                </telerik:GridButtonColumn> 
                <telerik:GridBoundColumn DataField="Package_Name" UniqueName="PackageName" HeaderText="Package Name"  
                    Visible="True" ReadOnly="True"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="Group_Name" UniqueName="column2"  
                    Visible="False" Display="False" ReadOnly="True"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="ConnectionString"  
                    UniqueName="ConnectionString" HeaderText="Connection String"> 
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="FileId" UniqueName="FileId" Visible="False"  
                    Display="False" ReadOnly="True"> 
                </telerik:GridBoundColumn> 
                <telerik:GridDropDownColumn DataField="Active" ForceExtractValue="InEditMode"  
                    HeaderText="Active" UniqueName="Active" DataSourceID="SqlDataSource3" ListTextField="Active"  
                    ListValueField="Active"> 
                </telerik:GridDropDownColumn> 
                <telerik:GridDropDownColumn DataField="InProcess" ForceExtractValue="InEditMode"  
                    HeaderText="In Process" UniqueName="InProcess" DataSourceID="SqlDataSource3" ListTextField="Active"  
                    ListValueField="Active"> 
                </telerik:GridDropDownColumn> 
            </Columns> 
            <EditFormSettings CaptionFormatString="test"> 
                <EditColumn UniqueName="EditCommandColumn1"> 
                </EditColumn> 
            </EditFormSettings> 
        </telerik:GridTableView> 
    </DetailTables> 
    <ParentTableRelation> 
        <telerik:GridRelationFields DetailKeyField="Group_Name" /> 
    </ParentTableRelation> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn visible="True"> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="Application_Name" UniqueName="column1"  
            HeaderText="Application Name"> 
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="Group_Name" UniqueName="Group_Name"  
            HeaderText="Group Name"> 
        </telerik:GridBoundColumn> 
    </Columns> 
</MasterTableView> 
 
<FilterMenu EnableTheming="True"> 
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
        </telerik:RadGrid> 
Eric Turner
Top achievements
Rank 1
 answered on 19 Apr 2010
1 answer
54 views



Maria Ilieva
Telerik team
 answered on 19 Apr 2010
2 answers
85 views
I have a problem with RadNumericTextBox.

They work fine in Chrome, Firefox and IE in IE8 mode, but when IE runs in IE7 or compatibility mode - the texboxes disappears after all scripts are loaded.

They are visible during load but as soon as the page finish, the boxes disappear.
I don't manipulate them in in script at all, so I don't understand the problem. If I set ShowSpinButtons="False", then everything works fine.

The textbox looks like this:
<telerik:RadNumericTextBox ID="RadNumericTextBoxBedroomsFrom" runat="server" Value="0" MinValue="0" MaxValue="15" DataType="System.Int32" NumberFormat-DecimalDigits="0" Width="60px" ShowSpinButtons="True" ShowButton="False" IncrementSettings-Step="1" /> 

Kind regards
Claus
Dimo
Telerik team
 answered on 19 Apr 2010
3 answers
149 views

Hi,

I am using RadWindow to show details of an item. I have image on parent page and using onclick I call the javascript function below. Image is added to the page in code behind like this:

sb.Append(string.Format("<img title=\"Details\" src=\"images/details.png\" onclick=\"ShowWindow('SessionDetails.aspx?id={0}');return false;\"/>&nbsp;", pid));

 

 var oldUrl;
        function ShowWindow(url) {
            var oWnd = $find("<%=rwDialog.ClientID%>");
            oWnd.setUrl(url);
            oWnd.setSize(750, 480);
            oWnd.show();
            if (oldUrl == url) {
                oWnd.reload();
            }
            oldUrl = url;
        }

If I click on image to see details, it works fine. Now if I click on the same item again (without clicking any other item), it show window with the same page but without post back. Thats why I used oldUrl in script above. If page is different from last click, it only sets the url. But I used clicked on the same item, reload will give them fresh page. Problem is that that it gives browser message that page will reload.

Another thing I noticed is that it happens only if I use a close button in my child page. If I use RadWindow's default close button to close the window, I dont get that reload warning. Any ideas how can i avoid that reload message?

This is how I close child window

private void CloseWithoutParentRefresh()
    {
        string script = string.Format("<script>CloseOnReload()</" + "script>");
        ClientScript.RegisterStartupScript(this.GetType(), "CloseOnReload", script);
    }

  //GetRadWindow obtains a reference to the hosting RadWindow"
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow)
                oWindow = window.radWindow;
            else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function CloseOnReload(url) {
            GetRadWindow().close();
        }

Georgi Tunev
Telerik team
 answered on 19 Apr 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?