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

I have a menu that when a user clicks an item it postback using the RadAjaxPanel.

Well in certain items i need to cancel the ajax request for like the 'DOWNLOAD FILE' item but leave it on for other items.

Im using the Panels onRequestStart but all it returns in the eventtarget is my menu ID is there anyway to find the ITEM within the menu that triggered the AJAX?

Or should i make a custom menu items with buttons?

CODE:
<script type="text/javascript">
            function onRequestStart(sender, args) {
                if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToWordButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToCsvButton") >= 0 ||
                    args.get_eventTarget().indexOf("ExportToPdfButton") >= 0) {
                    args.set_enableAjax(false);
                }
                if (args.get_eventTarget().indexOf("FilesMenu") >= 0)
                {
                    alert("ET: " + args.get_eventTarget());
                    alert("EA: " + args.get_eventArgument());
                    alert("ETE ID: " +args.get_eventTargetElement().id);
                    args.set_enableAjax(false);
                }
            }
        </script>
Helen
Telerik team
 answered on 18 Mar 2011
1 answer
57 views
I don't know whether or not it is by design, but I have VS2008 and VS2010 on my machine and the MSDN help, part of VS 2008 was updated with the new docs for JustCode but not for those for RadControls for ASP.NET AJAX.

When I click on the link to open the docs in a browser and navigate to the API Reference | Telerik.Web.UI Namespace the top of the page indicates a missing reference...

[Missing <summary> documentation for "N:Telerik.Web.UI"]

And the page looks like ss1.gig. Note the twin vertical scrollbars.

SS2.gif shows that the right-hand pane is in a little container of its own.

I initially thought it might just be Chrome, but I got the same thing in IE8.

-- 
Stuart
Georgi Tunev
Telerik team
 answered on 18 Mar 2011
3 answers
250 views
Hello,

I insert table in the Word Processor of RadEditor but table border is missing.
How could i setting the border of table insert into word Processor.

Important thing is table appears the dashed line instead of a solid line.
Please help me as soon as possible.
Thanks.

Best Regards
Mutum Jiten Singh
Akhil Systems Pvt. Ltd.

Marin Bratanov
Telerik team
 answered on 18 Mar 2011
1 answer
108 views
Hello,

Attached is a screen shot of my page.
But what I am wanting to do, and I have not been able to do so.
Is when the user select a node from the treeview I want to display the appropriate grid.
For each node there is a new grid, and depending on which node they choose I want to show that grid, and hide the others.

I have each grid in a RadAjaxPanel, and I have tried setting visiblity to true and false for the panel, and or the grids but it does not seem to work.
I have also tried a snippet of code I found on these forums, but that too does not work for me.
 if (RadGridOSPProposal.Style["display"] != null && RadGridOSPProposal.Style["display"].ToString() == "none")
                    RadGridOSPProposal.Style["display"] = "";
                else
                    RadGridOSPProposal.Style.Add("display""none");  

Thanks for any help, code samples are alway welcome.
KS
Marin
Telerik team
 answered on 18 Mar 2011
1 answer
53 views
upon clicking an event from my monthview, I want to change the date of the dayview I have to that day. I have am trying to pass in the startdate from the database (i.e. dt.Rows[0]["startDate"].ToString()) to the DataStartField. Is there a different method to the madness? SelectedDate but that did not work either.

Thanks,
Mike

 

Peter
Telerik team
 answered on 18 Mar 2011
2 answers
73 views
Currently my schedular is readonly and only the date in the corner is clickable. How do I make the actual event clickable.
Also is there a way to make the entire square clickable as well?

Thanks
Peter
Telerik team
 answered on 18 Mar 2011
5 answers
291 views
Hi Telerik,

I'm using RadFileExplorer in this page

<!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>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <telerik:RadFileExplorer ID="RadFileExplorer1" runat="server">
            <Configuration UploadPaths="/Uploads/examples" ViewPaths="/Uploads/examples" DeletePaths="/Uploads/examples"
                MaxUploadFileSize="2097151000"
                SearchPatterns=".jpg" />
        </telerik:RadFileExplorer>
    </div>
    </form>
</body>
</html>

I set SearchPatterns: ".jpg" or "jpg" but I couldn't upload that file with extension "jpg", Please help me
Dobromir
Telerik team
 answered on 18 Mar 2011
5 answers
323 views
Hello,

Refrering to my unanswered thread
http://www.telerik.com/community/forums/aspnet-ajax/compression/radhiddenfieldpagestatecompression-gzip.aspx

and now porting to .net 4.

Being unsure that I am obtaining compressed Viewstate (they are so big), I want to trace on server the fact that the that it is compressed, Fiddler or FireBug can't be used easilly on a production site.


Is there a way to activate some server side trace in Telerik tools or to trace thta Viewstate is going through my .browser file and the control adapter is effectivelly usefd.

Thanks
CS
Simon
Telerik team
 answered on 18 Mar 2011
4 answers
476 views
Outside of the scheduler, I'm trying to loop through all events in a given date range.  Due to the complexity of recurrence, I have a hidden instance of the RadScheduler on my form, and I am looping through the appointments and resources examining each appointment to see if it falls within range.  The process is not smooth.  I'm having lots of trouble with recurrence.  For example, if I select one date, I'm getting two copies of the same event...one with, say, an ID of 105, and the other with an ID of 105_0.  If I select a week, I am only seeing the 105_0 appointment.

I am finding work-arounds for each issue as I encounter one, but do not have faith that there aren't other hidden problems. Is there a better way to loop through by date range?  The code below is just my latest experimentation. I probably need to scrap and start over.

private void LoopEvents()
{
    RadListBox rlbResources = PanelBar.Items[0].Items[0].FindControl("rlbResources") as RadListBox;
    DataTable dt;
    string canceled = "Canceled";
 
    string sql = "SELECT * FROM AppointmentResource";
    string errString = "";
    DateTime currdt = Convert.ToDateTime("1/1/1901");
 
    dt = PageData.GetData(sql, ref errString).Tables[0];
    if (rlbResources.Items.Count == 0)
        rlbResources.DataBind();
 
    foreach (Telerik.Web.UI.RadDate rd in RadCalendar1.SelectedDates)
    {
        foreach (Telerik.Web.UI.Appointment a in RadScheduler1.Appointments)
        {
                foreach (Telerik.Web.UI.RadListBoxItem l in rlbResources.Items)
                {
                    if (l.Checked & a.Resources.GetResource("Resource", Convert.ToInt32(l.Value)) != null)
                    {
                         
                        //Occurrences of a recurrence master are not generated untill they
                        //are within RadScheduler's visible range. This mandates the occurrences
                        //information to be extracted from the Master's recurrence rule as follows:
                        if ((a.RecurrenceState == RecurrenceState.Master) & RadCalendar1.SelectedDates.Count > 1)
                        {
                            RecurrenceRule parsedRule;
                            RecurrenceRule.TryParse(a.RecurrenceRule.ToString(), out parsedRule);
 
                            //If a recurring appointment does not have specified end time it will have
                            //endless occurrences. In this case you can explicitly put a restriction:
 
                            if (RadCalendar1.SelectedDates.Count > 1)
                                parsedRule.SetEffectiveRange(RadCalendar1.SelectedDates[0].Date, RadCalendar1.SelectedDates[RadCalendar1.SelectedDates.Count - 1].Date);
                            else
                                parsedRule.SetEffectiveRange(RadCalendar1.SelectedDate.AddDays(-1), RadCalendar1.SelectedDate.AddDays(1));
                             
                            foreach (DateTime occurrence in parsedRule.Occurrences)
                            {
                                if (occurrence.ToShortDateString() == rd.Date.ToShortDateString())
                                {
                                        //We have a match
                                }
                            }
                        }
                        else //Get the rest of the appointments    
 
                            //If the SelectedDate of RadScheduler is set so that the visible range encompasses occurences of     
                            //a recurring appointement, these occurences will be generated now so they will be added once again    
                            //to the DataTable. To prevent this, we use the following check:    
                            //if (a.RecurrenceState != RecurrenceState.Occurrence)
                            //{
                            if (WithinDate(a.Start, a.End, rd.Date))
                            {
                                  //We have a match
                            }
                        //}
 
                    }
                }
        }
    }
 
}
Peter
Telerik team
 answered on 18 Mar 2011
2 answers
75 views
I'm trying to bind a rad grid from a custom datatable but I cannot get any of the data to show. I have read all your examples but still cannot seem to get it to work. Here's my code
<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True"
GridLines="None" ShowGroupPanel="True" AutoGenerateColumns="False" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top">
        <Columns>
            <telerik:gridboundcolumn datafield="FirstName" headertext="First Name"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="LastName" headertext="Last Name"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Business Name" headertext="Business Name"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="State" headertext="State"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Zip" headertext="Zip"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Address" headertext="Address"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="City" headertext="City"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Phone" headertext="Phone"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Fax" headertext="Fax"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="CellPhone" headertext="Cell"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Eamil" headertext="Email"
            </telerik:gridboundcolumn>
            <telerik:gridboundcolumn datafield="Edit" headertext="Edit"
            </telerik:gridboundcolumn>
        </Columns>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="True">
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
</telerik:RadGrid>

VB
'this function gets the data for the rad grid
Private Function getData()
    Dim table As DataTable = New DataTable()
    table.Columns.Add("First Name")
    table.Columns.Add("Last Name")
    table.Columns.Add("Business Name")
    table.Columns.Add("State")
    table.Columns.Add("Zip")
    table.Columns.Add("Address")
    table.Columns.Add("City")
    table.Columns.Add("Phone")
    table.Columns.Add("Fax")
    table.Columns.Add("Email")
    table.Columns.Add("CellPhone")
    table.Columns.Add("Edit")
    'my sql connection
    Dim myConn As New Data.SqlClient.SqlConnection(conn)
 
    'the name of the stored procedure
    Dim strSQL = "getAllCustomers"
 
    'add the initial - Please Select -
    'table.Rows.Add(New String() {"-1", "- Please Select -"})
 
    Try
 
        myConn.Open()
        Dim readCommand As New Data.SqlClient.SqlCommand(strSQL, myConn)
 
        'while we have rows from the stored procedure
        'we will add them to a data table
        Dim cdr As SqlDataReader = readCommand.ExecuteReader()
        While cdr.Read()
 
            If (cdr.Item(0).ToString <> "") Then
 
                table.Rows.Add(New String() {cdr.Item(1), cdr.Item(2), cdr.Item(3), cdr.Item(4), cdr.Item(5), cdr.Item(6), cdr.Item(7), cdr.Item(8), cdr.Item(9), cdr.Item(10), cdr.Item("<a href='EditCustomer.aspx?id=" & cdr.Item(0) & "'>Edit</a>")})
 
            End If
 
        End While 'while cdr.Read()
 
    Catch ex As Exception
 
    End Try
    myConn.Close()
 
    Return table
 
End Function 'createTable
 
 
Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
    RadGrid1.DataSource = getData()
End Sub

Web Services
Top achievements
Rank 2
 answered on 18 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?