Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
61 views
Folks,

Using RadControls for ASP.NET AJAX Q2 2012 SP2 with VS 2010.

I am using below link as a prototype.

ASP.NET Grid Demo - Application Scenarios - Window Editing

My question is it possible to highlight the same parent row after window close  i.e. either after Update/Cancel/Insert event of window? Attached is my desire result. Ex: highlight employee with Last Name Callahan in Parent Grid after popup edit window close.

Thanks for any help

gc_0620


gc_0620
Top achievements
Rank 1
 answered on 01 Oct 2012
2 answers
64 views
I have a grid that is bound to a list onclick of a button.  I have hooked up both the grid and the button in the RadAjaxManager. I have verified that everything is binds correctly, I can see that I have data in the columns while debugging but the grid is not updated with the data.

When I take the controls out of the ajaxmanager and allow the page to postback everything works fine, I get data in the grid.

Here's the relevant code:

ajaxmanager
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" ClientEvents-OnRequestStart="mngRequestStarted">
<telerik:AjaxSetting AjaxControlID="RadGridGeoData">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridGeoData" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="btnGeoDetails" />
</UpdatedControls>
</telerik:AjaxSetting>
<ClientEvents OnRequestStart="mngRequestStarted" />
</telerik:RadAjaxManager>

GRID
<telerik:RadGrid ID="RadGridGeoData" runat="server" AllowSorting="True" AllowPaging="True"  
            Skin="Windows7" AllowFilteringByColumn="True" 
            AutoGenerateColumns="false" CellSpacing="0" GridLines="None"
            ShowGroupPanel="True">
            <ClientSettings AllowDragToGroup="false">
<ClientEvents OnCommand="GeoGridCommand" OnColumnClick="ColumnClick" />
<Scrolling AllowScroll="True" UseStaticHeaders="True" />
<Resizing AllowColumnResize="True" />
</ClientSettings>
<AlternatingItemStyle Font-Size="10px" />
<MasterTableView 
CommandItemDisplay="TopAndBottom" HierarchyLoadMode="Client" AllowSorting="true" 
                NoMasterRecordsText="Loading data...." AllowFilteringByColumn="False">
<CommandItemSettings ExportToPdfText="Export to PDF" 
ShowAddNewRecordButton="False" ShowExportToCsvButton="True" ShowRefreshButton="False"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>


                <Columns>
                    <telerik:GridBoundColumn DataField="FacilityLink" FilterControlAltText="Filter FacilityName column"
HeaderText="Facility Name" SortExpression="FacilityName" UniqueName="FacilityLink" 
                        AllowSorting="False" Groupable="False" Reorderable="False">
<HeaderStyle Width="5%" HorizontalAlign="Center" />
</telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="FinanceNumber" FilterControlAltText="Filter FinanceNumber column"
HeaderText="Finance Number" SortExpression="FinanceNumber" UniqueName="FinanceNumber" 
                        AllowFiltering="False" AllowSorting="False" Groupable="False" 
                        Reorderable="False">
<HeaderStyle Width="5%" HorizontalAlign="Center" />
</telerik:GridBoundColumn>
...
...
...
</telerik:RadGrid>

Server side:
Protected Sub OnClick_btnGeoDetails(sender As Object, e As System.EventArgs)
        Dim ds As New FacilityServices
        Dim o = hiddenGeoDetailsGridDTO.Value
        Dim geodata As GeoData = JsonConvert.DeserializeObject(Of GeoData)(o)

        Dim dl = geodata.financeNumber
        Dim ol = geodata.originsList
        Dim rw = geodata.residualWithheld

        Dim geoDataList As List(Of FacilitiesList) = ds.GetFacilitiesStudy1Grid(ol, dl, rw)

        RadGridGeoData.DataSource = geoDataList
        RadGridGeoData.Rebind()
    End Sub

How do I get this to work with ajax enabled?

Thanks, Justin
Justin
Top achievements
Rank 1
 answered on 01 Oct 2012
4 answers
114 views

Hi I'm stuck in the next situation, I need to open a pdf file which I upload to sever with a radupload, when I ItemCommandEvent fires, I've tried the following code in itemcommand event:

if (e.CommandName == "Ver")
            {
  
                e.Item.Selected = true;
                 
                foreach (GridDataItem selectedItem in RGDOCS.SelectedItems)
                {
                  
                    Session["strUrl"] = selectedItem["ColumnaUrl"].Text;
                
string Servidor = Request.Url.GetLeftPart(UriPartial.Authority);           var fullUrl  = Servidor + Session["strUrl"];              var NewProcess = new System.Diagnostics.Process();             NewProcess.StartInfo.FileName = fullUrl;             NewProcess.Start();

This code works fine when I'm in localhost, but when I deploy my webapplication doesn't work. Is there any other solution to accomplish this?

Hope you could help me.

Pavlina
Telerik team
 answered on 01 Oct 2012
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
63 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
61 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
222 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
338 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
89 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
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?