Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
137 views
Hi,
    i have a scenario where i use the grid inbuilt sorting inbuilt sorting behaviour:
<sortexpressions> 
        <telerik:gridsortexpression fieldname="Sort" sortorder="Ascending" /> 
</sortexpressions> 
i got an undersired behaviour instead of having row sorting from 1- 15, i get 1-10-15- 2-9. as seen in the attached a screen shot.

Regards;
Adrian


Pavlina
Telerik team
 answered on 08 Jul 2010
1 answer
190 views
Hi,
I am using Q1 2010 AJAX ASP.Net controls for development.

I have one RadGrid placed on page, and on ItemCommand event i am exporting crystal report to pdf (working with response) then it gives me an error like:
{Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

One thing to be note is that same is working on any event of asp control.
This happens when I use RadAjaxManager in my page.
My code for same is as below:
// Get the report document 
        CrystalDecisions.CrystalReports.Engine.ReportDocument repDoc = GetReportDocument(); 
        // Stop buffering the response 
        Response.Buffer = false; 
        // Clear the response content and headers 
        Response.ClearContent(); 
        Response.ClearHeaders(); 
        try 
        { 
            repDoc.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, false, "Invoice"); 
            
        } 
        catch (System.Threading.ThreadAbortException ex1) 
        { 
            ex1 = null; 
            Response.End(); 
        } 
        catch (Exception ex) 
        { 
            ex = null; 
        } 
        finally 
        { 
        } 

Please suggest to overcome this issue.

With Regards,
Naresh Goradara
Tsvetina
Telerik team
 answered on 08 Jul 2010
1 answer
143 views
Hi ,
I use the two div to load radgrids which one only show grid title (null data) ,other show detail data. and  use javascript to control them, but display abnormal..
If i have not set grid AllowScroll=true,and not use the RadFormDecorator control,webpage can be show normal...Once i setup one of them,the page will show abnormal. 
my project must be used grid allow scroll and RadFormDecorator .

the attachment is  error screen,

I don't know how to handle, please help me! Thank you..
<%@ 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>Div+RadGird Error</title>
    <script language="javascript" type="text/javascript">
        function showdiv()
        {
            var obj=document.getElementById("DType").value;
            if(obj==1)
            {
                document.getElementById("Div_NullData").style.display="none";
                document.getElementById("Div_FullData").style.display="";
            }
            else
            {
                document.getElementById("Div_NullData").style.display="";
                document.getElementById("Div_FullData").style.display="none";
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
        <select id="DType" onclick="showdiv()">
            <option value="0" selected="selected">Null Data</option>
            <option value="1">Full Data</option>
        </select>
    <div id="Div_NullData">
        <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" GridLines="None" Width="780">
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource1">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
                        SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                        UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"
                        UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"
                        UniqueName="ContactTitle">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                        UniqueName="Address">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                        UniqueName="City">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region"
                        UniqueName="Region">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT * FROM [Customers] WHERE 1=0"></asp:SqlDataSource>
    </div>
    <div id="Div_FullData" style="display:none">
        <telerik:RadGrid ID="RadGrid2" runat="server" DataSourceID="SqlDataSource2" GridLines="None"   Width="780" Height="300px">
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="CustomerID" DataSourceID="SqlDataSource2">
                <Columns>
                    <telerik:GridBoundColumn DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True"
                        SortExpression="CustomerID" UniqueName="CustomerID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName"
                        UniqueName="CompanyName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName"
                        UniqueName="ContactName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ContactTitle" HeaderText="ContactTitle" SortExpression="ContactTitle"
                        UniqueName="ContactTitle">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                        UniqueName="Address">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                        UniqueName="City">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region"
                        UniqueName="Region">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings>
                <Scrolling AllowScroll="True" />
            </ClientSettings>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT TOP 20  * FROM [Customers]"></asp:SqlDataSource>
         
    </div>
    </form>
</body>
</html>
Dimo
Telerik team
 answered on 08 Jul 2010
3 answers
134 views
We have a page which is getting the results of a file system folder/file scan that will occasionally throw an ":out of memory" pop-up to the user (and the list of folders which is within a RadListBox, will actually flow over the box boundaries and down off the bottom of the page); close the browser, re-launch and log in and hit the same page again and it will work just fine.

Below is the sub that scans the file system & loads the list - it seems to all work ok every time - it is the rendering that seems to be taking the hit.

My dev team is not able to identify any specific causes for this - was wondering if anyone has seen this or has any suggestions for debugging or correction.  

    Private Sub LoadItems(Optional ByVal bolClearText As Boolean = True)  
        If bolClearText Then  
            lblFinished.Text = "" 
        End If  
        If txtIngestServerPath.Text.Trim = "" Then Exit Sub  
        Dim dir As IO.DirectoryInfo  
        Try  
            dir = New IO.DirectoryInfo(txtIngestServerPath.Text.Trim)  
        Catch  
            lstTemplateFiles.Items.Clear()  
            lstRadTemplateFiles.Items.Clear()  
            Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage)  
            lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Invalidfolderpath", intLanguageCode)  
            Exit Sub  
        End Try  
        lstTemplateFiles.Items.Clear()  
        lstRadTemplateFiles.Items.Clear()  
        If dir.Exists Then  
            If Not dir.Parent Is Nothing Then  
                Dim item As New RadListBoxItem  
                item.Text = "..." 
                item.Value = "" 
                item.Attributes("itemtype") = "0"  
                item.ImageUrl = Resources.ImagePaths.ParentDirectoryIcon  
                lstRadTemplateFiles.Items.Add(item)  
            End If  
            'If Recurse.Checked() Then  
            'ParseDirectory(dir)  
            'Else  
            Dim folders As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(txtIngestServerPath.Text.Trim)  
            For Each Folder As System.IO.DirectoryInfo In folders.GetDirectories  
                Dim item As New RadListBoxItem  
                'item.Text = Folder.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                item.Text = Folder.Name  
                item.Value = Folder.FullName  
                item.ImageUrl = Resources.ImagePaths.FolderIcon  
                item.Attributes("itemtype") = "1"  
                lstRadTemplateFiles.Items.Add(item)  
            Next  
 
            Dim files As IO.FileInfo() = dir.GetFiles("*.sca")  
            Dim fileName As IO.FileInfo  
            For Each fileName In files  
                'Dim li As New ListItem  
                'li.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                'li.Value = fileName.FullName  
                'lstTemplateFiles.Items.Add(li)  
                Dim item As New RadListBoxItem  
                'item.Text = fileName.FullName.Replace(txtIngestServerPath.Text.Trim, "")  
                item.Text = fileName.Name  
                item.Value = fileName.FullName  
                item.ImageUrl = Resources.ImagePaths.TemplateIcon  
                item.Attributes("itemtype") = "2"  
                lstRadTemplateFiles.Items.Add(item)  
            Next  
            'End If  
            objContentPage.AjaxManager.ResponseScripts.Add("ScrollToTop();")  
        Else  
            Dim intLanguageCode As Integer = SystemLanguages.SystemLanguages.GetInstance().LanguageCodeForID(userinfo.DefaultLanguage)  
            lblFinished.Text = Global.Castnet.App.Language.CastnetInterpreter.InternationalizeString("Notemplatefilesexistsinselectedfolder", intLanguageCode)  
        End If  
    End Sub 
T. Tsonev
Telerik team
 answered on 08 Jul 2010
10 answers
179 views
Hi!

i am using radwindow inside a timer. it refreshes in firefox and works fine in ie...

plz help me...

thanks in advance...

Fiko
Telerik team
 answered on 08 Jul 2010
4 answers
202 views
i used this code for close Rad window

  string script1 = "<SCRIPT LANGUAGE='JavaScript'> ";
                script1 += "OK_Clicked()";
                script1 += "</SCRIPT>";
                Page.RegisterClientScriptBlock("ClientScript", script1);

but its not work
i also tried with
  string script2 = "<SCRIPT LANGUAGE='JavaScript'> ";
                script2 += "OK_Clicked()";                
                script2 += "</SCRIPT>";
                //RadScriptManager1.EnableScriptCombine = true;
                //Page.RegisterClientScriptBlock("ClientScript", script2);
                RegisterStartupScript("Startup", script2);


Jeremy
Top achievements
Rank 1
 answered on 08 Jul 2010
1 answer
119 views
I used the style builder to to modify the Black skin to use some different colors. I have downloaded the zip. How do I integrate this skin into my app so that it becomes a choice in the dropdown for skin property - so that it would be added as a choice along with the standard skins?
Dimo
Telerik team
 answered on 08 Jul 2010
1 answer
157 views
I am using 2010 Q1 version RadScheduler.  I am using Web service binding to a Custom SQL provider.
When I delete a recurring appointment and choose "delete only this occurance", I got javascript error  "Specified cast is not valid".

Here is my code, anyway I can fix it?  Thanks

                 <telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Office2007" ReadOnly="false"
                        Height="700px"
                        DayStartTime="07:00:00" DayEndTime="21:00:00"                    
                        FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday"
                        EnableDescriptionField="true"
                        AppointmentStyleMode="Default"
                        OnNavigationComplete="RadScheduler1_NavigationComplete">
                        <AdvancedForm Modal="true" />
                        <TimeSlotContextMenuSettings EnableDefault="true" />
                        <AppointmentContextMenuSettings EnableDefault="true" />
                        <WebServiceSettings Path="~/Services/CalendarService.asmx" />
                    </telerik:RadScheduler>
T. Tsonev
Telerik team
 answered on 08 Jul 2010
3 answers
127 views
Hi,
I have Scheduler in my aspx form. I need to bind the events in the scheduler. I have an issue in binding the Provider for that scheduler. I have seen the demo where i found the Provider was set as XMLSchedulerProvider.

 provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), false);
 
But I have the data as an IList collection. I dont know how  to convert it into XmlScheduler and bind to the source.

Please help me. is there any direct way  to convert the iList to XmlScheduler ? I need urgent solution for this, I have reffered the following link but dint get complete understanding.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/xmlschedulerprovider/defaultcs.aspx

Thanks in advance,
Hema
Peter
Telerik team
 answered on 08 Jul 2010
7 answers
233 views
hello

i have made customize slider by setting properties of RadSlider as

EnableEmbeddedSkins

 

="false"
EnableEmbeddedBaseStylesheet="false" 
and set a customize skin.
everything is working properly but i am not able to make dragtext disable.
dragtext appears along with drag image.

if anyone has a solution. please let me know..

thanks
kamini

 

 

 

 

 

 

 

kamini
Top achievements
Rank 1
 answered on 08 Jul 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?