Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views

 Hi ,
       I am using Q2 2008 telerik version.
       Here is my Aspx code ,
  

 

 

        <telerik:RadUpload Localization-Select="Select Photo" ID="UploadFile" runat="server"

 

 

        Skin="Vista" ControlObjectsVisibility="None"  OverwriteExistingFiles="false" InitialFileInputsCount="1" />

 

 

 

        I dont want Add , Delete , Remove etc button , want only a text box  and select button.
       So i have set ControlObjectsVisibility="None" property.
       If i set this property in code and test in Opera browser , Upload control do not work.When i click on select nothing  happens.
       Where as when i set ControlObjectsVisibility="All" it runs in Opera.But i dont want to show all other controls.

      Is there any solution for this?

Thanks.

      

Dimitar Milushev
Telerik team
 answered on 29 Apr 2010
1 answer
151 views

I have a Formview and a RadGrid on my page.

I am getting details in my RadGrid for the Selected Value in my FormView based on Client ID (cID).
I want to use PopUp edit form. However I am having the following issues when creating new items in my radgird using popup..

1. I need to set the cID in the RadGrid to the current selected value for my FormView.
2. I need on of my columns in Popup Edit form to present a dropdown for ProductID (pID) whiohc ties the dropdown datasource to another lookup table.

I need to hide some of the colums that are  being display in the Insert form of the popup editfiorm as they are not required. But are using in SQL Joins.

Anybody have any clue where to start on any of this?

Pseudo Code for Setting cID
...I know "CurrentMode" dosne't exist for RadGrid...but I don't know where to put this.

 Protected Sub RadGrid1_PreRender(ByVal sender As ObjectByVal e As EventArgs)  
        Dim strCID As String = fvClients.SelectedValue  
        If RadGrid.CurrentMode = RadGrid.Insert AndAlso (DirectCast(RadGrid.FindControl("cIDTextBox"), TextBox)).Text.Length = 0 Then 
            Dim tbox As TextBox = TryCast(RadGrid1.FindControl("cIDTextBox"), TextBox)  
            tbox.Text = strCID  
        End If 
    End Sub 

Also how do I change pID column to dropdown with different datasource? And how to do I hide "Name" column in Insert/Edit Forms?
  <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="dsPrescriptionItems" 
                        GridLines="None" AutoGenerateEditColumn="True" AutoGenerateColumns="False" Skin="Forest">  
                        <HeaderContextMenu EnableAutoScroll="True">  
                        </HeaderContextMenu> 
                        <MasterTableView DataKeyNames="ID" DataSourceID="dsPrescriptionItems" AllowAutomaticDeletes="True" 
                            AllowAutomaticInserts="True" AllowAutomaticUpdates="True" CommandItemDisplay="Bottom" 
                            EditMode="PopUp">  
                            <Columns> 
                                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" Display="False" HeaderText="ID" 
                                    ReadOnly="True" SortExpression="ID" UniqueName="ID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="cID" DataType="System.Int32" Display="False" 
                                    HeaderText="cID" SortExpression="cID" UniqueName="cID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="pID" DataType="System.Int32" Display="False" 
                                    HeaderText="pID" SortExpression="pID" UniqueName="pID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name" 
                                    UniqueName="Name">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="ScriptRefills" DataType="System.Int32" HeaderText="Refills" 
                                    SortExpression="ScriptRefills" UniqueName="ScriptRefills">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="StartDate" DataFormatString="{0:MMM dd, yyyy}" 
                                    DataType="System.DateTime" HeaderText="Start Date" SortExpression="StartDate" 
                                    UniqueName="StartDate">  
                                </telerik:GridBoundColumn> 
                            </Columns> 
                            <EditFormSettings CaptionFormatString="Edit Prescription" 
                                InsertCaption="Add Prescription:" PopUpSettings-Modal="True">  
                                <PopUpSettings Modal="True" /> 
                            </EditFormSettings> 
                        </MasterTableView> 
                        <ClientSettings> 
                            <ClientEvents OnPopUpShowing="PopUpShowing" /> 
                            <Selecting AllowRowSelect="true" /> 
                        </ClientSettings> 
                    </telerik:RadGrid> 
Nikolay Rusev
Telerik team
 answered on 29 Apr 2010
3 answers
145 views
Hi i'm looking at the following entry on the code library.

http://www.telerik.com/community/code-library/aspnet-ajax/combobox/show-the-selected-item-image-in-input.aspx

I'm sure i'm very close to getting this to work. My combobox causes a postback.

When this function runs

                function showImageOnSelectedItemChanging(sender, eventArgs) {
                    var input = sender.get_inputDomElement();
                    input.style.background = "url(" + eventArgs.get_item().get_imageUrl() + ") no-repeat";
                }

it seems to set the image correctly. But after the postback is complete

                function showFirstItemImage(sender) {
                    var input = sender.get_inputDomElement();
                    alert(input);
                    alert(sender.get_items().getItem(0).get_imageUrl());
                    input.style.background = "url(" + sender.get_items().getItem(0).get_imageUrl() + ") no-repeat";
                }

that returns null. I've added in a couple of alerts to see whats going on, the alert(input) line is returning an element as expected, but the second alert is returning null.

Why is this ?







Alan T
Top achievements
Rank 1
 answered on 29 Apr 2010
2 answers
112 views
I'm populating my listview with some objects via linq (where\orderby) in the NeedsDataSourceEvent

I then also have a textbox on the page for searching...when text is typed into the box, user clicks "search" which really just rebinds the listview and in needsdatasource I grab that textbox search value and bind on that.

The issue I'm running into is when the user does a search filter and clicks a pager item, the entire thing re-binds with the full default datasource again...

Is there some trick to this?
Craig
Top achievements
Rank 2
 answered on 29 Apr 2010
1 answer
114 views
When I click on a color from ColorPicker, it disappears and the previous selected color reappears...
please post me some code with css so i can test on my local host then apply on the website...
Tsvetie
Telerik team
 answered on 29 Apr 2010
1 answer
86 views
How do I get current selected resource key at inserting?
Assume my resource is selected from dropdown, and I am using a customized advanced template and my own dbscheduler provider.
Peter
Telerik team
 answered on 29 Apr 2010
5 answers
241 views
hi,

I have a 3 tabs strip in my page and I want to perform validation as you move from one strip to another. I used requiredfield validator for textboxes and compare validator for combo boxes ,so when i fill tab1 it won't allow me to go to tab2 even if all data is valid in tab1.
I tried to use validationGroup for every tab, but it doesn't do validation at all.
how to do validation on all three tabs??
Veronica
Telerik team
 answered on 29 Apr 2010
1 answer
97 views
Hi
I'm using the advanced edit and advanced insert form, but I want to add one more form (not an inline form).
Is this possible?
It will be triggered from a contextmenu.

Kind Regrads
Dick
Peter
Telerik team
 answered on 29 Apr 2010
1 answer
175 views

How can I change the z-index of a chart series? I have couple of chart series on a chart. One chart series type is StackedArea while the others are StackedBar. Telerik chart seems to assign the z-index of the chat-series-elements based on the order from the code.


Please look at the attached image. On the Data Table, I would like "OverOrUnder" to the listed as the last row. I can achive this by moving it as the last Chart Series on the code but if I do that the Red StackedArea series will come to the front and hide BookedWork and SolidProspect for some weeks. Any ways to achive this?

Ren
Top achievements
Rank 1
 answered on 29 Apr 2010
0 answers
156 views
Good Day All

i have the Following Query

SELECT  distinct  ID, Dy,  Sess,[Code],[Description],Abrev,[Type],Number,
GrpName,GrpNumber,Duration,[Students],
[Venue],Capacity,
[Staff],[ModlID],[Term]
,[StaffTerm]
,[Date],[Length]
FROM
#Final_Timetable



and the table looks like this
See Screenshot of the table

In my timetable the data will look like this on a custom Schedule that i created myself , it consist of labels and more

Old Viewer

Now on the Lefthand Side you see there are Numbers 1,2,3, till 13. This is because no dates has been used. So i will be using the number of Periods a day. So this data will be comming from the Database and  at the top there are days excluding Sundays and Saturdays.

Now i want to use the RadSchedule to Display the timetable

By html looks like this

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="New_Viewer.aspx.cs" Inherits="Viewer_New_Viewer" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>GraphicView</title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
    <div>
        <telerik:RadScheduler ID="RadScheduler1" runat="server" DataSourceID="SqlDataSourceTimetable"
            DataEndField="Date" DataKeyField="ID" Skin="Sunset" Height="726px" DataSubjectField="Description" DataStartField="Date" DataRecurrenceField="Dy" DataRecurrenceParentKeyField="Sess">
        </telerik:RadScheduler>
    
    </div>
        <asp:SqlDataSource ID="SqlDataSourceTimetable" runat="server" ConnectionString="<%$ ConnectionStrings:oDirectConnectionString %>"
            OnSelecting="SqlDataSourceTimetable_Selecting" ProviderName="<%$ ConnectionStrings:DBConnectionString.ProviderName %>"
            SelectCommand="sp_Timetable_View" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:Parameter Name="selectionType" Type="String" />
                <asp:SessionParameter Name="selectedItems" SessionField="selectedItems" Type="String" />
                <asp:SessionParameter Name="selectedTerms" SessionField="selectedTerms" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </form>
</body>
</html>


and now i am using the Stored Procedure to get Data and i tested the sp in SQL management studio with its parameters and it brought the data back.

and this is how i used it with the Radschedule and i don't get any appointments when i run the application. in the Server on page load i have add this


    protected void Page_Load(object sender, EventArgs e)
    {
      RadScheduler1.DataBind();
    }

and still it does not work.

Thanks

Vuyiswa
Top achievements
Rank 2
 asked on 29 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?