Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
132 views
Hi,

How to remove the refresh button in code behind?
Any help is highly appreciated.

Princy
Top achievements
Rank 2
 answered on 14 Sep 2012
2 answers
140 views
Hello all,

How can I close the insert form on an external button click?

Thanks in advance.
Janaki
Top achievements
Rank 1
 answered on 14 Sep 2012
1 answer
523 views
I have a RadGrid that sits inside an UpdatePanel. I have the following template column defined:

                        <telerik:GridTemplateColumn UniqueName="Answers" HeaderText="Edit" DataField="Id">
                                <ItemTemplate>
                                    <asp:LinkButton OnClientClick="$(this).parent().parent().css('backgroundColor', 'cyan');" ID="btnViewAnswers" runat="server" CommandArgument='<%# Eval("Id") %>'
                                        CssClass="icolink btn_list" OnClick="btnViewAnswers_Click">Answers</asp:LinkButton>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>

How do I highlight the row when clicked? I am using jQuery now to change the background color and its working, but I think the updatepanel is doing an ajax call and then the radgrid is losing the css.
Shinu
Top achievements
Rank 2
 answered on 14 Sep 2012
7 answers
271 views
I have populated my grid with a service and everything works fine, now i want to populate a GridDropDownColumn with a WebService i think the GridDropDownColumn is a RadComboBox and i found a sample using the webservicesettings tag but i dont how to implement it for GridDropDownColumn.

I hope you can help me
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 13 Sep 2012
6 answers
163 views
Hi guys, i'm new with this topic and i need your help.

I know how to edit info inside a grid (now i'm using popup mode) and it works. But my boss asked me to change a field (logo picture converted into base64 string ) and i needed to use the radupload control inside the grid.

I've added it manually and it appears without problems but i don't know how to get this file to convert it into base64 string... could you help me with this? thanks a lot!

This is the code i'm using into the grid
<telerik:GridAttachmentColumn FileName="NuevoLogoFN"
    FilterControlAltText="Filter Nuevo Logo column" HeaderText="Nuevo Logotipo"
    Text="Nuevo Logotipo" UniqueName="NuevoLogo">
</telerik:GridAttachmentColumn>

And this one is part of the codebehind
if (e.CommandName == RadGrid.UpdateCommandName)
      {
 
          //GridDataItem item = (GridDataItem)e.Item;
          GridEditFormItem item = (GridEditFormItem)e.Item;
 
 
          Hashtable newValues = new Hashtable();
 
          item.ExtractValues(newValues);
 
 
         //I need the code here
 
                
          string id = item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ID_Reg"].ToString();
Arturo
Top achievements
Rank 1
 answered on 13 Sep 2012
1 answer
147 views
I have a RadAutoCompleteBox 

<

 

 

telerik:RadAutoCompleteBox runat="server" ID="radtxtKeywordSearch" InputType="Token"

 

 

 

AllowCustomToken="true" Height="200px" Width="500px" DropDownWidth="500px" DropDownHeight="200px"

 

 

 

BorderColor="Gray" BorderWidth="1px" BorderStyle="Solid" CssClass="radsearch"

 

 

 

BackColor="#F0F8FF">

 

 

 

</telerik:RadAutoCompleteBox>

 


I am entering something text like "re" but it is selecting "real estate" once type Enter button
my query is it should not select real estate it should select what i have entered that only for that
what i need to do
Could u plz. suggest me...
Advance thank u
Ivana
Telerik team
 answered on 13 Sep 2012
19 answers
491 views
Hi.
I have followed the AdvancedForm tutorial (http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html), and I have managed to include a user control to invite colleagues to an event. However when I try to save the event I get the following error:
Value cannot be null.
Parameter name: value

This is my Telerik RadScheduler:
  <telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Office2007" 
                        Height="551px" ShowFooter="false" ReadOnly="false" Localization-AdvancedCalendarToday="I dag" Localization-AdvancedCalendarCancel="Avbryt" 
                        Localization-AdvancedDescription="Beskrivelse" Localization-AdvancedDone="Fullfør" Localization-AdvancedSubject="Emne" 
                        TimeZoneOffset="00:00:00" WeekView-HeaderDateFormat="dd.MM.yyyy" 
                        DayStartTime="07:00:00" DayEndTime="21:00:00" Culture="nb-NO"                         
                        FirstDayOfWeek="Monday" LastDayOfWeek="Friday" 
                        EnableDescriptionField="true" Localization-Show24Hours="Vi 24 timer" Localization-ShowBusinessHours="Vis arbeidstid" HoursPanelTimeFormat="HH.mm" 
                        DataSourceID="sqlAppointments" DataRecurrenceField="RecurrenceRule" DataDescriptionField="Description" 
                        DataEndField="EndTime" DataKeyField="ID" DataRecurrenceParentKeyField="RecurrenceParentID" DataStartField="StartTime" 
                        DataSubjectField="Subject" OnFormCreated="RadScheduler1_FormCreated" OnClientFormCreated="schedulerFormCreated" 
                        OnNavigationComplete="RadScheduler1_NavigationComplete" 
                        OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" 
                        OnAppointmentDelete="RadScheduler1_AppointmentDelete" 
                        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" 
                        OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                        <AdvancedForm Modal="true" /> 
                        <TimelineView UserSelectable="false" /> 
            <AdvancedForm Modal="true" /> 
            <AppointmentTemplate> 
                <div class="rsAptSubject"
                    <%# Eval("Subject") %> 
                </div> 
                <%# Eval("Description") %> 
            </AppointmentTemplate> 
            <AdvancedEditTemplate> 
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" 
                    Subject='<%# Bind("Subject") %>' 
                    Description='<%# Bind("Description") %>'  
                    EventID='<%# Bind("ID") %>' 
                    Start='<%# Bind("Start") %>' 
                    End='<%# Bind("End") %>' 
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                    UserID='<%# getUserID() %>' 
                    PartnerID='<%# getPartnerID() %>' /> 
            </AdvancedEditTemplate> 
            <AdvancedInsertTemplate> 
                <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" 
                    Subject='<%# Bind("Subject") %>' 
                    Start='<%# Bind("Start") %>' 
                    End='<%# Bind("End") %>' 
                    Description='<%# Bind("Description") %>' 
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' 
                    UserID='<%# getUserID() %>' 
                    PartnerID='<%# getPartnerID() %>' /> 
            </AdvancedInsertTemplate>             
         <TimeSlotContextMenuSettings EnableDefault="true" /> 
         <AppointmentContextMenuSettings EnableDefault="true" /> 
                    </telerik:RadScheduler> 


This is my SqlDataSource:
<asp:SqlDataSource ID="sqlAppointments" runat="server" ConnectionString='<%$ ConnectionStrings:ConnectionString %>' 
    SelectCommand="SELECT * FROM Appointments WHERE UserID = (SELECT TOP 1 UserID FROM User WHERE UserID_guid = @UserID) AND StartTime < EndTime" 
    InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [UserID], [RecurrenceRule], [RecurrenceParentID], [Description]) VALUES (@Subject, @Start, @End, @UserID, @RecurrenceRule, @RecurrenceParentID, @Description)" 
    > 
    <SelectParameters> 
        <asp:Parameter Name="UserID" /> 
    </SelectParameters>         
    <InsertParameters> 
            <asp:Parameter Name="Subject" Type="String" /> 
            <asp:Parameter Name="Start" Type="DateTime" /> 
            <asp:Parameter Name="End" Type="DateTime" /> 
            <asp:Parameter Name="UserID" Type="Int32" /> 
            <asp:Parameter Name="RecurrenceRule" Type="String" /> 
            <asp:Parameter Name="RecurrenceParentID" Type="Int32" /> 
            <asp:Parameter Name="Description" Type="String" />     
    </InsertParameters> 
</asp:SqlDataSource> 


One last note:
The error occurs even when I try to add an event from the inline-insert. So I believe this has more to do with the setup of the sqldatasource or perhaps the radscheduler.

Looking forward to your help :)
Ivana
Telerik team
 answered on 13 Sep 2012
3 answers
163 views
We bought Q2 2012 SP1 (version 2012.2.724) to upgrade the old version. The primary purpose of the Telerik is to use the Radeditor as the WYSIWYG editor and manage file uploads. We'd been using old version for many years in the past and thought of upgrading due to new features and better browser support.

The default installation works ok in both dev and prodcution environment but wanted to use customprovider for all file uploads. The moment I switch to custom provider the Radedior File upload dialogs stars giving "Value Cannnot be null" erro intermittenetly. This happens only in production environement and the error pops up 50% of the time. When trying to expand the folder tree it hangs with the "rotating wheel animation" sometimes due to the same error.


Please help

Dev Environment: Windows 7 / IIS7 / Asp.NET 3.5
Production Environment: Windows Server 2008 / IIS 7 / Asp.Net 3.5



My sample code block is below.
protected void Page_Load(object sender, System.EventArgs e)
{
string[] sImagePath = new string[] {"/_Global/" + ModuleProperties.SiteID + "/img/content"};
radEdtContent.ImageManager.ViewPaths = sImagePath;
radEdtContent.ImageManager.UploadPaths = sImagePath;
radEdtContent.ImageManager.ContentProviderTypeName = typeof(myprovider).AssemblyQualifiedName;
}
public class myprovider : Telerik.Web.UI.Widgets.FileSystemContentProvider
{
public myprovider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
: base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
{
}
public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
{
//StoreFile method handles renaming of files if exists.
string fileExtention = name.Substring(name.LastIndexOf("."));
string fileNameWithoutExtension = name.Substring(0, name.IndexOf("."));
string newFileName = fileNameWithoutExtension + DateTime.UtcNow.Ticks + fileExtention;
string result = base.StoreFile(file, path, newFileName, arguments);
return result;
}


The Error

Server Error in '/' Application.

Value cannot be null.
Parameter name: type

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentNullException: Value cannot be null. Parameter name: type] 
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +7681546
Telerik.Web.UI.RadFileExplorer.InitContentProvider(String selectedUrl) +228
Telerik.Web.UI.RadFileExplorer.InitContentProvider() +140
Telerik.Web.UI.RadFileExplorer.get_ContentProvider() +24
Telerik.Web.UI.RadFileExplorer.BindExplorer() +48
Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e) +216
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Rumen
Telerik team
 answered on 13 Sep 2012
2 answers
89 views
I'm using the latest reease (RadControls for ASP.NET AJAX Q2 2012 SP1) and it is not catching simple spelling errors (like goodby, thimg, etc.) Is there something wrong with the en-US.tdf dictionary??
I have attached a screen print.
Rumen
Telerik team
 answered on 13 Sep 2012
3 answers
184 views
I am working on RadScheduler

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" DataKeyField="ID"
        DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"
        DataSourceID="SchedulerDataSource" DataDescriptionField="Description" Height="700px"
        DataStartField="Start" DataSubjectField="Subject" EnableEmbeddedSkins="true"
        Skin="Windows7" OnAppointmentCreated="RadScheduler1_AppointmentCreated" AdvancedForm-Enabled="true"
        OnAppointmentDataBound="RadScheduler1_AppointmentDataBound1" OnDataBound="RadScheduler1_DataBound"
        StartInsertingInAdvancedForm="true">
        <AppointmentContextMenuSettings EnableDefault="true" />
        <AdvancedForm Modal="true" />
        <TimelineView UserSelectable="false" />
        <ResourceTypes>
            <telerik:ResourceType DataSourceID="RoomsDataSource" ForeignKeyField="RoomID" KeyField="ID"
                Name="Room" TextField="RoomName" />
            <telerik:ResourceType DataSourceID="DocDataSource" ForeignKeyField="DoctorID" KeyField="UID"
                Name="DoctorName" TextField="first_name" />
            <telerik:ResourceType DataSourceID="PatientDataSource" ForeignKeyField="PatientID"
                KeyField="UID" Name="PatientName" TextField="FullName" />
            <telerik:ResourceType DataSourceID="TypeDataSource" ForeignKeyField="TypeID" KeyField="UID"
                Name="Type" TextField="UtilityValue" />
            <telerik:ResourceType DataSourceID="SqlClinic" ForeignKeyField="CompanyId" KeyField="CompanyId"
                Name="Clinic" TextField="CompanyName" />
        </ResourceTypes>
        <ResourceStyles>
            <telerik:ResourceStyleMapping Text="DoctorName" BackColor="Chocolate" />
        </ResourceStyles>
        <AppointmentTemplate>
            <div>
                <asp:Panel ID="RecurrencePanel" CssClass="rsAptRecurrence" runat="server" Visible="false" />
                <asp:Panel ID="RecurrenceExceptionPanel" CssClass="rsAptRecurrenceException" runat="server"
                    Visible="false" />
                <asp:Panel ID="ReminderPanel" CssClass="rsAptReminder" runat="server" Visible="false" />
                <%#Eval("Subject") %>

            </div>
            <hr />
            <div>
            Test: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("DoctorName").Text%>
                </strong>
            <br />
                Doctor: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("DoctorName").Text%>
                </strong>
                <br />
                Patient: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("PatientName").Text%>
                </strong>
                <br />
                Room: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Room").Text%>
                </strong>
                <br />
                Type: <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Type").Text%>
                </strong>
                <br />
                Clinic : <strong>
                    <%#Container.Appointment.Resources.GetResourceByType("Clinic").Text%>
                </strong>
                <br />
                
            </div>
        </AppointmentTemplate>

    </telerik:RadScheduler>
    <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server" OnAjaxUpdate="RadToolTipManager1_AjaxUpdate">
    </telerik:RadToolTipManager>
    <asp:SqlDataSource ID="SchedulerDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        DeleteCommand="DeleteAppointments" DeleteCommandType="StoredProcedure" InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [RecurrenceRule], [RecurrenceParentID], [Description], [RoomID],[DoctorID],[PatientID],[TypeID],[CompanyId]) VALUES (@Subject, @Start, @End, @RecurrenceRule, @RecurrenceParentID, @Description, @RoomID,@DoctorID,@PatientID,@TypeID,@CompanyId) select @@Identity"
        SelectCommand="SearchAppointmentsDefault" SelectCommandType="StoredProcedure"
        UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Description] = @Description, [RoomID] = @RoomID,[DoctorID]=@DoctorID,[PatientID]=@PatientID, [TypeID]=@TypeID,[CompanyId]=@CompanyId WHERE [ID] = @ID">
        <InsertParameters>
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Start" Type="DateTime" />
            <asp:Parameter Name="End" Type="DateTime" />
            <asp:Parameter Name="RecurrenceRule" Type="String" />
            <asp:Parameter Name="RecurrenceParentID" Type="Int32" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="RoomID" Type="Int32" />
            <asp:Parameter Name="DoctorID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TypeID" Type="Int32" />
            <asp:Parameter Name="CompanyId" Type="Int32" />
        </InsertParameters>
        <DeleteParameters>
            <asp:Parameter Name="AuditId" Type="Int64" />
            <asp:Parameter Name="ID" Type="Int64" />
        </DeleteParameters>
    </asp:SqlDataSource>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <asp:SqlDataSource ID="RoomsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [ID], [RoomName] FROM [Rooms]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="DocDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [UID], [first_name] FROM [Teacher]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="PatientDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SelectPatients" SelectCommandType="StoredProcedure">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="TypeDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT [UID], [UtilityValue] from [utility] where utilityGroup='Type'">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDoctor" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="GetTeacherInfoForScheduler" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="companyId" Type="string" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlClinic" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="getCompanies" SelectCommandType="StoredProcedure">
        <SelectParameters>
            <asp:Parameter Name="Company" Type="string" />
        </SelectParameters>
    </asp:SqlDataSource>


by using this I can able to get the patients names but they are loading in dropdown,
<telerik:ResourceType DataSourceID="PatientDataSource" ForeignKeyField="PatientID"
                KeyField="UID" Name="PatientName" TextField="FullName" />

There are 4000 patients. The DropDown does not allow text based searches. Users must scroll through thousands of patients to find the one they are looking for.

Is there a control, such as autocompletefield, which better fits my needs?

Ivana
Telerik team
 answered on 13 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?