Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
60 views
My custom parser works like a charm but now I need to know how to set the style of DateInputBox to valid.

I override the dateParser function like this.

Telerik.Web.UI.RadDateInput.prototype.parseDate = function (value, baseDate) {
  
//Some logic here
//
//
  
//Set new date
sender.set_textBoxValue(NewDate.format(sender._displayDateFormat));
//Need to set box to valid state
  
}

Anyone with a fast answer to this ...
//Henrik
Henrik
Top achievements
Rank 1
 answered on 25 Jan 2011
1 answer
206 views
Hi,

I have a rad window & I am trying to open this window in a specified position. Can you help me with some example how can I open a rad window with some specific left & top position.

Here is my code -

 

 

var wnd = window.radopen("OpenWin.aspx", "window1");

 

wnd.setSize(780, 480);

 

wnd.SetTitle("title");

Thanks

 

Shinu
Top achievements
Rank 2
 answered on 25 Jan 2011
1 answer
54 views
I have a pie chart that displays everything that I want it to, however I can not get the label to show BOTH the number from the column, and the percentage of the chart.

This shows the number correctly:
Protected Sub RadChart1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Charting.ChartItemDataBoundEventArgs) Handles RadChart1.ItemDataBound
 
        e.SeriesItem.Label.TextBlock.Text = TryCast(DirectCast(e.DataItem, DataRowView)("number"), String)
 
    End Sub

This shows the percentage correctly:
e.SeriesItem.Label.TextBlock.Text = " - #%"

But this does NOT show both, it only shows the percentages still...
e.SeriesItem.Label.TextBlock.Text = TryCast(DirectCast(e.DataItem, DataRowView)("number"), String) + " - #%"

Is there a way to display both?
Evgenia
Telerik team
 answered on 25 Jan 2011
2 answers
66 views
Telerik Control Build: v4.0.30319
OS: Windows Server 2008
VS: 2010

The following code will not work in MasterPage, Regular Webform, nor ContentPage code:

            
<script type="text/javascript">
    //<!CDATA[
    function OpenSignInWindow() {
        var oWnd = $find("<%=rwmXYSignInControl.ClientID %>");
        oWnd.show();
    }
    //]]>
</script>

<span class="xyRegisterSpan"  id="xySignInSpan" runat="server">Register</span><br><span class="xySignInSpan" onclick="OpenSignInWindow()">&nbsp;|&nbsp;Sign-In<br></span>

<telerik:RadWindowManager ID="rwmXYSignInControl" runat="server"
    VisibleOnPageLoad="false" Skin="Black">
    <Windows>
        <telerik:RadWindow ID="xySignIn" runat="server" Height="300px" Width="450px" Modal="true">
            <ContentTemplate>
                 <div id="xySignInContent" runat="server">
                     <asp:Label ID="xySignInUsername" runat="server" Text="Username" ForeColor="Aqua"></asp:Label><telerik:RadTextBox
                      ID="xyUsername" runat="server" Skin="Black" >
                     </telerik:RadTextBox>
                    
                     <asp:Label ID="xySignInPassword" runat="server" Text="Password"></asp:Label><telerik:RadTextBox
                      ID="xyPassword" runat="server" Skin="Black">
                     </telerik:RadTextBox>
                 </div>
            </ContentTemplate>
        </telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>
Kevon Hayes
Top achievements
Rank 1
 answered on 25 Jan 2011
11 answers
795 views
Hi, I'm using the 2010Q1 with VS 2008 in VB

I read KP, and samples on working with files extensions and FileExplorer.


I try to change this example (http://www.telerik.com/ArticleFileDownload.aspx?I=bdmh&G=bahm) in order to force IE to ask user for open/download files when they click on open button.
I don't want the display dialog box for any files.

I tryed to replcae
 ' The docx files are downloaded ;  
        If Path.GetExtension(physicalPathToFile).Equals(".docx", StringComparison.CurrentCultureIgnoreCase) Then  
            ' Handle .docx files ;  
            Me.WriteFile(physicalPathToFile, "application/vnd.openxmlformats-officedocument.wordprocessingml.document", Context.Response)  
        End If  
          
        If Path.GetExtension(physicalPathToFile).Equals(".jpg", StringComparison.CurrentCultureIgnoreCase) Then  
            ' Handle .jpg files ;  
            WriteFile(physicalPathToFile, "image/jpeg", Context.Response)  
        End If  
          
        ' "txt/html" is the default valuse for Response.ContentType property;  
        ' do not download the file. Open in the window ;  
        Context.Response.WriteFile(physicalPathToFile) 
by
 WriteFile(physicalPathToFile, "", Context.Response) 

But it don't work.

It work for ".doc" and ".xls" files (IE ask me if I wan't to download, open ou calcel)
for ".jpg" files IE ask me too if I wan't to open or download it, but there is a telerik box under this dialog box
for ".dwg" files IE don't ask me anythink and try to display it as text

Please can you help me ? I Know my english is bad, excuses me for this, but I can't find the soluce by myself.

Regards

Anthony
Yoon-Ho Choi
Top achievements
Rank 1
 answered on 25 Jan 2011
1 answer
89 views
Hi,

I am trying to add a RadComboBoxItem client side, but am receiving the Object expected error.  This is the line of code that fails:

var

 

 

comboItem = new Telerik.Web.UI.RadComboBoxItem();

When I debug the javascript, I notice that Telerik.Web.UI does not contain RadComboBoxItem which is why the exception is being thrown.  Is there a reference of some sort that I need to include to use this class?

Matt

Kalina
Telerik team
 answered on 24 Jan 2011
1 answer
1.0K+ views
Hi,
I am using RadTabStrip and RadMultipage on my page.
Now, simply on my page load, depending on some criiteria, I need to hide one of the Tab.
When I am setting up Tab to visible false, its not setting up MultiPageView properly and that's tab's multipageview is getting displayed on next tab.
Please remember, I cannot remove that tab at runtime as I have so many controns in that which are used even though its hidden so if I remove tab at runtime, my code will not find those controls and will generate runtime errors so I need to visible false one Tab and its related MultiPageView.
Here is my Tab.
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" MultiPageID="RadMultiPage1"
                                    Skin="WebBlue" Width="1050px">
                                    <Tabs>
                                        <telerik:RadTab Text="Questionnaire" SelectedCssClass="SelectedTab" DisabledCssClass="DisabledTab" PageViewID="RadPageView1" >
                                        </telerik:RadTab>
                                        <telerik:RadTab Text="Product Information" SelectedCssClass="SelectedTab" DisabledCssClass="DisabledTab" PageViewID="RadPageView2" >
                                        </telerik:RadTab>
                                        <telerik:RadTab Text="Financial & Operational Considerations" SelectedCssClass="SelectedTab" PageViewID="RadPageView3" 
                                            DisabledCssClass="DisabledTab">
                                        </telerik:RadTab>
                                        <telerik:RadTab Text="Upload Files" SelectedCssClass="SelectedTab" DisabledCssClass="DisabledTab" PageViewID="RadPageView4" >
                                        </telerik:RadTab>
                                        <telerik:RadTab Text="Financial Use Only" SelectedCssClass="SelectedTab" DisabledCssClass="DisabledTab" PageViewID="RadPageView5" >
                                        </telerik:RadTab>
                                        <telerik:RadTab Text="Submit Request" SelectedCssClass="SelectedTab" DisabledCssClass="DisabledTab" PageViewID="RadPageView6" >
                                        </telerik:RadTab>
                                    </Tabs>
                                </telerik:RadTabStrip>
  
  
  
                                <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" class="RadMultipageStyle">
                                    <telerik:RadPageView ID="RadPageView1" runat="server">
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadPageView2" runat="server">
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadPageView3" runat="server">
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadPageView4" runat="server">
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadPageView5" runat="server">
                                    </telerik:RadPageView>
                                    <telerik:RadPageView ID="RadPageView6" runat="server">
                                    </telerik:RadPageView>
</telerik:RadMultiPage>

Now, on page_load, I simply want to visible false number 5 Tab ( so Its RadPageView will also be visible false ). I tried this.

RadTabStrip1.Tabs[4

].Visible = false;

 

but what happens is that tab is visible false but "RadPageView5" is getting displayed under its next tab.
So How do I visible false this tab and its pageview, And again, I have to visible it false because I have to use the contols inside that pageview. So I just dont want to display that tab.

Thanks in advance,
Nirav
Top achievements
Rank 1
 answered on 24 Jan 2011
1 answer
235 views
Hi, i'm trying to export only a few columns of a  bounded Radgrid in my asp.net page to a .CSV. How to determine/select the columns that will be exported by their names? The code to select the columns need to be in GridExporting? Thanks.
Daniel
Telerik team
 answered on 24 Jan 2011
3 answers
94 views
I have a RadAjaxLoadingPanel on an aspx page which works fine in IE 7, however, in Firefox Version 3..6.13 it keeps on turning even when the page has finished loading. Just wondering if anyone has ever seen this problem? If I disassociate the loading panel control with the RadAjaxPanel then there's no issue on the page it loads correctly.
Shaya
Top achievements
Rank 1
 answered on 24 Jan 2011
2 answers
145 views
Why do each of the items in a self-referencing hierarchy grid have child columns displayed -- even when there are no children for the item?  (Note:  I *do* want a row columns displayed if there are child items, just not displayed when there are *no* children.)

I'm implementing a radgrid in 508 mode where the child row column headers are displayed (along with the main column headers).  What I want displayed is as follows:

Parent Column 1  |  Parent Column 2  |  Parent Column 3
Parent row ............
Child Column 1  |  Child Column 2  |  Child Column 3
Child row .............
Child Column 1  |  Child Column 2  |  Child Column 3
Child row .............

However, when there's only one child, the following is displayed:

Parent Column 1  |  Parent Column 2  |  Parent Column 3
Parent row ............
Child Column 1  |  Child Column 2  |  Child Column 3
Child row .............
Child Column 1  |  Child Column 2  |  Child Column 3

As you can see, the Child Column headers are showing up childCount + 1 times (if there are no children, a child header row appears anyway).

I've tried hiding the column headers on the ItemCreated event, but haven't been successful.

Here's the code definition corresponding to the grid:

<telerik:RadGrid ID="grdNotes" runat="server" OnColumnCreated="grdNotes_ColumnCreated"
    OnItemCreated="grdNotes_ItemCreated" OnItemDataBound="grdNotes_ItemDataBound"
    OnNeedDataSource="grdNotes_NeedDataSource"
    OnPreRender="grdNotes_PreRender" AutoGenerateColumns="False"
    SkinID="HierarchicalGrid" GridLines="None" AllowCustomPaging="True"
    ShowStatusBar="True" PageSize="20" Width="100%"
    EnableLinqExpressions="False">
    <HeaderContextMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </HeaderContextMenu>
    <ClientSettings Selecting-AllowRowSelect="true" Resizing-AllowColumnResize="true">
<Selecting AllowRowSelect="True"></Selecting>
 
        <ClientEvents OnRowSelected="NoteRowSelected" OnRowContextMenu="NoteContextMenu"
            OnRowDblClick="grdNotes_OnRowDblClick" OnColumnResized="ResizeAllNoteColumns"
            OnGridCreated="NotePageLoad" />
 
<Resizing AllowColumnResize="True"></Resizing>
    </ClientSettings>
    <PagerStyle Position="Bottom" AlwaysVisible="True" Mode="NextPrevAndNumeric" Wrap="False"
        BackColor="White" Font-Size="Large" />
    <MasterTableView HierarchyDefaultExpanded="true" HierarchyLoadMode="Client" AllowSorting="true"
        DataKeyNames="Id,ParentId,Token,IsRoot,Replies,NoteCreator" ClientDataKeyNames="Id,ParentId,Token,IsRoot,Replies,NoteCreator"
        NoDetailRecordsText="" EnbleNoRecordsTemplate="True" Width="100%">
        <SelfHierarchySettings ParentKeyName="ParentId" KeyName="Id" MaximumDepth="20" />
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <Columns>
            <telerik:GridClientSelectColumn DataTextField="Id" HeaderAbbr="Select"
                HeaderButtonType="TextButton" HeaderText="Select"
                HeaderTooltip="Select/Deselect" Text="Select" Visible="false" UniqueName="asgSelect"
                HeaderStyle-Width="7%">
<HeaderStyle Width="7%"></HeaderStyle>
            </telerik:GridClientSelectColumn>
            <telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id"
                UniqueName="Id" HeaderStyle-Width="5%" >
<HeaderStyle Width="5%"></HeaderStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Title" HeaderText="Title" SortExpression="Title"
                UniqueName="Title" HeaderStyle-Width="20%" >
<HeaderStyle Width="20%"></HeaderStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Body" HeaderText="Body" SortExpression="Body"
                UniqueName="Body" HeaderStyle-Width="37%" >
<HeaderStyle Width="37%"></HeaderStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedBy" HeaderText="Created By" SortExpression="CreatedBy"
                UniqueName="CreatedBy" HeaderStyle-Width="10%" >
<HeaderStyle Width="10%"></HeaderStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedDate" HeaderText="Created On" SortExpression="CreatedDate"
                UniqueName="CreatedOn" HeaderStyle-Width="10%" >
<HeaderStyle Width="10%"></HeaderStyle>
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="ParentId" HeaderText="Parent Id" SortExpression="ParentId"
                UniqueName="ParentId" Visible="false" />
            <telerik:GridBoundColumn DataField="Token" HeaderText="Token" SortExpression="Token"
                UniqueName="Token" Visible="false" />
            <telerik:GridBoundColumn DataField="IsRoot" HeaderText="IsRoot" SortExpression="IsRoot"
                UniqueName="IsRoot" Visible="false" />
            <telerik:GridBoundColumn DataField="Replies" HeaderText="Replies" SortExpression="Replies"
                UniqueName="Replies" Visible="false" />
            <telerik:GridBoundColumn DataField="NoteCreator" HeaderText="NoteCreator" SortExpression="NoteCreator"
                UniqueName="NoteCreator" Visible="false" />
            <telerik:GridTemplateColumn UniqueName="Actions" HeaderStyle-Width="15%" HeaderText="Actions"
                Visible="false">
                <ItemTemplate>
                    <telerik:RadToolBar ID="rtbNoteActions" runat="server" SkinID="ActionToolbar"
                        OnButtonClick="NotesGridToolbarButtonClicked" OnClientButtonClicking="NoteActionToolbarClicking">
                        <Items>
                            <telerik:RadToolBarButton Text="Properties" CommandName="Properties" ImageUrl="~/Images/page_view.gif" />
                            <telerik:RadToolBarButton Text="Reply" CommandName="Reply" ImageUrl="~/Images/page_edit.gif" />
                            <telerik:RadToolBarButton Text="Security" CommandName="Security" ImageUrl="~/Images/shield16.gif" />
                            <telerik:RadToolBarButton Text="Delete" CommandName="Delete" ImageUrl="~/Images/delete16.gif" />
                        </Items>
                    </telerik:RadToolBar>
                </ItemTemplate>
 
<HeaderStyle Width="15%"></HeaderStyle>
            </telerik:GridTemplateColumn>
        </Columns>
 
<PagerStyle AlwaysVisible="True"></PagerStyle>
    </MasterTableView>
    <FilterMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </FilterMenu>
</telerik:RadGrid>


The code behind for the ItemCreated is as follows:

protected void grdNotes_ItemCreated(object sender, GridItemEventArgs e)
 {
     CreateExpandCollapseButton(e.Item, "Id");
 
     if (e.Item is GridHeaderItem && e.Item.OwnerTableView != grdNotes.MasterTableView)
     {
         if (!CachedApplicationData.UseAssistiveTechnology)
         {
             e.Item.Style["display"] = "none";
         }
     }
 
     if (e.Item is GridNestedViewItem)
     {
         e.Item.Cells[0].Visible = false;
         e.Item.Cells[1].Style.Add(HtmlTextWriterStyle.Padding, "0px");
     }
 }

Matt
Top achievements
Rank 1
 answered on 24 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?