Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Hello

Can anyone help with this CSS issue I have within my RadTreeNodes? The nodes of my RadTreeView are each instantiated with a node template that is dynamically loaded from an ASCX user control for each node using the Itemplate InstantiateIn method, as standard. This works fine, except that the markup generated for each node does not inherit the css styles from my external css stylesheet file that applies for the rest of the page. There is no problem with the styles and the file, it is something to do with the way that the user control is loaded. Normally I would expect to be able to insert a link in the ASCX markup, and for the control to link to the external CSS file that way:

<link rel='stylesheet' type='text/css' href='~/mypath/mystylesheet.css' />

This doesn't seem to work for a user control that is dynamically added when each RadTreeNode is instantiated. What is the recommended technique for allowing a user control to inherit CSS styles from the page, when the user control is used dynamically as the template for each node?

Thanks very much if anyone can cast some light on this mystery.

Regards

 
Paul Robertson
Top achievements
Rank 1
 answered on 30 Jul 2011
1 answer
78 views
Hi dear,
when i click on rotator i see this error: "Microsoft JScript runtime error: Object doesn't support this property or method"
this is my javascript code for itemclicked:

function

 

itemClicked_handler(sender, args)

 

{

log(sender.get_id() +

" item was clicked. Item index is " + args.get_item().get_index());

 

 

// gets reference to the rotator object

 

 

var rotator = $find("RadRotator1");

 

 

var currentIndex=args.get_item().get_index();

 

 

// Sets currently shown item by its index

 

rotator.set_currentItemIndex(currentIndex);

}

I have 2 rotator, RadRotator1 and RadRotator2. When I click on one of the 4 items of RadRotator2,  RadRotator1 must be initiate with that clicked item of RadRotator2.
nasrin
Top achievements
Rank 1
 answered on 30 Jul 2011
2 answers
866 views
I have a RAD Grid that I am using as a worklist for users.  One of the columns needs to have a button that is called "Complete" that they can click to remove this from the worklist (a simple database update for that record)).

       <telerik:GridButtonColumn CommandName="Complete" Text="Complete" 
            UniqueName="column">
        </telerik:GridButtonColumn>


However, what event of RadGrid is called when I click this button?
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Jul 2011
4 answers
201 views
document.ready is not working in RadEditor,
when i use  the following jquery code
<script>
  $(document).ready(function() {
    $("#accordion").accordion();
});
</script>

It shows as error in RadEditor
Darren
Top achievements
Rank 1
 answered on 30 Jul 2011
5 answers
1.4K+ views
We are loading elements of Radcombobox with event OnItemsRequested.
When the Radcombobox item is selected the OnSelectedIndexChanged not work.

<asp:UpdatePanel ID="upnDadosGerais5" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
          <div style="width: 949px;  overflow: auto">
                    <telerik:RadGrid ID="rgComposicao" runat="server"  AutoGenerateColumns="false"
                        OnNeedDataSource="Composicao__NeedDataSource"
                        OnItemDataBound="rgComposicao_ItemDataBound" Height="230px"
                        HorizontalAlign="Center">
                        <MasterTableView DataKeyNames="IdComposicao">   
                        <Columns>     
                         <telerik:GridTemplateColumn HeaderText="<%$ Resources:Label, FormAberto %>" DataField="FormAberto" HeaderStyle-Width="180" ItemStyle-Width="180"
                                    UniqueName="FormAberto" SortExpression="FormAberto">
                                    <ItemTemplate>
                                        <telerik:RadComboBox ID="rdFormatoAbertoComprimento" runat="server" EnableEmbeddedSkins="false"                                                                                
                                            Skin="GraphControl" Width="160" DropDownWidth="150" EnableLoadOnDemand="True"
                                             Height="200"
                                            OnItemsRequested="rdFormatoAbertoComprimento_OnItemsRequested"                                           
                                            OnSelectedIndex="rdFormatoAbertoComprimento_OnSelectedIndexChanged"
                                            OnDataBinding="rdFormatoAbertoComprimento_OnDataBinding"
                                            EnablePostBackOnRowClick="true">
                                        </telerik:RadComboBox>                                                                                                                
                                    </ItemTemplate>                                  
                                </telerik:GridTemplateColumn>
                        </Columns>                                                    
                        </MasterTableView>
                    </telerik:RadGrid>
          </div>
       </ContentTemplate>
   </asp:UpdatePanel>


Mário Alessand Gonçalves Oliveira
Top achievements
Rank 1
 answered on 29 Jul 2011
1 answer
106 views
Hello,

I have a RadGrid that upon page load is populated with data via a default query (built via the GUI) thats fine... I also have drop down list on that page and when a user select a category from that list the Grid Rebinds to only show items in that category, It works fine (hand coded)... However when a user then selects the next page the RadGrid reloads items from the default query...

How to get the RadGrid to use the last Rebind/query when paging?

(ASP/VB.Net 2008)

Thanks
Shane
Jayesh Goyani
Top achievements
Rank 2
 answered on 29 Jul 2011
4 answers
1.0K+ views
I want to upload a single file to my application using RadAsyncUpload.
<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions="jpg,jpeg,png,gif"
                    MaxFileSize="524288" OnFileUploaded="RadAsyncUpload1_FileUploaded"
                               OnClientValidationFailed="validationFailed" MaxFileInputsCount="1">
                </telerik:RadAsyncUpload>
I restricted the input count to 1, which will disable the select file option after selecting one file, when i removed the file  it will show the select option
again,which is working for files with right extension only, for wrong extensions files  when i removed the file,  the select option is not visible, i want to show select option in both cases in my application.How can i achieve it.
illumination
Top achievements
Rank 2
 answered on 29 Jul 2011
0 answers
57 views
nevermind,
I found the problem....
Sheepdog
Top achievements
Rank 1
 asked on 29 Jul 2011
6 answers
292 views
Hi,

I am using the RadGrid with RadFilter. I wanted to show only certain flter menu options. I found a code in the documentation and tried but I am getting an error 'findItemByValue(...) ' is null or not an object. The code is shown below. Does anyone have the same problems.

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

<script type="text/javascript">

 

function pageLoad(sender, args)

 

{

 

var filter = $find("<%=RadFilter1.ClientID %>");

 

 

var menu = filter.get_contextMenu();

 

menu.add_showing(FilterMenuShowing);

}

 

function FilterMenuShowing(sender, args)

 

{

 

var filter = $find("<%=RadFilter1.ClientID%>");

 

 

var currentExpandedItem = sender.get_attributes()._data.ItemHierarchyIndex;

 

 

var fieldName = filter._expressionItems[currentExpandedItem];

 

 

var allFields = filter._dataFields;

 

 

var dataType = null;

 

 

for (var i = 0, j = allFields.length; i < j; i++)

 

{

 

if (allFields[i].FieldName == fieldName)

 

{

dataType = allFields[i].DataType;

 

break;

 

}

}

 

 

switch (dataType)

 

{

 

case "System.Int32":

 

sender.findItemByValue(

"NotEqualTo").set_visible(false);

 

sender.findItemByValue(

"Between").set_visible(false);

 

sender.findItemByValue(

"NoBetween").set_visible(false);

 

sender.findItemByValue(

"IsNull").set_visible(false);

 

sender.findItemByValue(

"NotIsNull").set_visible(false);

 

 

break;

 

 

case "System.String":

 

sender.findItemByValue(

"DoesNotContain").set_visible(false);

 

sender.findItemByValue(

"NotEqualTo").set_visible(false);

 

sender.findItemByValue(

"GreaterThan").set_visible(false);

 

sender.findItemByValue(

"LeassThan").set_visible(false);

 

sender.findItemByValue(

"GreaterThanOrEqualTo").set_visible(false);

 

 

break;

 

 

case "System.DateTime":

 

sender.findItemByValue(

"NotEqualTo").set_visible(false);

 

sender.findItemByValue(

"Between").set_visible(false);

 

sender.findItemByValue(

"NoBetween").set_visible(false);

 

sender.findItemByValue(

"IsNull").set_visible(false);

 

sender.findItemByValue(

"NotIsNull").set_visible(false);

 

 

break;

 

}

}

 

</

 

script>

 

 

 

 

 

 

 

</telerik:RadCodeBlock>

 

Raji
Top achievements
Rank 1
 answered on 29 Jul 2011
5 answers
234 views
Hi,

I have a RadFilter on a page which has a RadGrid with data in it.  The data in the grid may or may not contain a " in it.
If you currently attempt to use the filter with "Contains" and " in the text box, the following javascript error is thrown:

Sys.WebForms.PageRequestManagerServerErrorException: Unterminated string literal

It is a requirement that I be able to use the filter to find data that has a " in it.

My version of Telerik dlls is: 2011.1.413.35 (Q1 2011) ASP.NET AJAX

In an attempt to solve this, I have tried to do a replace before the OnApplyExpressions event finishes with Replace("\"", "\\\"") however this yields the same error as above.  The thought behind this was that I could escape it so that the javascript would no longer end prematurely.

Any help would be appreciated.
Thanks
Raji
Top achievements
Rank 1
 answered on 29 Jul 2011
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?