Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
108 views
I implemented Grid with update option. When I click on update symbol in row I am getting One checkbox for update (I use SQL data source only with one column to update).
I have two issues with this approach:

1. Checkbox is not checked by default, how can I change this?
2. I see two commands Update and Cancel, how I can remove Cancel?

 
berto
Top achievements
Rank 1
 answered on 01 Oct 2012
2 answers
62 views
Hello, all.

I'm thinking about building a dashboard that uses docks and zones similar to the "My Portal" demo.  I copied the code into a new project and saw some odd behavior.  For some reason, when a dock is first added to the page, it doesn't look like the DockPositionChanged handler fires correctly.  If I do a postback, the dock reverts to its original position.  However, after that, the dock behaves as it should; meaning, I can change zones and do a postback and all the positions and zones of already-established docks remain as they should.  Any suggestions on why a new dock wouldn't save its state even after changing zones?
Jeff
Top achievements
Rank 1
 answered on 01 Oct 2012
2 answers
68 views
Hi,

I have a dropdown list inside the radgrid 

<telerik:GridTemplateColumn  HeaderText="" UniqueName="Answer" DataField="Answer"  >
                    <ItemTemplate>
                    <asp:DropDownList ID="ddlAnswer" runat="server"   DataTextField="Answer"
DataValueField="Answer" >
                    <asp:ListItem  Value="Yes" >Yes</asp:ListItem>
                    <asp:ListItem  Value="No" >No</asp:ListItem>
                    </asp:DropDownList>
                    </ItemTemplate>
                     </telerik:GridTemplateColumn>

If the user selects No and hits submit button the record will be updated in the database and below the answer No will be saved.(Database is updating properly)

When I click on this page again or refresh the page the page should be loaded with all the correct data from the database.

 every time the page loads all data except this drop down is getting binded properly. There are few records where the user selected No but still the drop down is showing Yes. How can I make No as the selected item?
Kostadin
Telerik team
 answered on 01 Oct 2012
1 answer
60 views
Hello,

I am working on the selected index change event of the dropdownlist column in insert,delete and update radgridview.. And I get a strange error. I have pasted the code and error below



Protected Sub gvInsert_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs)
 
        If TypeOf e.Item Is GridEditFormItem AndAlso e.Item.IsInEditMode Then
            Dim item As GridEditFormItem = DirectCast(e.Item, GridEditFormItem)
            Dim editor As GridDropDownListColumnEditor = DirectCast(item.EditManager.GetColumnEditor("UniqueID"), GridDropDownListColumnEditor)

            'handle selected change on server
            editor.ComboBoxControl.AutoPostBack = True
            editor.ComboBoxControl.SelectedIndexChanged += New RadComboBoxSelectedIndexChangedEventHandler(AddressOf list_SelectedIndexChanged)
        End If
    End Sub

    
    Private Sub list_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)

        Dim editedItem As GridEditableItem = TryCast(TryCast(sender, DropDownList).NamingContainer, GridEditableItem)

    End Sub



Error:Public Event SelectedIndexChanged(sender As Object, e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)' is an event, and cannot be called directly. Use a 'RaiseEvent' statement to raise an event.


Can someone please help get thru this error, I have been trying to solve this for the past 2 weeks..
Any help will be appreciated
Kostadin
Telerik team
 answered on 01 Oct 2012
1 answer
216 views
Hi,
I have two questions? I got two drop downs in radscheduler one for therapists and one for patients. What I want to do is when I create an appointment I want the therapist name to be place on the schedule after I hit save kind of where subject would be place. So here Is the question is it possible once I select therapist to automatically populate the subject line with there name. If not how can I get there name on the schedule. Now also I really don't need the subject line so is there a way to take it off if this is not possible. Or is there a way I can make it a drop down with values to select. thanks here is my code
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="STSchedule.aspx.vb" Inherits="ScheduleUser_STSchedule" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <link href="../Styles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    .style3
    {
        width: 165px;
        height: 120px;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div id="content-container1">
    <div id="content-container2">
            <div id="section-navigation">
                <img alt="h2t" class="style3" src="../Pics/logoh2t.png" />
                <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Transparent"
                    Width="161px" SelectedIndex="2" >
                <Tabs>
                    <telerik:RadTab runat="server" Text="PT"
                        NavigateUrl="~/ScheduleUser/PTSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="OT"
                        NavigateUrl="~/ScheduleUser/OTSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="ST" Selected="True"
                        NavigateUrl="~/ScheduleUser/STSchedule.aspx">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="MT"
                        NavigateUrl="~/ScheduleUser/MTSchedule.aspx">
                    </telerik:RadTab>
                     <telerik:RadTab runat="server" Text="Patients"
                        NavigateUrl="~/ScheduleUser/Schedule.aspx">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
                <asp:ListBox ID="ListBox1" runat="server" BackColor="#99CCFF"
                    DataSourceID="SqlDataSource6" DataTextField="TherapistName"
                    DataValueField="EmployeeID" Rows="30" Width="161px" AutoPostBack="True"></asp:ListBox>
                <asp:SqlDataSource ID="SqlDataSource6" runat="server"
                    ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>" SelectCommand="SELECT        EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistName
FROM            Therapist
WHERE        (Occupation = N'SLP') OR
                         (Occupation = N'SLPA')
ORDER BY TherapistLastName"></asp:SqlDataSource>
</div>
<div id="content">
     
    <telerik:RadScheduler ID="RadScheduler1" runat="server" Skin="Vista" DataEndField="EndTime"
        DataKeyField="ApptID" DataSourceID="SqlDataSource1" DataStartField="StartTime"
        DataSubjectField="Subject" DayEndTime="21:00:00"
        DisplayRecurrenceActionDialogOnMove="True" Height="700px"
        SelectedView="WeekView" ShowAllDayRow="False"
        ShowFooter="False" TimeZoneID="US Mountain Standard Time"
        TimeZoneOffset="-07:00:00" WorkDayEndTime="18:00:00"
        DataDescriptionField="Description"
        EnableDescriptionField="True" DataRecurrenceField="Recurrence"
    DataRecurrenceParentKeyField="RecurrencePartentID"
    DataReminderField="Reminder" style="margin-left: 3px"
        HoursPanelTimeFormat="htt" TimeLabelRowSpan="1">
        <ResourceTypes>
            <telerik:ResourceType DataSourceID="SqlDataSource2" ForeignKeyField="PatientID"
                KeyField="PatientID" Name="Patient" TextField="PatientName" />
            <telerik:ResourceType DataSourceID="SqlDataSource5" ForeignKeyField="StatusID"
                KeyField="ReasonID" Name="Status" TextField="Appointment" />
            <telerik:ResourceType DataSourceID="SqlDataSource7"
                ForeignKeyField="TherapistID" KeyField="EmployeeID" Name="Theraist"
                TextField="TherapistName" />
        </ResourceTypes>
        <AppointmentTemplate>
        <div class="AppointmentTemplate <%# Eval("Status.Text") %>">
            <h4><%# Eval("Subject") %></h4>
        </div>
        </AppointmentTemplate>
        <Localization HeaderTimeline="All Therapist " HeaderToday="Today" />
        <TimelineView GroupBy="Therapist"
            GroupingDirection="Vertical" />
        <MultiDayView ShowHoursColumn="False" />
        <Reminders Enabled="True" />
    </telerik:RadScheduler>
    </div>
             
             
             
    </div>
    </div>
   
   
    <asp:SqlDataSource ID="SqlDataSource5" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT [Appointment], [ReasonID] FROM [StatusInfo]">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:Insurance InfoConnectionString1 %>"
         
        SelectCommand="SELECT ApptID, RecurrencePartentID, PatientID, TherapistID, StatusID, TimeZoneID, StartTime, EndTime, Subject, Description, Reminder, Recurrence, LastModified FROM Schedule WHERE (TherapistID = @TherapistID)"
        DeleteCommand="DELETE FROM [Schedule] WHERE [ApptID] = @ApptID"
        InsertCommand="INSERT INTO [Schedule] ([RecurrencePartentID], [PatientID], [TherapistID], [StatusID], [TimeZoneID], [StartTime], [EndTime], [Subject], [Description], [Reminder], [Recurrence], [LastModified]) VALUES (@RecurrencePartentID, @PatientID, @TherapistID, @StatusID, @TimeZoneID, @StartTime, @EndTime, @Subject, @Description, @Reminder, @Recurrence, @LastModified)"
         
         
     
     
         
        UpdateCommand="UPDATE [Schedule] SET [RecurrencePartentID] = @RecurrencePartentID, [PatientID] = @PatientID, [TherapistID] = @TherapistID, [StatusID] = @StatusID, [TimeZoneID] = @TimeZoneID, [StartTime] = @StartTime, [EndTime] = @EndTime, [Subject] = @Subject, [Description] = @Description, [Reminder] = @Reminder, [Recurrence] = @Recurrence, [LastModified] = @LastModified WHERE [ApptID] = @ApptID">
        <DeleteParameters>
            <asp:Parameter Name="ApptID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="RecurrencePartentID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TherapistID" Type="Int32" />
            <asp:Parameter Name="StatusID" Type="Int32" />
            <asp:Parameter Name="TimeZoneID" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Reminder" Type="String" />
            <asp:Parameter Name="Recurrence" Type="String" />
            <asp:Parameter Name="LastModified" Type="String" />
        </InsertParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox1" Name="TherapistID"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="RecurrencePartentID" Type="Int32" />
            <asp:Parameter Name="PatientID" Type="Int32" />
            <asp:Parameter Name="TherapistID" Type="Int32" />
            <asp:Parameter Name="StatusID" Type="Int32" />
            <asp:Parameter Name="TimeZoneID" Type="String" />
            <asp:Parameter Name="StartTime" Type="DateTime" />
            <asp:Parameter Name="EndTime" Type="DateTime" />
            <asp:Parameter Name="Subject" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Reminder" Type="String" />
            <asp:Parameter Name="Recurrence" Type="String" />
            <asp:Parameter Name="LastModified" Type="String" />
            <asp:Parameter Name="ApptID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
         
        SelectCommand="SELECT PatientID, PatientFirstName, PatientLastName, PatientDOB, PatientLastName + ' ' + PatientFirstName AS PatientName FROM Patients ORDER BY PatientLastName">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
         
         
        SelectCommand="SELECT EmployeeID, TherapistFirstName, TherapistLastName, Occupation, TherapistLastName + ' ' + TherapistFirstName + ' ' + Occupation AS TherapistName FROM Therapist WHERE (Occupation = N'SLP') OR (Occupation = N'SLPA') ORDER BY TherapistLastName">
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource7" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT EmployeeID, TherapistFirstName + ' ' + TherapistLastName AS TherapistName FROM Therapist WHERE (EmployeeID = @EmployeeID)">
        <SelectParameters>
            <asp:ControlParameter ControlID="ListBox1" DefaultValue="32" Name="EmployeeID"
                PropertyName="SelectedValue" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server"
        ConnectionString="<%$ ConnectionStrings:H2T2SQLConnectionString %>"
        SelectCommand="SELECT Appointment FROM StatusInfo WHERE (NOT (Appointment IS NULL))">
    </asp:SqlDataSource>
</asp:Content>

Boyan Dimitrov
Telerik team
 answered on 01 Oct 2012
4 answers
332 views
I have a Telerik project that I created with VS2010.  The problem I'm having is as follows:

default.aspx on the root
When I navigate to http://hostname everything is fine.  Post back fires, everything works as expected.

default.aspx in a subfolder
When I run the exact same page in a subfolder, the following happens: if I navigate to http://hostname/subfolder, post back does not fire.  If I navigate to http://hostname/subfolder/default.aspx, post back works as expected.

The behavior occurs when the site is run on IIS7 (and IIS Express) but does not occur when running on .net dev server.


Any ideas?

(I've tried posting this three times and it's not getting submitted so I've taken out the code in case that's causing a problem.  I can post the markup and codebehind if necessary.  Going to try and submit again...)
dino
Top achievements
Rank 1
 answered on 01 Oct 2012
1 answer
87 views
Hi Team

I am using RadTreeView  inside the RadSlidingPage-> RadPane ->RadTreeView.  Also I have different tabs on the same screen.

The datasource for this RadTreeView is DB. Using different tabs(Actually these are different pages) I am inserting data for child nodes using these screens.

My problem is as soon as I insert a data to the db, the RadTreeView should refresh. Actually this is not happening.

As an alternate I had put on Button on RadTreeView to refresh. But the problem is whole page is reloading which I dont want.
I want to refresh only the RadTreeView.

I want to implement any of above approach. One is with immediate refresh or by clicking the button(But only RadTreeView) should refresh.

Please help me how to do this??

Thanks
Sharan

Boyan Dimitrov
Telerik team
 answered on 01 Oct 2012
1 answer
64 views
I have Radtreeview in my page.
+ A
    | 
    +  B
         |
         _C

when i created a subfolder named with 'C' under folder 'B' which is under folder 'A'.when i click on Folder b am getting its node text and value,
 BUT immdtly when i click on folder 'A' am getting selected text but getting Folder 'B' value (e.Node.Value)


only in this scenario(creating sub folder under parent folder) i am getting problem in other scenarios it is working fine
Nencho
Telerik team
 answered on 01 Oct 2012
2 answers
49 views
Hi,

I am using version 2011.3.1305.35 of the ASP.NET for AJAX controls.

I dynamically create the content of an ascx control, by creating strings that contain HTML and adding them to ASP.NET Tables / TableRows / TableCells.

The strings contain HTML elements like the div, span, and img elements.  I also have a RadTooltipManager on this user control, with AutoTooltipify="True".

When I view the source of the page, the strings I create end up looking like this:

<a class='bowlerTitleText' href='#' onclick="return expandCollapse('ctl00_cphContent_ucBowler1_tblBowler_bb8380','ctl00_cphContent_ucBowler1_tblBowler_bb8380i','True');"><img id='ctl00_cphContent_ucBowler1_tblBowler_bb8380i' class='upDown' src='../../img/icons/mnuCollapse.gif' /></a><span class='bowlerPeriodMiss'>Miss</span><span><img style='padding-left: 3px; vertical-align: bottom;' src='../../img/icons/talkBubble.gif' title='New Comment That can be up to 600 characters long.' /></span><span class='bowlerTitle2'>New Measurement</span>

In the example above, I'd want to tooltipify the <img> that has the title='New Comment...'

MY GOAL:
I want the 'title' attribute of my <img> elements, to be displayed by the RadTooltipManager.  Currently, the tooltips are displaying in the default browser tooltip box (ugly).  I know the radtooltipmanager is working properly as I have set the ToolTipTargetControl and TargetControlID for some asp controls in this page, and the tooltipmanager displays them correctly.

I don't expect how I'm doing it now to magically work, but How can I accomplish what I want?
Is it possible to achieve this the way I am doing it, by building HTML strings?

Thanks,
Michael
Michael Hunt
Top achievements
Rank 1
 answered on 01 Oct 2012
7 answers
257 views
I am building a wizard in the style of this example:  http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx 

On the first tab a file is browsed for and selected.
On the second tab a file's data is mapped to relevant fields for my application.
On the third tab, I have a RadProgressArea and a button to run the import.

The first time the import is run, the Progress Area will not show, however the import is run successfully.  If I click the run important again, the Progress Area is shown.  I've noted that during the initial run, a script error from within telerik is raised noting that $get is not defined.  Later runs after the first never post this error.  I'm uncertain why the $get function would not be defined at first.

Perhaps this is an AJAX related issue?

I greatly appreciate feedback and assistance.

Thank you.

EDIT:

I should note use of the following on the import button:
RadScriptManager.GetCurrent(this).RegisterPostBackControl(buttonImportFile);

Without this, the progress area is never shown and the $get fails continually.
Rob
Top achievements
Rank 1
 answered on 01 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?