Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
82 views
Telerik Support,

There is a problem to display Radeditor tool bar on my application, please check out the attachment. The thing is it doesn't happen all the time, only sometimes.

It really drives me crazy.

Please help

Alan
Dobromir
Telerik team
 answered on 09 May 2011
1 answer
123 views
Hi,

I have created visual web part using telerik control and i deploy it to SharePoint site. Then its raise error cant find telerik assemblies. So i copy telerik dll to SharePoint bin folder. But then its raise security issue. How can i fix it?


krds
lakmal
Stanimir
Telerik team
 answered on 09 May 2011
11 answers
224 views
Hi,

since there is absolutely no documentation about RadFileExplorer I have to ask the question here.

First of all - NO documentation means really NO.
I'm used from Silverlight that some controls are not describe in the "Controls" section of the help.
But at least there is help (even tho it is just "automatically generated content" in the class references).
But here I find nothing at all.

Anyhow - from the properties I found an event

OnItemCommand


But it seems as if this event is never fired.
My approach is to give the user a browser - after he selects a file I decide if this file should be downloaded, edited with a RadEditor or...

The Idea was - I handle the OnItemCommand.
And I guessed there is a "CommandName==Open" or something like this.
So the idea was:
....OnItemCommand(....) {
if(e.CommandName=="Open")    {
    if(IsFileEditable(e.Path))    {
      string strContent=ReadFile(e.Path);
      RadEditor1.Content=strContent.
      RadFileExplorer1.Visible=false;
      RadEditor1.Visible=true;
      SaveButton.Visible=true;
      CancelButton.Visible=true;
}
.....
BUT - the OnItemCommand handler never get's fired - and due to the missing documentation I have no idea how to solve this.

And YES I have seen the "FileExplorer" sample.
BUT: the things get handled on the client - I need them on the server.
AND: exactly the thing where the FileExplorer comes to play is not visible since this is done in some other APSX file - and this file is not listed in the sample.
So all I could see there was a pages which calls a dialog and from this it get's (with some kind of magic :)) the filepath.

Regards

Manfred
Dobromir
Telerik team
 answered on 09 May 2011
2 answers
47 views
Hi All,
    I have a grid in which a detailed subgrid is binding for each item using DetailTables. Now in the ItemDatabound event, I am not able to detect which item (main grid or sub grid)  is binding. Is there a way to detect this ? Any help would be appreciated.
Thanks in advance
By Shafi
Muhamed Shafi
Top achievements
Rank 1
 answered on 09 May 2011
2 answers
203 views
Hello,

I need to write js function for custom validation of the ComboBox. Unfortunately this ComboBox is defined within ItemTemplate. So my
js code fails with message like " object not found in this context " :
.....

var

 

cbxDate = $find("<%= ComboBox.ClientID %>");
......
. How can I solve this issue?

Regards
Tomasz

 

Shinu
Top achievements
Rank 2
 answered on 09 May 2011
1 answer
321 views
i'm trying to use CssClasses with <telerik:RadMenu but it doesn't seem to work.  Inline formating, i.e. Font-Size does.  What am I missing and where is it documented?

Here's my relevant code:

 

<telerik:RadMenuItem ID="radMenuItem1" runat="server" text="Home" CssClass="radMenuBar" Width

="100px">

 

 

 

 

</telerik:RadMenuItem >

In Telerik CSS

.radMenuBar
{
font-family: Arial, Helvetica, sans-serif ;
font-size: 18px ;
font-weight: bold
text-align: center ;
 }

 

 

 

Thanks for your help,

Bayley

 

Shinu
Top achievements
Rank 2
 answered on 09 May 2011
5 answers
417 views
Hi expert,

          I follow Radwindow Demo. After that i want to remove Pin, Min, Max button of 2nd Window. How should i remove it? My code is excetly same with Demo.


Best Regards,
ALEX
Top achievements
Rank 1
 answered on 09 May 2011
9 answers
552 views
Hi,
I would to get the height of the window after the command of maximizing.

I use this client function:

function OnClientCommand(sender, eventArgs) {                
if (eventArgs._commandName == "Maximize") {
alert(GetRadWindow().getWindowBounds().height);
}

But the message shows the height of the first maximize... 

Thank.

Alessio.
            
Bader
Top achievements
Rank 1
 answered on 08 May 2011
4 answers
191 views
Hello,

I have a problem,
I have a radwindow control which displays a webpage that contains a label control.
I need to set the height of this radwindow in that label and use it within the c# code of the page.

i'm using rhe following javascript code:
function FocusOnRadWindow() {
window.setTimeout(function () {
GetRadWindow().GetContentFrame().contentWindow.focus();
var wndHeightValue = GetRadWindow().get_popupElement().style.height.toString().replace("px", "");
document.getElementById("TestLabel").innerHTML = wndHeightValue;
}, 100);
}

I call the above function like this:
<body onload="FocusOnRadWindow()">

The height is retrieved without problems, but the issue is I can't access that value in code behind. for example, If I use the following code, I recieve an error message (Attached):
int wndHeight = Convert.ToInt32(TestLabel.Text) - 130;

Please, Can you explain to me how can I solve this problem.
It is very apprecited to send me the modified code with an explaination regarding the above situation.

Regards,
Bader
Bader
Top achievements
Rank 1
 answered on 08 May 2011
1 answer
175 views
Hello,


I have a RadGrid that is using EditFormType="AutoGenerated".  I am using the InsertCommand handler to harvest the values from the controls and insert a "Video" record.  There are a couple of RadComboBox controls, numerous RadTextBox controls and a RadEditor.

The grid also has GridTemplateColumn definitions for a couple of the RadTextBoxes so that I can attach the Validator to validate an integer was entered.  The RadComboBoxes are also in a GridTemplateColumn.  

There are other grids in the project that use EditFormType="AutoGenerated"  and I am able to get the values looping through the RenderColumns.  This works..

foreach (GridColumn column in e.Item.OwnerTableView.RenderColumns)
   {
          if (column is IGridEditableColumn)
                {
                    IGridEditableColumn editableCol = (column as IGridEditableColumn);
                    if (editableCol.IsEditable)
                    {
                        editor = editMan.GetColumnEditor(editableCol);
  
  
                        if (editor is GridTextColumnEditor)
                        {
                            editorText = (editor as GridTextColumnEditor).Text;
                            editorValue = (editor as GridTextColumnEditor).Text;
  
                            if (editableCol.Column.UniqueName == "AddressTypeStr")
                            {
                                newAddressType.AddressTypeStr = editorValue.ToString();
                            }
  
                            if (editableCol.Column.UniqueName == "TypeDescription")
                            {
                                newAddressType.TypeDescription = editorValue.ToString();
                            }
                        }
                    }
                }
            } // ForEach

If I use that same construct for the way this template is layed out I am not sure how to access the values in the GridBoundColumns because the cast below does not work.

if (editor is GridBoundColumn)
  {
editorText = (editor as GridBoundColumn).Text;
editorValue = (editor as GridBoundColumn).Text;
   }


So I am unsure how to get the values from this scenario.  Here is my markup for the RadGrid.

<telerik:RadGrid ID="ctrlRadGridVideos" runat="server"  Height="700"
                  AllowFilteringByColumn="True"  EnableAJAX="true"
               AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" GridLines="None"
               ShowGroupPanel="True" ShowStatusBar="True" Skin="Telerik">
               <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="true" AllowColumnsReorder="true"
                   AllowDragToGroup="True">
                   <Selecting AllowRowSelect="True" />
                   <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                   <Resizing AllowColumnResize="True" />
               </ClientSettings>
               <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="PrimaryKey" EditItemStyle-ForeColor="#669999">
                   <RowIndicatorColumn>
                       <HeaderStyle Width="100px" />
                   </RowIndicatorColumn>
                   <ExpandCollapseColumn>
                       <HeaderStyle Width="100px" />
                   </ExpandCollapseColumn>
                   <Columns>
                       <telerik:GridEditCommandColumn HeaderStyle-Width="50" ItemStyle-ForeColor="Blue"
                                           UniqueName="Edit">
                                           <HeaderStyle Width="50px" />
                                           <ItemStyle ForeColor="Blue" />
                                       </telerik:GridEditCommandColumn>
                       <telerik:GridBoundColumn DataField="VideoTitle" HeaderText="Video Title" UniqueName="VideoTitle" EditFormColumnIndex="0"
                        ShowSortIcon="true">
                       </telerik:GridBoundColumn>                                        
                       <telerik:GridBoundColumn DataField="VideoSubTitle" HeaderText="Sub Title" UniqueName="VideoSubTitle" EditFormColumnIndex="0"
                        ShowSortIcon="true">
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn HeaderText="Description" UniqueName="VideoDescription" EditFormColumnIndex="1" Visible="false"  
                           HeaderStyle-VerticalAlign="Top" HeaderStyle-Height="100%" ShowSortIcon="true">  
                           <EditItemTemplate>  
                               <telerik:RadEditor ID="ctrlVideoDescriptionRadEditor" runat="server" Content='<%# Bind("VideoDescription") %>'  
                                    Height="100%" Width="100%" Skin="Web20">
                                    <CssFiles>
                                      <telerik:EditorCssFile Value="~/Content/css/RadEditorContentArea.css" />
                                    </CssFiles>
                               </telerik:RadEditor>
                           </EditItemTemplate>  
                                 </telerik:GridTemplateColumn>  
                       <telerik:GridTemplateColumn HeaderText="Type" UniqueName="VideoType" EditFormColumnIndex="0" Visible="false">  
                           <EditItemTemplate>  
                               <telerik:RadComboBox ID="ctrlVideoTypeRadComboBox" runat="server"  
                                     Width="220px" Skin="Web20" />  
                           </EditItemTemplate>  
                           <ItemTemplate>  
                               <asp:Label ID="ctrlVideoTypeLabel" runat="server" Text="Video Type" />  
                           </ItemTemplate>  
                       </telerik:GridTemplateColumn>  
                       <telerik:GridTemplateColumn HeaderText="Category" UniqueName="VideoCategory" EditFormColumnIndex="0" Visible="false">  
                           <EditItemTemplate>  
                               <telerik:RadComboBox ID="ctrlVideoCategoryRadComboBox" runat="server"  
                                     Width="220px" Skin="Web20" />  
                           </EditItemTemplate>  
                           <ItemTemplate>  
                               <asp:Label ID="ctrlVideoCategoryLabel" runat="server" Text="Video Category" />  
                           </ItemTemplate>  
                       </telerik:GridTemplateColumn>  
                       <telerik:GridBoundColumn DataField="VideoHyperlink" HeaderText="URL Hyperlink" UniqueName="VideoHyperlink" 
                         EditFormColumnIndex="0" Visible="false">
                       </telerik:GridBoundColumn>
                         
                       <telerik:GridBoundColumn DataField="VideoSEOKeywords" HeaderText="SEO Keywords" UniqueName="SEOKeywords" 
                          EditFormColumnIndex="0" Visible="false">
                       </telerik:GridBoundColumn>
                       <telerik:GridBoundColumn DataField="VideoSEODescription" HeaderText="SEO Description" UniqueName="VideoSEODescription" 
                          EditFormColumnIndex="0" Visible="false">
                       </telerik:GridBoundColumn>
                       <telerik:GridTemplateColumn HeaderText="Rating" UniqueName="Rating" EditFormColumnIndex="0">
                           <EditItemTemplate>
                               <asp:TextBox ID="ctrlVideoRatingRadTextBox" runat="server" ValidationGroup="checkRating"
                                   Width="80px" />
                               <asp:RegularExpressionValidator ID="RegularExpressionValidatorRating" runat="server" ControlToValidate="ctrlVideoRatingRadTextBox"
                                   ErrorMessage="Please Enter Only Numbers" ValidationExpression="^\d+$" ValidationGroup="checkRating" ForeColor="Red">
                                </asp:RegularExpressionValidator>
                           </EditItemTemplate>
                           <ItemTemplate>
                               <asp:Label ID="ctrlVideoRatingLabel" runat="server" Text="" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn HeaderText="Height" UniqueName="Height" EditFormColumnIndex="0" Visible="false">
                           <EditItemTemplate>
                               <asp:TextBox ID="ctrlVideoHeightTextBox" runat="server" ValidationGroup="checkHeight"
                                   Width="80px" />
                               <asp:RegularExpressionValidator ID="RegularExpressionValidatorHeight" runat="server" ControlToValidate="ctrlVideoHeightTextBox"
                                   ErrorMessage="Please Enter Only Numbers" ValidationExpression="^\d+$" ValidationGroup="checkHeight" ForeColor="Red">
                                </asp:RegularExpressionValidator>
                           </EditItemTemplate>
                           <ItemTemplate>
                               <asp:Label ID="ctrlVideoHeightLabel" runat="server" Text="Height" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <telerik:GridTemplateColumn HeaderText="Width" UniqueName="Width" EditFormColumnIndex="0" Visible="false">
                           <EditItemTemplate>
                               <asp:TextBox ID="ctrlVideoWidthTextBox" runat="server" ValidationGroup="checkWidth"
                                   Width="80px" />
                               <asp:RegularExpressionValidator ID="RegularExpressionValidatorWidth" runat="server" ControlToValidate="ctrlVideoWidthTextBox"
                                   ErrorMessage="Please Enter Only Numbers" ValidationExpression="^\d+$" ValidationGroup="checkWidth" ForeColor="Red">
                                </asp:RegularExpressionValidator>
                           </EditItemTemplate>
                           <ItemTemplate>
                               <asp:Label ID="ctrlVideoWidthLabel" runat="server" Text="Width" />
                           </ItemTemplate>
                       </telerik:GridTemplateColumn>
                       <%-- <telerik:GridTemplateColumn HeaderText="Hyperlink" UniqueName="VideoHyperlink" EditFormColumnIndex="0">  
                           <EditItemTemplate>  
                               <telerik:RadTextBox ID="ctrlVideoHyperlinkRadTextBox" runat="server"  
                                     Width="220px" Skin="Web20" />  
                           </EditItemTemplate>  
                           <ItemTemplate>  
                               <asp:Label ID="ctrlVideoHyperLinkLabel" runat="server" Text="Video Hyperlink" />  
                           </ItemTemplate>  
                       </telerik:GridTemplateColumn>  --%>
                       <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="Delete"
                                           HeaderStyle-Width="50" ConfirmText="Confirm: Delete Selected Video?" ConfirmTitle="Confirmation"
                                           ItemStyle-ForeColor="Blue">
                                           <HeaderStyle Width="50px" />
                                           <ItemStyle ForeColor="Blue" />
                                       </telerik:GridButtonColumn>
                   </Columns>
                   <EditItemStyle ForeColor="#669999" />
                   <PagerStyle AlwaysVisible="True" />
                   <EditFormSettings EditFormType="AutoGenerated" FormStyle-Height="500" FormStyle-Width="100%" ColumnNumber="3" >
                      <%-- <EditColumn UniqueName="EditColumn0" >
                       </EditColumn>--%>
                       <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                       <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                       <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" Width="100%" />
                       <FormTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="2" CssClass="module"    Height="110px" Width="100%" />
                       <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                 
                       
                       <FormStyle Height="700px" Width="100%" />
                        
                   </EditFormSettings>
               </MasterTableView>
           </telerik:RadGrid>

1) So I am unclear how to get the values from the GridBoundColumns or the nested controls in the GridTemplateColumns.

2) Also, this scenario is in INSERT.  Does it differ in the UpdateCommand handler?

Any suggestions would be appreciated.

Thanks,
Reid
Reid
Top achievements
Rank 2
 answered on 07 May 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?