Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
313 views
For some reason the dropdown is still coming up on my ComboBoxes even though they're not databound / have no items in them.

 
<telerik:RadComboBox ID="RadComboBox" DataSourceID="odsPopularProducts" Filter="Contains" 
          DataTextField="ProductName" DataValueField="ProductID" AllowCustomText="true" MaxHeight="300" 
          Width="205" OnSelectedIndexChanged="RadComboBoxProducts_SelectedIndexChanged" 
          AutoPostBack="true" DropDownWidth="300" OffsetX="-95" EmptyMessage="Select a Popular Product..." 
          runat="server">                                                                                                                 
</telerik:RadComboBox> 

How can I stop the dropdown from displaying when there are no items in it?
Kevin
Top achievements
Rank 2
 answered on 09 Dec 2011
3 answers
67 views
I am adding raddatepickers to the page dynamically and the sharecalendar part isn't working.

I have some sample code below. 
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RadDatePickerTest.aspx.cs" Inherits="NCCCN.CMIS.AdHOC.RadDatePickerTest" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"  />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" />
    <asp:PlaceHolder runat="server" ID="TemplatePH" />
    <asp:PlaceHolder runat="server" ID="PlaceHolder1" />
 
    <br /><br />
 
 
    <telerik:RadDatePicker runat="server" ID="ACal" />
    <telerik:RadDatePicker runat="server" ID="BCal" />
 
    </div>
    </form>
</body>
</html>



protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
RadCalendar cal = new RadCalendar();
cal.ClientIDMode = System.Web.UI.
ClientIDMode.Static;
cal.EnableMultiSelect =
false;
cal.ID =
this.ClientID + "SharedCalID";
TemplatePH.Controls.Add(cal);
RadDatePicker StartDatePicker = new RadDatePicker();
StartDatePicker.ClientIDMode = System.Web.UI.
ClientIDMode.Static;
StartDatePicker.AutoPostBack =
true;
//StartDatePicker.SelectedDateChanged += new SelectedDateChangedEventHandler(StartDatePicker_SelectedDateChanged);
StartDatePicker.SharedCalendar = cal;
StartDatePicker.SelectedDate =
new DateTime(2005, 1, 1);
StartDatePicker.ID =
this.ClientID + "SentFromFilterTemplate_StartDatePicker";
TemplatePH.Controls.Add(StartDatePicker);
 
RadDatePicker EndDatePicker = new RadDatePicker();
EndDatePicker.ClientIDMode = System.Web.UI.
ClientIDMode.Static;
EndDatePicker.AutoPostBack =
true;
// EndDatePicker.SelectedDateChanged += new SelectedDateChangedEventHandler(EndDatePicker_SelectedDateChanged);
EndDatePicker.SharedCalendar = cal;
EndDatePicker.SelectedDate =
new DateTime(2006, 1, 1);
EndDatePicker.ID =
this.ClientID + "SentFromFilterTemplate_EndDatePicker";
TemplatePH.Controls.Add(EndDatePicker);
ACal.SharedCalendar = cal;
BCal.SharedCalendar = cal;
}
}

 

 

 

 

Kevin
Top achievements
Rank 2
 answered on 09 Dec 2011
1 answer
145 views
Hi

I have what I thought was a very simple requirement, and maybe it is.

I have a ListBox that contains a few items, that I add programmatically in Server side code.

As each item is selected I want to dynammically load a use control and present it to the right of the ListBox.

Actually I have all of this working just fine.
Again I am using a server side selection changed event to control the dynamic loading. 

However I would like to set the intial selection to the first item in the listbox.
I have tried to do this after the LB is loaded, and I have set the first item to selected just before adding it to the LB.

In neither case do I get a selection change event so I can load the initial dynamic control.

What am I missing?

Do I just have to write extra code to load this control seperate from the SelectionChanged event I am relying on now?

TIA  
Bozhidar
Telerik team
 answered on 09 Dec 2011
12 answers
145 views

I'm not sure where this is going wrong, but any help would be appreciated.

I'm trying to add a column to an edit column to a grid (I also want to add a delete column, but I haven't gotten that far yet). I can make the column display without a problem, but the moment I click the button I get very odd results - the button disappears, my column headers move across and one of the bits of content from another of my columns vanishes entirely. I found it rather funny at first, but then I couldn't find out why it was doing it.

My code is below.

Private Sub rgdTable_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs) Handles rgdTable.DetailTableDataBind
    Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
    Select Case e.DetailTableView.Name
        Case "TUGDetailTable"
            Dim myTrackingGUID As Guid = New Guid(dataItem.Item("MerchantTrackingGUID").Text)
            Dim myDataSet As New DataSet
            '===Get the DetailTable data===
            myDataSet = *get data from database*
            myDataSet.Tables(0).Columns.Remove("Source")
            myDataSet.Tables(0).Columns.Remove("@Action")
            e.DetailTableView.DataSource = myDataSet
            e.DetailTableView.CommandItemDisplay = GridCommandItemDisplay.Top
            e.DetailTableView.CommandItemSettings.AddNewRecordImageUrl = "../Img/AddRecord.gif"
            e.DetailTableView.CommandItemSettings.AddNewRecordText = "Add New TUG Details"
            e.DetailTableView.CommandItemSettings.ShowRefreshButton = False
            e.DetailTableView.EditFormSettings.EditColumn.UniqueName = "EditCommandColumn1"
            e.DetailTableView.EditFormSettings.UserControlName = "../UserControls/Templates/TUGAdd.ascx"
            e.DetailTableView.EditFormSettings.EditFormType = GridEditFormType.WebUserControl
            Dim editCol As GridEditCommandColumn
            editCol = New GridEditCommandColumn
            editCol.UniqueName = "EditColumn"
            editCol.HeaderText = ""
            editCol.HeaderStyle.Width = 20
            editCol.EditImageUrl = "~\img\edit.gif"
            editCol.ButtonType = GridButtonColumnType.ImageButton
            editCol.EditFormColumnIndex = 0
            e.DetailTableView.Columns.Add(editCol)
    End Select
End Sub

If anyone can tell me what's going wrong I'd appreciate it.
Pete
Top achievements
Rank 1
 answered on 09 Dec 2011
4 answers
80 views
I am wondering if the following scenario is supported:

  • After each file is uploaded to the temp folder, prompt the user to enter additional info about the file (I can see how to do this from the posted demo)
  • Persist the additional fields and file info until a specific button triggers a postback (I posted another thread asking how to use a PostbackTrigger when the triggering control is in a different user control)
  • In the OnFileUploaded server-side event handler, prevent the file from being auto-saved to TargetFolder, and instead save the uploaded file to a SharePoint document library along with the metadata provided in the "additional fields" on the client

To explain further, the reason I don't want the RadAsyncUpload control to use the default auto-save functionality using the TargetFolder is that the location the file will be saved to is determined based on some metadata about the file and some other business rules. In other words, I need to access data in the "additional fields" for each file in the server-side OnFileUploaded event handler and then determine the appropriate location to save the file (within a SharePoint document library).

Thanks, your help is greatly appreciated.

Kind regards,
Larkin
Kalina
Telerik team
 answered on 09 Dec 2011
1 answer
68 views
Hi

How can the I activate the disabled image while disabling the button on the client side using button.set_enabled(false)?

Cheers,
Jani
Slav
Telerik team
 answered on 09 Dec 2011
1 answer
23 views
I noticed not to my surprise that adobe bc uses rad editor i quite like the theme they have also does anyone have tools file.xml similar to the one that they have used.

Many Thanks
Rumen
Telerik team
 answered on 09 Dec 2011
2 answers
179 views

I know that this is not the exact wording of the pop-ups and drop-downs.
I get a drop-down from Telerik in visual studio stating that there is a new update; I select ok.  Even if I go and update the project from the menu bar, I get the error when I run up the page. Sometimes I will see the issue right when looking at the page in design mode.

The way I have been fixing the issue,  delete  the reference and reassociate the Telerik reference.  I believe that then the project is not using he newest Telerik controls.

 I have no custom skins or controls.

Error:

Telerik.Web.UI.RadTabStrip with ID='RadTabStrip1' was unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

Sean
Top achievements
Rank 1
 answered on 09 Dec 2011
1 answer
83 views
I know this is a very simple question...but I'd like to use the RadNotification to display a notification to the user even if the web browser is minimized.  The idea would be that the user can have the web application minimized but a RadNotification would alert the user if there has been any change in the content since the last time the page was automatically refreshed. 

Will the RadNotification display if the browser is minimized or does it only work within the web page itself?

Thanks,
George
Marin Bratanov
Telerik team
 answered on 09 Dec 2011
3 answers
250 views
Hello

We've build a custom web control (not a user control) which adds a RadToolTip dynamically.
The tooltip is created and added to the Controls-collection of the webcontrol in the OnLoad-event.
The text of the tooltip is set in the RenderContents-event of the webcontrol.

This control is used in rows of a RadGrid and it works fine when the page is requested but after a postback the tooltip still appears but the text is empty.

The difference seems to be that on a page request the telerik tooltip somehow adds statements like :

Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadToolTip, {"_cssClass":"","_manualCloseButtonText":"Close","clientStateFieldID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00_ClientState","formID":"aspnetForm","relativeTo":1,"skin":"USGFOEXTelerik","targetControlID":"ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageImage","text":"Dit is een bericht verkregen uit hercules:\u003cbr /\u003ede status is ToValidate"}, null, null, $get("ctl00_ctl00_ContentPlaceholder1_MiddleColumn_ctl00_CandidateListGrid_ctl00_ctl04_MessageUSGToolTip_ctl00"));
});

When a postback is done these statements are missing.

Why are these statements missing after a postback? 



Marin Bratanov
Telerik team
 answered on 09 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?