Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
223 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.5K+ 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
116 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
76 views
nevermind,
I found the problem....
Sheepdog
Top achievements
Rank 1
 asked on 29 Jul 2011
6 answers
324 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
258 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
6 answers
211 views
I have a problem with the TimeLine view and Internet Explorer 9. The columns in the header is not matching the columns below in IE 9 (it works in compatibility mode). I have provided screenshots from IE9 using the standard mode and the compatibility mode, and the code used to create this bug.


<%@ 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>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadScriptManager ID="manager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadScheduler ID="scheduler" runat="server" SelectedView="TimelineView"
            RowHeight="40px" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start"
            DataEndField="End" >
            <TimelineView NumberOfSlots="24" SlotDuration="0:15" ColumnHeaderDateFormat="h tt"
                TimeLabelSpan="4" ShowInsertArea="false"  />
        </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>
Joe
Top achievements
Rank 1
 answered on 29 Jul 2011
6 answers
137 views
Is there a way to change the visiblity of buttons within the CommandItemTemplate tag?  If so what does the code look like to access this property?

Please disregard this thread.  I figured it out. 



Pavlina
Telerik team
 answered on 29 Jul 2011
2 answers
550 views

I need to move selected items from a RadList box to two other listboxes depending upon which button a user clicks. I cannot use the built-in TransferToID because that will only handle one source and one target.

The RadListBox get populated with a databind on the first load ...

if (!Page.IsPostBack)

{

    RadListBox1.DataSource = dt;

    RadListBox1.DataValueField = "UserID";

    RadListBox1.DataTextField ="FullName";

     RadListBox1.DataBind();

}

 
When I try accessing the selected items during a button-click event I do NOT get any hits ... nothing shows up in the SelectedItems collection of the RadListBox.  How can I solve this problem ? 

Thanks.




protected void btnFindSelected_Click(object sender, EventArgs e)

{
StringBuilder sb = new StringBuilder();


foreach
(RadListBoxItem item in RadListBox1.SelectedItems)  
{

    sb.Append(item.Text);

        // THIS IS ALWAYS EMPTY NO MATTER HOW MANY ITEMS I SEE ON THE PAGE THAT AREA SELECTED
}

 

 

for (int i = 0; i < RadListBox1.Items.Count; i++)

{

if (RadListBox1.Items[i].Selected)

    {

    sb.Append(RadListBox1.Items[i].Text);

    }

 }

}

string thisList = sb.ToString();  
// THIS IS ALWAYS EMPTY NO MATTER HOW MANY ITEMS I SEE ON THE PAGE THAT ARE SELECTED

 

 

 

 NOTE:  I was able to get a similar version of this to work successfully in a new project ... so there must be something else affecting the original that I haven't spotted.

Steve
Top achievements
Rank 1
 answered on 29 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?