Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
Hi,
After searching around and not finding an answer I deicded to post...
Working on a project with several RadGrids in it.

The problem is the same across the board...

The code is using LinQtoSQL and Datatables...

An example would look like...
Private Sub btnSearch_Click(sender, e) handles btnSearch_Click()
DoSearch
End sub

Private Sub DoSearch()
using db as new DataContext

dim dt as new datatable
dt.columns.Add("UserName")
dt.columns.Add(UserImage")

dim users = _
from u in db.Users where u.UserName.Contains(txtSearch.Text)
Select u

for each u in users

dim dr as datarow = dt.newrow
dr.item("UserName") = u.username

if not isdbnull(u.Image) and not u.Image = "" then
dr.item("UserImage") = u.UserImage
else
dr.item("UserImage") = "Images/NoImage.gif"
end if

dt.rows.add(dr)

next

end using

RadGrid1.DataSource = dt
RadGrid1.Databind()

End Sub


If I use need data source by eliminating the databind in above and calling DoSearch in need datasource, the button click get ignored

but the larger issue is having to perform the entire search again just to page or sort...

I am not dealing with 10's of thousands of records, maybe 5k max and can pull what I need when a search is complete, but do not want to have to pull all records down just to page or sort the grid...

Short of writing a bunch of code to re-parametor the search, what is the best way to accomplish what I need with the RadGrid?


Shinu
Top achievements
Rank 2
 answered on 16 Jan 2012
2 answers
143 views
Hello all,

I am using some code from an online demo which shows the asp.net validation summary in the ajax tool tip control. The code runs fine in a plain .aspx page. However when I put the code in a content page which is using a master page the tool tip does not show when the text boxes are not completed and the rad button is clicked. I get a show() object is null or undefiend.

I have tried the javascript in both the master page and the content page, but I still get the same error.
What am I missing here?
<asp:Content ID="Content8" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <script type="text/javascript">
             //<![CDATA[
        function HideTooltip() {
            var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
            if (tooltip) tooltip.hide();
        }
 
        function ShowTooltip() {
            window.setTimeout(function () {
                var tooltip = $find("RadToolTip1");
                //API: show the tooltip
                tooltip.show();
            }, 10);
        }
 
        function CheckIfShow(sender, args) {
            var summaryElem = document.getElementById("ValidationSummary1");
 
            //check if summary is visible
            if (summaryElem.style.display == "none") {
                //API: if there are no errors, do not show the tooltip
                args.set_cancel(true);
            }
        }
      //]]>
    </script>
   <div style="margin-left: auto; margin-right: auto; width: 400px">
    <table>
        <tr>
            <td>
                First name:
            </td>
            <td>
                <telerik:RadTextBox ID="rtxtFirstName" runat="server">
                </telerik:RadTextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="First name required." ControlToValidate="rtxtFirstName">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Last name:
            </td>
            <td>
                <telerik:RadTextBox ID="rtxtLastName" runat="server">
                </telerik:RadTextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Last name required." ControlToValidate="rtxtLastName">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td></td>
            <td>
                <telerik:RadToolTip ID="RadToolTip1" runat="server" HideEvent="ManualClose" ShowEvent="FromCode" RelativeTo="Element" EnableShadow="true" TargetControlID="rbtnGetName" OnClientBeforeShow="CheckIfShow" ManualClose="true" Position="MiddleRight" Skin="Web20">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" />
                </telerik:RadToolTip>
            </td>
            <td></td>
        </tr>
        <tr>
            <td></td>
            <td>
                <telerik:RadButton ID="rbtnGetName" runat="server" Text="Get Name" OnClientClicking="ShowTooltip">
                </telerik:RadButton>
            </td>
            <td></td>
        </tr>
    </table>
   </div>
</asp:Content>

Chom
Top achievements
Rank 1
 answered on 16 Jan 2012
4 answers
110 views
Hi all,

i have a question to ask. I have to ask since i've search all over the google and this telerik forum for a similar case like mine, but i still haven't any answer related to my problem. I want to ask, what is the proper method to migrate RadControl application from one server (development server) to another server (production server). You can see the attachment, where 2 same website source code i placed in two different servers contains Telerik. Why is this happen and what is the solution?

i dont think permission is the reason why. because i've added "everyone" as user for this site.

really appreciate for any answer. Thank you.
Ahmad Fahmi
Top achievements
Rank 1
 answered on 16 Jan 2012
2 answers
97 views
Hi,

I am working on Radgrid - Export to Excel feature. My user asked me to export the radgrid data with the following footer notes on the exported excel sheet. Could you please help us how to accomplish this requirment.

"FOR INTERNAL USE ONLY. ABC Company PROPRIETARY. "


Thank you

Regards,
Muru
Murugesan Sivathanu
Top achievements
Rank 1
 answered on 16 Jan 2012
10 answers
844 views
Hi

THis is my aspx code its is a RadCombobox in a Radgrid form template:

<

 

EditFormSettings EditFormType="Template">

 

 

<EditColumn CancelImageUrl="../App_Themes/Expert/Grid/Cancel.gif" EditImageUrl="../App_Themes/Expert/Grid/Edit.gif" InsertImageUrl="../App_Themes/Expert/Grid/Update.gif" UpdateImageUrl="../App_Themes/Expert/Grid/Update.gif" ButtonType="ImageButton" UniqueName="EditCommandColumn1" ></EditColumn>

 

 

<FormTemplate>

 

 

 

 

 

 

 

<div>

 

 

<label class="gridlabel">Completed By:</label>

 

 

<telerik:RadComboBox ID="txtCompleteBy" runat="server" AccessKey="m" EmptyMessage="Key Worker" EnableEmbeddedSkins="False" Skin="Expert" Width="225px">

 

 

<CollapseAnimation Duration="200" Type="OutQuint" />

 

 

</telerik:RadComboBox>

 

 

</div>

 

 

 

 

</FormTemplate>

 

 

</EditFormSettings>

 

 
How do I fill this from code behind I have the data classes already:

Dim Keyworker_lkp As New clsExpert

 

Dim Keyworker_dt As DataTable = Keyworker_lkp.PractitionerLookup(Membership.GetUser().ProviderUserKey) 

I've searched the forums but nothing seems to fit.

Andy

 

Auk
Top achievements
Rank 1
 answered on 15 Jan 2012
0 answers
97 views
Can you guy show me how to make a radscheduler auto update every 30 seconds. I tried with Javascript, calling RadScheduler1.Rebind() but the advanced form is also closed when the scheduler is rebound.

Thank you in advance
Hoang Lam
Top achievements
Rank 1
 asked on 15 Jan 2012
4 answers
88 views
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="100%" DataKeyField="Id"
                   DataSubjectField="Subject" DataStartField="StartDate" DataEndField="EndDate"
                   DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
                   Height="800px" SelectedView="WeekView" OnAppointmentInsert="RadScheduler_OnInsert"
                   OnAppointmentUpdate="RadScheduler_OnUpdate" OnAppointmentDelete="RadScheduler_OnDelete"
                   EnableDescriptionField="true" AppointmentStyleMode="Default" ShowFooter="true"
                   StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true" Reminders-Enabled="false"
                   OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                   Skin="Vista" DataDescriptionField="Description" DataReminderField="Reminder">
                   <TimeSlotContextMenuSettings EnableDefault="true" />
                   <AppointmentContextMenuSettings EnableDefault="true" />
                   <AdvancedForm Modal="true" />
                   <ResourceTypes>
                       <telerik:ResourceType KeyField="UserId" Name="User" TextField="UserNameFull" ForeignKeyField="AdverUserID"
                           DataSourceID="ObjDataSourceUsers" />
                   </ResourceTypes>
                   <AppointmentTemplate>
                       <div>
                           <asp:panel id="pRecurrence" runat="server" cssclass="rsAptRecurrence" visible="false" />
                           <asp:panel id="pReminder" runat="server" cssclass="rsAptReminder" visible="false" />
                           <asp:panel id="pRecurrenceException" runat="server" cssclass="rsAptRecurrenceException"
                               visible="false" />
                           <%#Eval("Subject") %>
                           <small>(<%#Eval("Start","{0:hh:mm}")%>)</small>
                       </div>
                       <hr />
                       <div style="height: 30px;">
                           Assigned to: <strong>
                               <asp:label id="lUser" runat="server" text='<%# Container.Appointment.Resources.GetResourceByType("User") == null ? "Geen" : Container.Appointment.Resources.GetResourceByType("User").Text %>' />
                           </strong>
                       </div>
                   </AppointmentTemplate>
               </telerik:RadScheduler>
               <asp:objectdatasource id="ObjDataSourceUsers" runat="server" typename="Data.Core.Aspnet_User"
                   selectmethod="GetAllActive"></asp:objectdatasource>
Hi,

We use the laste version of telerik Q3 2011 and we just implement the scheduler in our application.
We have differents problems and until now no solution for it.
1/ When we navigate in the scheduler (selectedView is WeekView) after a couple of click the design is completely broked (see print screen in attachment). This problem is present only in IE9.

2/ We use OnAppointmentInsert, OnAppointmentDatabound, OnAppointmentCreated, etc to Insert, update and deleten an appointment.
When we create a new appointment is not a problem. The scheduler show directly the new appointment. If we want to update or delete this appointemnt nothing append. When I debug with VisualStudio also nothing append. If I refresh the all page and try again than is working wel.

The core that we use is :

For ASPX



The code C#:

protected void RadScheduler_OnInsert(object sender, AppointmentInsertEventArgs e)
       {
           Save(0,e.Appointment);
       }
 
       protected void RadScheduler_OnUpdate(object sender, AppointmentUpdateEventArgs e)
       {
           var apId = e.ModifiedAppointment.ID;
           Save(int.Parse(apId.ToString()),e.ModifiedAppointment);
       }
 
       protected void RadScheduler_OnDelete(object sender, AppointmentDeleteEventArgs e)
       {
           var apId = e.Appointment.ID;
           Appointment.DeleteById(int.Parse(apId.ToString()));
       }
Yves
Top achievements
Rank 1
 answered on 15 Jan 2012
2 answers
95 views
Hi:
No question.  Just sharing a code snippet.  This code is from a web-part that searches Google in a new window (client-side):
<div id="GoogleSearch">
    <telerik:RadTextBox ID="searchTextBox" Runat="server"
        EmptyMessage="Type your search criteria here..." Width="260px">
    </telerik:RadTextBox>
    &nbsp; &nbsp;
    <telerik:RadButton ID="searchButton" runat="server" Target="_blank" CausesValidation="False" Text="Search" ButtonType="LinkButton" OnClientClicking="LaunchGoogleWindow" />
</div>
<script type="text/javascript">
    //<![CDATA[
    function LaunchGoogleWindow( ) {
        var str, txt = $find("<%= searchTextBox.ClientID %>");
        var lkButton = $find("<%= searchButton.ClientID %>");
        str = encodeURIComponent(txt.get_value());
        // alert(txt.get_value());
        lkButton.set_navigateUrl("http://www.google.com/search?hl=en&q=" + str);
    }
    //]]>
</script>
Phil
Phil
Top achievements
Rank 2
 answered on 14 Jan 2012
2 answers
353 views
Hello,
   I have an application which is working well under IIS6, but when I am using it under IIS7, in the page that has rad chart, I am getting this error:

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Requested URL http://localhost:80/smarTrend/EnterprisePages/ChartImage.axd?UseSession=true&ChartID=b40fd0b5-683d-4efc-acce-8460a749ebdf_chart_ctl00$BodyContentPlaceHolder$LowerChart&imageFormat=Jpeg&random=0.786466626816646
Physical Path C:\MyWorks\SmarTrend\EnterprisePages\ChartImage.axd
Logon Method Anonymous
Logon User Anonymous
Most likely causes:
  • The directory or file specified does not exist on the Web server.
  • The URL contains a typographical error.
  • A custom filter or module, such as URLScan, restricts access to the file.
Things you can try:
  • Create the content on the Web server.
  • Review the browser URL.
  • Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
Links and More Information

I have the correct http handler in my web.config:

<

 

add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

<

 

add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

<

 

add path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

 

<

 

add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>

Could somebody help me to find what is the problem?

Best regards

 

bilsa
Top achievements
Rank 1
 answered on 14 Jan 2012
3 answers
80 views
Hello!

i have range slider. 
When draging first drag handle i can pass right drag handle and slide to the end of slider.. how can i fix this?

Regards
omer
Top achievements
Rank 1
 answered on 13 Jan 2012
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?