Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
124 views
i dont know i am confused

that where to post it so i posted it here

actually i am developing a site and in that i want to add 1 type of functionality

below is example

<radcombobox1>
select user type -> Type A , Type B

on user selection

<radcombobox2> will updated using select statement

now user will select person from radcombobox2

after that

linkbutton and radeditor will display

i want such a thing that

when user click on linkbutton

a radwindow should open in which url should be
e.g: ~/editpic.aspx?emid= radcombobox.selectedindex.value

so that in editpic.aspx page i can provide user to edit picture

thanks in advance

please help needed very very urgently
sadiqabbas
Top achievements
Rank 1
 answered on 11 Feb 2010
1 answer
129 views
I already create a complete grid in the cs code. This grid is working fine, but now I want to create in the same c# code a combo selection-box as http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx  I want to supply the selection items which have to fill the combobox, so they don't have to be loaded using a datasource.
I have been looking and working with several samples using eg ITemplate, but i'm notting getting it to work. How can I create this?

Thanks
Tsvetoslav
Telerik team
 answered on 11 Feb 2010
1 answer
152 views
I would like to sync a grid with a chart. Grid and chart are on seperate pages. The user uses the grids filter en view capabilites to retrieve the data en the chart shows this data. i got everything sorted out (objecttype, number of rows, columns, avalaible filters) just need one more thing.

How do i get the search query and/or the filter the user last typed/selected to the server?

Tsvetoslav
Telerik team
 answered on 11 Feb 2010
7 answers
137 views
Hello,
I created a page based on raddock MyPortal example. I added a RadTreeView to the left side of the raddocklayout. In the treeview I have several parent node, each parent node contains 0-many child nodes, each child node represent a dock object.

Now, everytime I click a parent node, I want to clear the docklayout and generate all the children nodes as dock objects. However the Page_Init does not have the information for which parent node I've clicked.
BTW I added the async trigger for treeview in the UpdatePanel1:
<asp:asyncpostbacktrigger controlid="TreeView" eventname="NodeClick" />

How do I get the parent node object in Page_Init, all I need is one of the node attribute (pageID) and from there I can load all the children information from a database table to create the raddock objects.

Or maybe there is a better approach to what I'm trying to do?

Thanks!

RadTony
Top achievements
Rank 1
 answered on 11 Feb 2010
1 answer
89 views
Hi
I am using 2 rad windows on my aspx page and when I execute the aspx page boht windows show up in the center of the web page covering one another is there any way I can orient them to align side by side and format their height and width and also dock them as they can be immovable.
Georgi Tunev
Telerik team
 answered on 11 Feb 2010
3 answers
363 views
HI,

Iam using the Radwindow Manager and RadWindow to load a aspx page .I click on a link to open the aspx page to this radwindow.
The problem is the page is loading twice.Iam uisng IE6 .

Below is the code

<telerik:RadWindowManager ID="radWindowManager" runat="server"
    KeepInScreenBounds="True" Modal="True" DestroyOnClose="True"
    ReloadOnShow="True" VisibleStatusbar="False"
    Behaviors="Close,Move,Resize,Maximize,Minimize"
    InitialBehaviors="Close,Move,Resize,Maximize,Minimize">
        <Windows>
            <telerik:RadWindow runat="server" NavigateUrl="" Behavior="Default"
            InitialBehavior="Default" Width="1000px" Height="600px"
            Title="View Reports" Left="150px" Top="" ID="ViewReportsDialog"
            DestroyOnClose="True" InitialBehaviors="Default" KeepInScreenBounds="True" Modal="True"
            ReloadOnShow="True" VisibleStatusbar="False">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>

<telerik:RadCodeBlock ID="radCodeBlock" runat="server">

        <script type="text/javascript">
                
        function ShowReports(loadId,fileName,ViewType)
        {
            //var reportPath="C:\\WhatsReport.pdf";
            //loadId=71;
            var reportname= "WhatsReport_" + loadId;
            var reportType="pdf";
            //var reportPath="C:\\" + reportname + "." + reportType;
            var url="InfactFileReports.aspx?LoadId=" + loadId + "&FileName=" + fileName + "&ReportType=" + reportType + "&ViewType=" + ViewType;
               var radWindowProducts=window.radopen(url, "ViewReportsDialog");
               radWindowProducts.setSize(1000,600);
               radWindowProducts.center();
        }
    </script>

    </telerik:RadCodeBlock>

Thanks
Bala




<telerik:RadCodeBlock ID="radCodeBlock" runat="server">

        <script type="text/javascript">
                
        function ShowReports(loadId,fileName,ViewType)
        {
            //var reportPath="C:\\WhatsReport.pdf";
            //loadId=71;
            var reportname= "WhatsReport_" + loadId;
            var reportType="pdf";
            //var reportPath="C:\\" + reportname + "." + reportType;
            var url="InfactFileReports.aspx?LoadId=" + loadId + "&FileName=" + fileName + "&ReportType=" + reportType + "&ViewType=" + ViewType;
               var radWindowProducts=window.radopen(url, "ViewReportsDialog");
               radWindowProducts.setSize(1000,600);
               radWindowProducts.center();
        }
    </script>

    </telerik:RadCodeBlock>

Georgi Tunev
Telerik team
 answered on 11 Feb 2010
1 answer
186 views
hello, i can't seem to get this working correctly.  Maybe you'll have more insight on this problem.
I have a user control which contains a button,label,and radwindow.  I then programmatically add this usercontrol to the main page.  I run the page and click on the button (which is set to open the window).  I have placed the javascript functions inside the usercontrol to call the ajax requests.  My goal is to make an ajax postback when the window opens, and another one when the window closes.  This all works fine when i'm not using a usercontrol and all the controls are placed within the main page,  But, when I place the controls inside the usercontrol, only the first ajax request triggers, and everything afterwards doesn't get called.
I have attached a simple scenerio which should help show you what i'm trying to accomplish:
1) usercontrol (ascx): contains a button, label, radwindow, and ajaxmanager (along with the js functions to call the requests)
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
       <script type="text/javascript"
           function onClose() { 
               $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("closed"); 
           } 
           function onOpen() { 
               $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("opened"); 
           } 
       </script> 
   </telerik:RadCodeBlock> 
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  
    onajaxrequest="RadAjaxManager1_AjaxRequest"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="Label1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 
        
        <telerik:RadWindow ID="RadWindow1" runat="server" 
        OpenerElementID="<%# Button1.ClientID %>"  
        OnClientClose="onClose" OnClientShow="onOpen" 
        > 
         
        </telerik:RadWindow> 
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
 

2) usercontrol (.cs):
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
public partial class WebUserControl : System.Web.UI.UserControl 
    protected void Page_Load(object sender, EventArgs e) 
    { 
 
    } 
 
    protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
    { 
        switch (e.Argument) 
        { 
            case "closed"
                Label1.Text = "Closed"
                break
            case "opened"
                Label1.Text = "Opened"
                break
        } 
    } 
 
2) main aspx/cs page (with MasterPage): programmatically loads the usercontrol onto the content page.
Content Page (aspx): 
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<asp:PlaceHolder ID="holder" runat="server"></asp:PlaceHolder> 
</asp:Content> 
 
Content Page (.cs): 
using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
public partial class _Default : System.Web.UI.Page 
    protected void Page_Load(object sender, EventArgs e) 
    { 
        Control ucControl = LoadControl("~/WebUserControl.ascx"); 
        ucControl.ID = "MyUserControl"
        holder.Controls.Add(ucControl); 
    } 

What I've been trying to accomplish:
When I open the window, that should trigger an ajax request (which works).  And, when I close the window, that should trigger another ajax request (doesn't work).  I am passing arguments as well.  For simplicity, I've placed a label that outputs if the window has been opened or closed.  I actually just want to rebind a list when the window closes.  It seems to only work for the first ajax request, and not any more afterwards.

Thanks for your help,
Iana Tsolova
Telerik team
 answered on 11 Feb 2010
1 answer
154 views
I have a grid with an edit column and have the edit for set to popup.  When edit is clicked and the window pops open, the html edit fields are not displaying correctly.  The row with the design/html/preview is in the middle of the window and the content of the field isn't displayed.  If HTML is selected the text appears.  When design is clicked, it stay and looks as I would expect.  But it doesn't look right and isn't editable when it is opened.  The first attachment is before clicking html, then design.  The second isafter clicking the sequence.  Any ideas what is going on with this?  I have the most recent service patch of DLLs.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="adminnomaster.aspx.vb" Inherits="Test_adminnomaster" %> 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <div> 
    <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"  
        AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"  
        DataSourceID="AccessDataSource" GridLines="None" Skin="Hay"  
        AllowAutomaticUpdates="True" 
        AllowAutomaticinserts="True" 
        AllowAutomaticDeletes="True"  
        AutoGenerateColumns="False"
        <MasterTableView datakeynames="EventID" EditMode="popup"  
            datasourceid="AccessDataSource" 
            AllowAutomaticUpdates="true" 
            AllowAutomaticinserts="true" 
            AllowAutomaticDeletes="true"  
            > 
<EditFormSettings InsertCaption="Add new item" CaptionFormatString="Edit ProductID: {0}" 
                CaptionDataField="ProductID" PopUpSettings-Modal="true" > 
                <PopUpSettings width="700" /> 
                </EditFormSettings> 
                 
                 
 
            <EditFormSettings InsertCaption="Add new item"  
                CaptionFormatString="Edit Event: {0}" 
                CaptionDataField="EventID" PopUpSettings-Modal="True" > 
<PopUpSettings Modal="True"></PopUpSettings> 
            </EditFormSettings> 
 
            <RowIndicatorColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </RowIndicatorColumn> 
            <ExpandCollapseColumn> 
                <HeaderStyle Width="20px"></HeaderStyle> 
            </ExpandCollapseColumn> 
            <Columns> 
                <telerik:GridBoundColumn DataField="EventID" DataType="System.Int32"  
                    HeaderText="EventID" ReadOnly="True" SortExpression="EventID"  
                    UniqueName="EventID"
                </telerik:GridBoundColumn> 
                <telerik:GridBoundColumn DataField="EventName" HeaderText="EventName"  
                    SortExpression="EventName" UniqueName="EventName"
                </telerik:GridBoundColumn> 
                <telerik:GridHTMLEditorColumn DataField="EventDescription"  
                    HeaderText="Description" UniqueName="EventDescription"
                </telerik:GridHTMLEditorColumn> 
                <telerik:GridDateTimeColumn DataField="EventDate" HeaderText="Date"  
                    UniqueName="EventDate"
                </telerik:GridDateTimeColumn> 
                <telerik:GridDateTimeColumn DataField="EventStartTime" HeaderText="Start Time"  
                    MinDate="1899-01-29" PickerType="TimePicker" UniqueName="EventStartTime"
                </telerik:GridDateTimeColumn> 
                <telerik:GridDateTimeColumn DataField="EventEndTime" HeaderText="End Time"  
                    MinDate="1800-01-01" PickerType="TimePicker" UniqueName="EventEndTime"
                </telerik:GridDateTimeColumn> 
                <telerik:GridHTMLEditorColumn DataField="EventLocation" HeaderText="Location"  
                    UniqueName="EventLocation"
                </telerik:GridHTMLEditorColumn> 
            </Columns> 
        </MasterTableView> 
    </telerik:RadGrid> 
    <asp:AccessDataSource ID="AccessDataSource" runat="server"  
        DataFile="~/App_Data/Events.mdb"  
        DeleteCommand="DELETE FROM [tbEvents] WHERE [EventID] = ?"  
        InsertCommand="INSERT INTO [tbEvents] ([EventID], [EventName], [EventDescription], [EventDate], [EventStartTime], [EventEndTime], [EventLocation]) VALUES (?, ?, ?, ?, ?, ?, ?)"  
        SelectCommand="SELECT * FROM [tbEvents] ORDER BY [EventDate] DESC"  
        UpdateCommand="UPDATE [tbEvents] SET [EventName] = ?, [EventDescription] = ?, [EventDate] = ?, [EventStartTime] = ?, [EventEndTime] = ?, [EventLocation] = ? WHERE [EventID] = ?"
        <DeleteParameters> 
            <asp:Parameter Name="EventID" Type="Int32" /> 
        </DeleteParameters> 
        <UpdateParameters> 
            <asp:Parameter Name="EventName" Type="String" /> 
            <asp:Parameter Name="EventDescription" Type="String" /> 
            <asp:Parameter Name="EventDate" Type="DateTime" /> 
            <asp:Parameter Name="EventStartTime" Type="DateTime" /> 
            <asp:Parameter Name="EventEndTime" Type="DateTime" /> 
            <asp:Parameter Name="EventLocation" Type="String" /> 
            <asp:Parameter Name="EventID" Type="Int32" /> 
        </UpdateParameters> 
        <InsertParameters> 
            <asp:Parameter Name="EventID" Type="Int32" /> 
            <asp:Parameter Name="EventName" Type="String" /> 
            <asp:Parameter Name="EventDescription" Type="String" /> 
            <asp:Parameter Name="EventDate" Type="DateTime" /> 
            <asp:Parameter Name="EventStartTime" Type="DateTime" /> 
            <asp:Parameter Name="EventEndTime" Type="DateTime" /> 
            <asp:Parameter Name="EventLocation" Type="String" /> 
        </InsertParameters> 
    </asp:AccessDataSource> 
     
    </div> 
    <telerik:RadAjaxManager runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    </form> 
</body> 
</html> 
 

Daniel
Telerik team
 answered on 11 Feb 2010
1 answer
160 views
I'm using the built-in advanced edit forms created by the Scheduler control. I am using SqlDataSource controls for my resources and for scheduler insert/update/deletes. I have one resource where I would like the user to be able to enter a custom value, while also being able to select from existing items (i.e. The resource is a list of buyers. I want them to be able to enter a new buyer and save the task with the newly created buyer).

I've made the RadComboBox control for the Buyer list to allow custom text and I handle the AppointmentCommand event checking if an insert/update command was raised and I then check if it's a new buyer and save it. I then add the new buyer to the list and select it.

Like so:
Protected Sub rsTasksNew_AppointmentCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCommandEventArgs) Handles rsTasksNew.AppointmentCommand 
        Try 
            'check if insert command 
            If e.CommandName = "Insert" Or e.CommandName = "Update" Then 
                Dim ddlBuyer As RadComboBox = CType(e.Container.FindControl("ResAssigned-To"), RadComboBox) 
                'check for existing buyer with same name and set them as the selected index 
                ddlBuyer.SelectedIndex = ddlBuyer.FindItemIndexByText(ddlBuyer.Text.Trim(), True) 
 
                'hold buyer id 
                Dim BuyerId As Integer = IIf(ddlBuyer.SelectedIndex > -1, ddlBuyer.SelectedValue, 0) 
 
                'if new buyer being entered 
                If BuyerId = 0 Then 
                    'save new buyer 
                    BuyerId = SaveBuyer(ddlBuyer.Text.Trim(), Session(SessionVariables.Cur_Client_ID)) 
 
                    'add buyer to list and set as selected 
                    ddlBuyer.Items.Add(New RadComboBoxItem(ddlBuyer.Text, BuyerId)) 
                    ddlBuyer.SelectedValue = BuyerId 
                End If 
            End If 
        Catch ex As Exception 
 
        End Try 
    End Sub 
 
This isn't working for some reason. It keeps throwing this error:
Server Error in '/GoRentPro' Application. 
 
Invalid length for a Base-64 char array. 
 
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.FormatException: Invalid length for a Base-64 char array. 
 
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:  
 
 
[FormatException: Invalid length for a Base-64 char array.] 
   System.Convert.FromBase64String(String s) +0 
   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72 
   System.Web.UI.LosFormatter.Deserialize(String input) +11 
   Telerik.Web.UI.AdvancedTemplate.ExtractResourceValues(IDictionary target) +598 
   Telerik.Web.UI.AdvancedTemplate.ExtractValues(Control container) +362 
   Telerik.Web.UI.RadScheduler.InsertAppointmentInline() +34 
   Telerik.Web.UI.RadScheduler.OnBubbleEvent(Object source, EventArgs args) +326 
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +118 
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +135 
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10 
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 
 
Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4016 

If you could tell if this even possible to do or if I'm doing it wrong. I am using the latest version of the controls, 2010.3.1314.

Thanks.
Peter
Telerik team
 answered on 11 Feb 2010
6 answers
149 views
Hi everyone,

I have this problem while scrolling down the web page.
combo box will seperate with combo box item.
I want to upload the screen shot but attach file not support .bmp format.
Thank you for any reply to guide me.


Best regards,
Nasri
Arteta Sam
Top achievements
Rank 1
 answered on 11 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?