Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
174 views
Consider:

I am dynamically creating a toolbar that has a RadComboBox button, such that I do the following:

' in the page_load:
 
If Not m_ThisPage.IsPostBack Then
   Dim btnSearchByTxt As New RadToolBarButton()
   btnSearchByTxt.Text = "SearchFor"
   btnSearchByTxt.Value = "searchfor"
   m_RadToolBar.Items.Add(btnSearchByTxt)
 
   InstantiateSearch()
   Dim cboSearchItem As RadToolBarItem = m_RadToolBar.FindItemByText("SearchFor")
   Dim cboSearchBox As RadComboBox = CType(cboSearchItem.FindControl("SearchComboBox"), RadComboBox)
   AddHandler cboSearchBox.SelectedIndexChanged, AddressOf cboSearchBox_SelectedIndexChanged
 
End If
 
' -------------- snip ----------------
 
    Private Sub InstantiateSearch()
 
        Dim searchTemplate As New ComboBoxSearchTemplate
        Dim cboSearchItem As RadToolBarItem = m_RadToolBar.FindItemByText("SearchFor")
        'Dim searchTemplate2 As New TextBoxSearchTemplate()
        'Dim textSearchItem As RadToolBarItem = m_RadToolBar.FindItemByText("SearchFor")
        If TypeOf cboSearchItem Is RadToolBarButton Then
            searchTemplate.InstantiateIn(cboSearchItem)
        End If
 
        m_RadToolBar.DataBind()
 
    End Sub
 
    Private Class ComboBoxSearchTemplate
 
        Implements ITemplate
 
        Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
 
            Dim cboBox1 As New RadComboBox()
 
            cboBox1.ID = "SearchComboBox"
            cboBox1.DropDownWidth = 460
            cboBox1.Sort = RadComboBoxSort.Ascending
            cboBox1.SortCaseSensitive = False
            'cboBox1.DropDownCssClass = "searchDropDown"
            cboBox1.AllowCustomText = True
            cboBox1.AutoPostBack = True
            cboBox1.EmptyMessage = "Search for..."
            cboBox1.EnableItemCaching = True
            cboBox1.EnableLoadOnDemand = True
            cboBox1.MaxHeight = 320
            cboBox1.MaxLength = 2999
            cboBox1.Width = 250
            cboBox1.ExpandDelay = 2500
            cboBox1.LoadingMessage = "Searching..."
            cboBox1.Attributes.Add("onitemsrequested", "SearchComboBox_ItemsRequested")
            'cboBox1.Attributes.Add("onkeydown", "fire()")
            cboBox1.OnClientKeyPressing = "fire"
            cboBox1.CloseDropDownOnBlur = False
            cboBox1.Text = ""
            cboBox1.Font.Size = 9
            cboBox1.Font.Bold = False
            cboBox1.Font.Name = "Sans-Serif"
 
            cboBox1.DataTextField = "CMM_DESCRIPTION"
            cboBox1.Items.Add(New RadComboBoxItem(""))
 
            Dim ctt As ComboBoxTreeTemplate = New ComboBoxTreeTemplate
            ctt.InstantiateIn(cboBox1.Items(0))
 
            AddHandler cboBox1.DataBinding, AddressOf cboBox1_DataBinding
            AddHandler cboBox1.ItemsRequested, AddressOf cboBox1_ItemsRequested
            cboBox1.DataBind()
 
            container.Controls.Add(cboBox1)
 
        End Sub
 
    End Class
 
    Private Class ComboBoxTreeTemplate
 
        Implements ITemplate
 
        Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
 
            Dim rtv As RadTreeView = New RadTreeView()
 
            rtv.ID = "RadTreeView1"
            rtv.Skin = "Telerik"
            rtv.SingleExpandPath = True
 
            rtv.DataTextField = "CMM_DESCRIPTION"
            rtv.DataValueField = "CMM_ID"
            rtv.DataFieldParentID = "CMM_PARENT_ID"
 
            Dim sProc As String = "sptMaterialInventory_AddEdit_GetCommodity"
            Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("TRACURATEConnectionString").ConnectionString)
            Dim adapter As New SqlDataAdapter(sProc, connection)
            adapter.SelectCommand.CommandType = CommandType.StoredProcedure
            Dim dataTable As New DataTable()
            adapter.Fill(dataTable)
            rtv.DataSource = dataTable
            rtv.DataBind()
            container.Controls.Add(rtv)
 
        End Sub
 
    End Class

The idea is that I want to populate the combobox in the toolbar, with a treeview.  First, for some reason, the treeview is flat.  If I use the same stored procedure in a treeview that I create in ASPX, it renders perfectly.  Using the exact same in this dynamic fashion, there are no parents/children.  Just a flat list of all nodes.

Second: the treeview is fine the first rendering of the page.  When an AJAX post-back occurs, I get an error stating that the treeview does not exist.

I am looking for two answers:

1) How do I get the full treeview with parent/children to render?
2) How do I cause the treeview to not disappear after the first AJAX post-back?

I hope that this is enough code for you to understand what I am doing.

Thank you,

Tomas

Tomas
Top achievements
Rank 1
 answered on 11 Apr 2013
3 answers
298 views
We have inherited a project that uses RADGrid.  It has both events for double and single clicking enabled.

I saw this forum post:
http://www.telerik.com/community/forums/aspnet-ajax/grid/rowclick-amp-rowdoubleclick.aspx
Reading through your documentation, EnablePostBackOnRowClick should be set to false by default, but I tried setting it explictly and I am still experiencing the problem.  I put breakpoints in Javascript on the rowclick and rowdblclick events, and rowdblclick never fires; rowclick fires twice.

I did notice that your Silverlight controls have a mouse speed, and that your scheduler product has something that needs to be reset that keeps track of state.  Is there anything comparable in the Grid?  Any other tips or gotchas to making this work correctly?

Thanks,
Rebecca
Daniel
Telerik team
 answered on 11 Apr 2013
0 answers
201 views

I have a few web forms that proccess excel files, so in order to make this easier, I have a base class like this:

public abstract class ExcelImporter : Page {
    public abstract RadAsyncUpload FileUpload { get; }

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        if (FileUpload != null)
        {
            DefineRadAyncUpload();
        }
    }

    private void DefinirRadAyncUpload()
    {
        FileUpload.Skin = Skin;
        FileUpload.Culture = new System.Globalization.CultureInfo("pt-BR");
        FileUpload.TemporaryFolder = "~/temp";
        FileUpload.OnClientFileUploaded = "PostBackAsyncUploadComplete";
        FileUpload.AllowedFileExtensions = new[] { "xls", "xlsx" };
        FileUpload.MaxFileInputsCount = 1;
        FileUpload.FileUploaded += FileUploadOnFileUploaded;
    }

    protected abstract void FileUploadOnFileUploaded(object sender, FileUploadedEventArgs fileUploadedEventArgs);
}

Everything i'm setting in the Define method is working, except the extension filter. What am I doing wrong? is there another moment that I shoud set this property?

Thiago
Top achievements
Rank 1
 asked on 11 Apr 2013
5 answers
160 views
I'm using the Profile and the grid persistence code located here:
http://www.telerik.com/community/code-library/aspnet-ajax/grid/storing-multiple-grid-settings-in-database-via-profile.aspx

This code lacks the ability to save CurrentFilterFunction and CurrentFilterValue.

I've tried the new code persistence, but can't get it to save with the profile code and really don't want to redo everything. Any help on saving & loading just CurrentFilterFunction and CurrentFilterValue with the original code?
Daniel
Telerik team
 answered on 11 Apr 2013
2 answers
136 views
I seem to have stumbled across a weird display issue with the grid control.  On odd page number, the row spacing/column size is appropriate.  However, on even pages, the columns seem to have shrunk and thus seem to have double-spaced each row.  See attached screen shots.
Mike
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
205 views
Hi all,
I want to find the selected timeslot in radscheduler. When i select timeslot i.e. 5 Am to 10 Am it shows me start time as 12 am and end time as 12:30 that means it takes 30 min timeslot and i found the date of previous days on TimeSlotContextMenuItemClicking event. so how can i find the selected date and time slot in radscheduler. Its also works when new appointment pop up is open.
Please help.

  protected void RadScheduler1_TimeSlotContextMenuItemClicking(object sender, TimeSlotContextMenuItemClickingEventArgs e)
 {
                if (e.MenuItem.Value == "CommandAddAppointment")
                {
                    string fromTime = Convert.ToString(e.TimeSlot.Start);
                    string toTime = Convert.ToString(e.TimeSlot.End);
              }
}

Sudarshan.
Helen
Telerik team
 answered on 11 Apr 2013
1 answer
153 views
Hi,
Am working with Rad TabStrip & Rad MultiPage.. I have gone through the demo given in the telerik website for load on demand.. But my requirement is such that I need load on demand without the use of Rad Ajax Manager.. Is it possible?? 
Nencho
Telerik team
 answered on 11 Apr 2013
1 answer
117 views
I am using Telerik 2013.1.220.35.

I have a fairly basic Application Page.

<form runat="server" ID="PageForm">
     
<asp:ScriptManager ID="ScriptManager" runat="server" />
  
<telerik:RadComboBox runat="server" ID="cbSubtype" EmptyMessage="Select a sub-type"
                     DataTextField="Description" DataValueField="Id"
                     AutoPostBack="True"
                     OnSelectedIndexChanged="cbSubtype_SelectedIndexChanged">
    
</telerik:RadComboBox>
 
<telerik:RadGrid ID="rgDocuments" runat="server" AutoGenerateColumns="False"
                 CellSpacing="0" GridLines="None" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True"
                 OnNeedDataSource="rgDocuments_NeedDataSource">
    <MasterTableView DataKeyNames="DocumentText" Name="DocumentMaster">
        <Columns>
            <telerik:GridBoundColumn DataField="Discipline" HeaderText="[Discipline]" UniqueName="Discipline" />
            <telerik:GridHyperLinkColumn DataTextField="DocumentText" HeaderText="[Document]" DataNavigateUrlFields="DocumentUrl" UniqueName="DocumentLink" />
            <telerik:GridBoundColumn DataField="Revision" HeaderText="[Rev]" UniqueName="Revision" />
            <telerik:GridBoundColumn DataField="Date" HeaderText="[Date]" UniqueName="Date" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
 
</form>

Also, the C# part.

public partial class StandardsTypicals : LayoutsPageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                List<ListBoxGeneralDisplay> list = new List<ListBoxGeneralDisplay>();
                list.Add(new ListBoxGeneralDisplay() { Description = "", Id = -1 });
                list.Add(new ListBoxGeneralDisplay() { Description = "EG - Std. Specs", Id = 0 });
                list.Add(new ListBoxGeneralDisplay() { Description = "EF - Const. Specs", Id = 1 });
                list.Add(new ListBoxGeneralDisplay() { Description = "DO - Typicals", Id = 2 });
  
                cbSubtype.DataSource = list;
                cbSubtype.DataBind();
            }
        }
  
        protected void cbSubtype_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            rgDocuments.Rebind();
        }
  
        protected void rgDocuments_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            if (cbSubtype.SelectedValue != "-1" && !string.IsNullOrEmpty(cbSubtype.SelectedValue))
            {
                List<RadgridStandardsTypicalsDisplay> displayList = new List<RadgridStandardsTypicalsDisplay>();
                displayList.Add(new RadgridStandardsTypicalsDisplay() { Discipline = "Discipline", Date = new DateTime(2013, 04, 01), DocumentText = "Document Text", DocumentUrl = "http://www.google.com", Revision = "A" + cbSubtype.SelectedValue });
                displayList.Add(new RadgridStandardsTypicalsDisplay() { Discipline = "Discipline", Date = new DateTime(2013, 04, 01), DocumentText = "Document Text", DocumentUrl = "http://www.google.com", Revision = "A" + cbSubtype.SelectedValue });
                displayList.Add(new RadgridStandardsTypicalsDisplay() { Discipline = "Discipline", Date = new DateTime(2013, 04, 01), DocumentText = "Document Text", DocumentUrl = "http://www.google.com", Revision = "A" + cbSubtype.SelectedValue });
                rgDocuments.DataSource = displayList;
            }
            else
            {
                List<RadgridStandardsTypicalsDisplay> displayList = new List<RadgridStandardsTypicalsDisplay>();
                rgDocuments.DataSource = displayList;
            }
        }
    }

Normally, I would expect this to work
(In fact, it works in RenderMode Native).
However, as soon as I try to expand the ComboBox, I get this error.


Line: 1617
Erreur : 'top' a la valeur Null ou n'est pas un objet.
Translate to: 'Top' is null or not an object

I tried to debug it.

b.RadComboBox.prototype._getOffsetParentOffset=function(c){var j=0;
var f=0;
var d=a(c.offsetParent);
if(d.css("position")!="static"){var g=d.offset();
j=g.top; // BREAK HERE.. G is null.
f=g.left;
if(c.offsetParent==document.body){var i=parseInt(d.css("top"),10);
if(!isNaN(i)){j+=i;
}var h=parseInt(d.css("left"),10);
if(!isNaN(h)){f+=h;
}}}var e={top:j,left:f};
return e;
};

I added a comment where it breaks. This problem is fairly bizarre. I'm pretty sure I have everything that is required. The ScriptManager is there and is in a Form tag that is runat="server". I can select an item using the text selection and it works. It just never render the items. The error also trigger if I try to resize the window (after I chose to continue after the debug).

I hope you can guide me on the right path.
Simon
Top achievements
Rank 1
 answered on 11 Apr 2013
3 answers
149 views
Hello.

I am creating a class that wraps around a RadToolBar.  The RadToolBar is dynamically created, with the exception that an empty toolbar is defined in the aspx code (example below).  The class allows me to access buttons and a text box with simple class functions, properties, etc.  Works nicely.

What I am stuck on is that I wish to handle button click events IN this class, allowing the new handlers to be then handled by the user in the .vb server-side code with the "handles" process (example idea, below).  I know that I am on the track to figure this out, but I cannot seem to find the right solution.

So, here is the aspx:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="projects.aspx.vb" Inherits="EPD_WEB_APP.projects" %>
 
<%@ Import Namespace="EPD_WEB_APP" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title>Test</title>
</head>
<body style="height: 830px; width: 630px">
    <form id="form1" runat="server">
    <div style="height: 821px; width: 1392px; margin-right: 0px;">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
        <br />
        <telerik:RadToolBar ID="RadToolBar1" runat="server" Skin="Default"
            AutoPostBack="True">
        </telerik:RadToolBar>
        <br />
        <br />
        <asp:Label ID="txtSearchFieldContents" runat="server" Text="Result:"></asp:Label>
    </div>
    </form>
</body>
</html>

And, here is the toolbar class which wraps around the toolbar:

Public Class tToolBar
 
    Private m_RadToolBar As RadToolBar
    Private m_ThisPage As System.Web.UI.Page
    Private m_Skin As String
    Private m_SearchText As String
 
    Public Sub New(ByVal RadToolBar As RadToolBar)
 
        m_RadToolBar = RadToolBar
        m_ThisPage = HttpContext.Current.Handler
        m_SearchText = ""
        m_Skin = m_RadToolBar.Skin
 
        If Not m_ThisPage.IsPostBack Then
 
            Dim btnAdd As New RadToolBarButton()
            btnAdd.Text = "Add"
            btnAdd.Value = "1"
            btnAdd.ImageUrl = "Images/AddRecord.gif"
            'btnAdd.CheckOnClick = True
            m_RadToolBar.Items.Add(btnAdd)
 
            Dim btnEdit As New RadToolBarButton()
            btnEdit.Text = "Edit"
            btnEdit.Value = "2"
            'btnEdit.CheckOnClick = True
            btnEdit.ImageUrl = "Images/Edit.gif"
            m_RadToolBar.Items.Add(btnEdit)
 
            Dim buttonS1 As New RadToolBarButton()
            buttonS1.IsSeparator = True
            m_RadToolBar.Items.Add(buttonS1)
 
            Dim btnSave As New RadToolBarButton()
            btnSave.Text = "Save"
            btnSave.Value = "3"
            btnSave.ImageUrl = "Images/Save.gif"
            m_RadToolBar.Items.Add(btnSave)
 
            Dim btnCancel As New RadToolBarButton()
            btnCancel.Text = "Cancel"
            btnCancel.Value = "4"
            btnCancel.ImageUrl = "Images/Cancel.gif"
            m_RadToolBar.Items.Add(btnCancel)
 
            Dim btnDelete As New RadToolBarButton()
            btnDelete.Text = "Delete"
            btnDelete.Value = "5"
            btnDelete.ImageUrl = "Images/deletex.gif"
            m_RadToolBar.Items.Add(btnDelete)
 
            Dim buttonS2 As New RadToolBarButton()
            buttonS2.IsSeparator = True
            m_RadToolBar.Items.Add(buttonS2)
 
            Dim ddSearchBy As New RadToolBarSplitButton()
            ddSearchBy.Text = "Search By..."
            ddSearchBy.ToolTip = "Select the type of search."
            Dim btnUPC As New RadToolBarButton()
            btnUPC.ToolTip = "Select the type of search."
            btnUPC.Text = "UPC"
            btnUPC.Value = "UPC"
            Dim btnDesc As New RadToolBarButton()
            btnDesc.ToolTip = "Select the type of search."
            btnDesc.Text = "Description"
            btnDesc.Value = "DESC"
            ddSearchBy.Buttons.Add(btnUPC)
            ddSearchBy.Buttons.Add(btnDesc)
            m_RadToolBar.Items.Add(ddSearchBy)
 
            'Dim splitButton As New RadToolBarSplitButton()
 
            Dim btnSearchByTxt As New RadToolBarButton()
            btnSearchByTxt.Text = "Search for?"
            m_RadToolBar.Items.Add(btnSearchByTxt)
 
            Dim btnSearch As New RadToolBarButton()
            btnSearch.Text = "Search"
            btnSearch.Value = "6"
            btnSearch.ImageUrl = "Images/search.gif"
            m_RadToolBar.Items.Add(btnSearch)
 
            Dim buttonS3 As New RadToolBarButton()
            buttonS3.IsSeparator = True
            m_RadToolBar.Items.Add(buttonS3)
 
            Dim btnFirst As New RadToolBarButton()
            btnFirst.Text = "First"
            btnFirst.Value = "8"
            btnFirst.ImageUrl = "Images/blue-first-16.gif"
            m_RadToolBar.Items.Add(btnFirst)
 
            Dim btnPrev As New RadToolBarButton()
            btnPrev.Text = "Previous"
            btnPrev.Value = "9"
            btnPrev.ImageUrl = "Images/blue-prev-16.gif"
            m_RadToolBar.Items.Add(btnPrev)
 
            Dim btnNext As New RadToolBarButton()
            btnNext.Text = "Next"
            btnNext.Value = "10"
            btnNext.ImageUrl = "Images/blue-next-16.gif"
            m_RadToolBar.Items.Add(btnNext)
 
            Dim btnLast As New RadToolBarButton()
            btnLast.Text = "Last"
            btnLast.Value = "11"
            btnLast.ImageUrl = "Images/blue-last-16.gif"
            m_RadToolBar.Items.Add(btnLast)
 
            Disable()
 
        End If
 
        InstantiateSearch()
 
    End Sub
 
    Public Property Skin() As String
        Get
            Return m_Skin
        End Get
 
        Set(ByVal value As String)
            m_Skin = value
            m_RadToolBar.Skin = m_Skin
        End Set
 
    End Property
 
    Public Property SearchText() As String
 
        Get
            m_SearchText = ""
 
            Dim textItem As RadToolBarItem = m_RadToolBar.FindItemByText("Search for?")
            Dim textBox As TextBox = CType(textItem.FindControl("TextBox"), TextBox)
 
            m_SearchText = textBox.Text
 
            Return m_SearchText
        End Get
 
        Set(ByVal value As String)
            m_SearchText = value
 
            Dim textItem As RadToolBarItem = m_RadToolBar.FindItemByText("Search for?")
            Dim textBox As TextBox = CType(textItem.FindControl("TextBox"), TextBox)
 
            textBox.Text = m_SearchText
        End Set
 
    End Property
 
    Public Sub InstantiateSearch()
 
        Dim searchTemplate As New TextBoxSearchTemplate()
        Dim textSearchItem As RadToolBarItem = m_RadToolBar.FindItemByText("Search for?")
        If TypeOf textSearchItem Is RadToolBarButton Then
            searchTemplate.InstantiateIn(textSearchItem)
        End If
 
        m_RadToolBar.DataBind()
 
    End Sub
 
    Public Sub Disable(Optional ByVal scope As String = "")
 
        If scope = "All" Or scope = "" Then
            m_RadToolBar.Enabled = False
        End If
        ' other options may exist...
 
    End Sub
 
    Public Sub Enable(Optional ByRef scope As String = "")
 
        If scope = "All" Or scope = "" Then
            m_RadToolBar.Enabled = True
        End If
        ' other options may exist...
 
    End Sub
 
    'Protected Sub SearchButton_Click(ByVal sender As Object, ByVal e As EventArgs)
        '----- some way of handling the bar's click, and then inside, which button was clicked, like the "Search" button.
        '----- this needs to be then handled by the user who is using the class with a tToolBar.OnClick something...
    'End Sub
 
    Private Class TextBoxSearchTemplate
        Implements ITemplate
 
        Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
            Dim txtbox1 As New TextBox()
 
            txtbox1.ID = "TextBox"
            txtbox1.Text = ""
            txtbox1.Font.Size = 10
            txtbox1.Font.Bold = False
            AddHandler txtbox1.DataBinding, AddressOf txtbox1_DataBinding
            container.Controls.Add(txtbox1)
        End Sub
 
        Private Sub txtbox1_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
            Dim target As TextBox = DirectCast(sender, TextBox)
            Dim button As RadToolBarButton = DirectCast(target.BindingContainer, RadToolBarButton)
            'Dim buttonText As String = DirectCast(DataBinder.Eval(button, "Text"), String)
            'target.Text = buttonText
            target.Text = ""
            target.ToolTip = "What do you wish to search for?"
        End Sub
    End Class
 
End Class


Finally, here is the server-side code:

Public Class projects
    Inherits System.Web.UI.Page
 
    Private formToolBar As tToolBar
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
 
        formToolBar = New tToolBar(RadToolBar1)
        formToolBar.Enable()
 
        If Not Page.IsPostBack Then
 
            'formToolBar.Skin = "Windows7"
 
        Else
 
 
 
        End If
 
 
    End Sub
 
 
    Protected Sub RadToolBar1_ButtonClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadToolBarEventArgs) Handles RadToolBar1.ButtonClick
 
        ' the following just tests whether or not I can access the text from the search textbox.
        formToolBar.Skin = formToolBar.SearchText
        txtSearchFieldContents.Text = "Skin: " & formToolBar.Skin
 
        ' what I need is a way in the CLASS to dispatch (fire) events per button,
        ' so that I can have individual handlers in this VB.NET code.
        ' That way, I don't have to do fancy footwork in the VB.NET, but do all
        ' the dirty work in the CLASS, and just let the user
        ' here deal with the inner button.
 
    End Sub
 
End Class


I am sure that in the CLASS, I handle the ToolBar OnClick event, and then determine WHICH RadButton was clicked, and raise an event, which has a CLASS HANDLER for that event.  I would have that handler written in such a way as the user of the class can then create the handler that "HANDLES" tToolBarExample.OnClick event.  This is my question: how do I do this inside my class?  I seem to be close, but I am stuck trying to figure out the final bit.

Thank you
Tomas
Top achievements
Rank 1
 answered on 11 Apr 2013
1 answer
153 views
I want to make sure someone puts in a Description before they upload a file.  Not like the example where the description is put in after. I can do it with manual upload like:
function startManualUpload() {
    var tb = $find('<%=tbFileDesc.ClientID%>');
    var tbtxt = tb._text.length;
    if (tbtxt == 0) {
 //write some error
    }
    else {
        var upload = $find('<%=radUpAssoc.ClientID%>');
        upload.startUpload();
    }
 
}

But then I want to add the description to my AsyncUploadConfiguration.  I'm setting this on the server side though.
How can I add on to my AsyncUploadConfiguration from here?  I'm not so good at javascript so maybe this is easy.

I guess I could do a Response.write with the startmanualUpload function, but that was acting a bit strange.
Hristo Valyavicharski
Telerik team
 answered on 11 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?