Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
251 views
What is the fully qualified name for $find()?

I can use $find() within other functions without problem. For example,
function FindCombo(idCombo){ 
    var combo = $find(idCombo); 
    combo.set_text("Here I am!"); 
} 
 

But if I try to use it at top-level, like this:
var MyObject = new Object(); 
MyObject.combo = $find("MyComboId"); 
I get "$find not defined" error.

Similar error happens when I try to use shortcut method $get(). I use its fully qualified name (document.getElementById), then it is OK. So I guess if I use $find's full name, it should solve the problem.
dingjing
Top achievements
Rank 2
 answered on 04 Apr 2008
1 answer
69 views
As I want to check the scheduler control combining with other control i need scheduler If i feel that they are feasable to us then we look for full version..thnks
Peter
Telerik team
 answered on 04 Apr 2008
3 answers
363 views
Hi, I want to programmatically create a Prometheus ComboBox with multiple columns, databound to a datatable and added programmatically to a ASPX page.

Is this possible? 

I found references to sample code on creating multicolumn combobox controls (077086_ServerSideMultipleColumnsComboBox.zip) but this is a RadControls for ASP.NET sample that does not work with Prometheus.
In the method :public void InstantiateIn(Control container) on the line of code :DataRowView itemSource = (DataRowView)item.DataItem; the itemSource is NULL.

Thanks, Andy
Simon
Telerik team
 answered on 04 Apr 2008
2 answers
232 views
Hello,

I have a grid whose editmode="forms".  In the <FormTemplate> there is a drop down list.  The list items for the drop down list are populated in the ItemCreated event and based on the value of the Item.DataItem I want to pre-select the appropriate list item.  What I have, however, does not work as the first list item is always selected.  The code for the ItemCreated event is as follows:

void OnPartAliasesItemCreated(object sender, GridItemEventArgs e)  
   {  
      if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
      {  
 
         GridEditableItem item = e.Item as GridEditableItem;  
         TextBox tbPartAlias = item.FindControl("tbPartAlias") as TextBox;  
         Label lblPartAliasValue = item.FindControl("lblPartAliasValue") as Label;  
         TextBox tbRetailList = item.FindControl("tbRetailList") as TextBox;  
         DropDownList ddlProductLine = item.FindControl("ddlProductLine") as DropDownList;  
         CheckBox cbDisplayOnRetail = item.FindControl("cbDisplayOnRetail") as CheckBox;  
         CheckBox cbRetailSpotlight = item.FindControl("cbRetailSpotlight") as CheckBox;  
         CheckBox cbDisplayOnWholesale = item.FindControl("cbDisplayOnWholesale") as CheckBox;  
         CheckBox cbListOnInfopia = item.FindControl("cbListOnInfopia") as CheckBox;  
         CheckBox cbBMWClearanceItem = item.FindControl("cbBMWClearanceItem") as CheckBox;  
         CheckBox cbSaabClearanceItem = item.FindControl("cbSaabClearanceItem") as CheckBox;  
         CheckBox cbVolvoClearanceItem = item.FindControl("cbVolvoClearanceItem") as CheckBox;  
 
         ddlProductLine.DataSource = App.Core.BusinessObjects.Part.FindAllProductLines();  
         ddlProductLine.DataBind();  
 
         if (e.Item.DataItem is App.Core.BusinessObjects.Part)  
         {  
            App.Core.BusinessObjects.Part partAlias = e.Item.DataItem as App.Core.BusinessObjects.Part;  
            lblPartAliasValue.Visible = true;  
            tbPartAlias.Visible = false;  
            lblPartAliasValue.Text = partAlias.PartAlias;  
            ddlProductLine.ClearSelection();  
            ListItem productLine = ddlProductLine.Items.FindByValue(partAlias.ProductLine);  
            if (productLine != null)  
               productLine.Selected = true;  
            cbDisplayOnRetail.Checked = partAlias.DisplayOnRetail;  
            cbRetailSpotlight.Checked = partAlias.ShowInRetailSpotLight;  
            cbDisplayOnWholesale.Checked = partAlias.DisplayOnWholeSale;  
            cbListOnInfopia.Checked = partAlias.ListOnInfopia;  
            cbBMWClearanceItem.Checked = partAlias.IsBMWClearanceItem;  
            cbSaabClearanceItem.Checked = partAlias.IsSaabClearanceItem;  
            cbVolvoClearanceItem.Checked = partAlias.IsVolvoClearanceItem;  
 
            if (!partAlias.IsAlias)  
            {  
               Label lblRetailListValue = item.FindControl("lblRetailListValue") as Label;  
               Label lblProductLineValue = item.FindControl("lblProductLineValue") as Label;  
 
               lblPartAliasValue.Visible = true;  
               tbPartAlias.Visible = false;  
               lblPartAliasValue.Text = partAlias.PartAlias;  
 
               lblRetailListValue.Visible = true;  
               tbRetailList.Visible = false;  
               lblRetailListValue.Text = partAlias.UnitPrice.ToString("c");  
 
               lblProductLineValue.Visible = true;  
               ddlProductLine.Visible = false;  
               lblProductLineValue.Text = partAlias.ProductLine;  
            }  
         }  
      }  
   } 


I can post more the code if that is helpful and any assistance would be greatly appreciated.  Thanks!
Mike Sweet
Top achievements
Rank 1
 answered on 04 Apr 2008
2 answers
125 views

Hello,

I have a Grid whose editmode="forms".  I am doing some server-side validation on the item Insert and Update events.  I am not using a "DataSource", but instead binding directly to a collection of objects.  What I am having trouble with is that if the inserted/updated item is not valid, I want to keep that row in edit view.  My code for the Update event is as follows:

   void OnPartAliasesUpdateCommand(object source, GridCommandEventArgs e)  
   {  
      GridEditableItem item = e.Item as GridEditableItem;  
      string partCode = item.OwnerTableView.DataKeyValues[item.ItemIndex]["PartAlias"].ToString();  
      App.Core.BusinessObjects.Part partAlias = PartAliases[partCode];  
      RetrievePartAliasForm(item, partAlias);   
      if (!ValidatePartAliasForm(partAlias))  
      {  
         ccPartAliasStatusLabel.AddErrors(base.Rules);  
         return;  
 
      }  
      PartAliases[partAlias.PartAlias] = partAlias;  
      rdgPartAliases.Rebind();  
   } 

In other words, if the call to ValidatePartAliasForm return false, keep the item in edit view.  Any help would be appreciated. 

Thanks!
Mike Sweet
Top achievements
Rank 1
 answered on 04 Apr 2008
1 answer
86 views
In my Edit template for my RadGrid I have a drop down box that when the selected index changes I need to query a database for the change and populate a text box with the query results.  When I select the event for the dropdown box it creates the event for me, but I can't access any of the controls with just EventArgs.  I would think there has to be a better way to do this, but perhaps not?

Vlad
Telerik team
 answered on 04 Apr 2008
2 answers
116 views
Hi,
I've got a grid with simple paging working great. Similar to these...
http://www.telerik.com/demos/aspnet/prometheus/Grid/Examples/GeneralFeatures/Paging/DefaultCS.aspx (Specifically, I'm using both numeric and Next/Previous buttons pager)

I was wondering if there is an "easy" way to include paging at the top and bottom of the grid? Right now it's just at the bottom like the examples above.

Also, I'm using VB if that matters
Thanks,
Joe
Joe
Top achievements
Rank 2
 answered on 04 Apr 2008
1 answer
211 views

I think this should be fairly easy to solve and I'm missing something obvious but after combing through the forums and tutorials and not finding a reasonable solution I figured I'd just post the questions.

I have a situation where I am loading controls with LoadControl after the initial page load. I've broken this down into two issues:

  1. Loading the skins

http://www.telerik.com/community/forums/thread/b311D-kbkmc.aspx talks about pointing to the skin directly. I'm using Prometheus and while I suppose I can copy the Skins directory into my application instead of using the embedded skins I'm not thrilled about having thousands of files in source control when they're already in the dll. Is there a simple way to point to the skin directly or otherwise make the application load the skin if I load a control via LoadControl & Ajax AFTER the page has already been presented on the client?

  1. Using Ajax with a control loaded AFTER the page is presented.

Simple scenario -- the page is intially loaded with an asp:Panel that is populated by clicking a button that uses the RadAjaxManager to get the content for the Panel. The content that comes back is from a control that is loaded via LoadControl and of course also contains various Telerik controls. Obvious problem here is that the RadScriptManager and RadStyleSheetManager were present in the original page but that page was already rendered on the client. There doesn't seem to be an obvious way to register the newly loaded control with. I've looked at what feels like 100's of examples of using LoadControl but they all seem to deal with using it prior to the intial page being displayed rather than after an ajax call.

Thanks for all your assistance on this -- it's driving me nuts! :-)

Matt

Steve
Telerik team
 answered on 04 Apr 2008
8 answers
324 views
Hi,
Getting to love this control a lot!  We are now at a point that we need to print out the scheduler for each resource,  This can be done in portrait but have found some discrepancies that hopefully can be sorted out.

1.  I am having no luck with printing the scheduler in a landscape format.  None of the CSS @page commands seem to work.  Is there an example that you can provide which will work?
2.  The stylesheet I use has the tag "media='print'".  When this is displayed on screen the appointments which are color coded by resource go missing but do display in the print preview.  Why is this?
3. This may be a bizarre request, but could we have some form of print control, for example an orientation option on the control for landscape/portrait.   This way we dont have to fudge the page to print in landscape, it nativley shows the scheduler sideways?  Because we want it in landscape mode it is nativley read-only... (weird question I know, but may be useful...)

Look forward to your feedback.

Regards,

JK
Wayne
Top achievements
Rank 1
 answered on 04 Apr 2008
8 answers
259 views
I am using the radscheduler to display events. However the administration side will be edited with a grid of schedules. Is it possible just to use the recurrence engine part of the scheduler on my form when editing?

I know I can achieve this by using the recurrence classes that telerik provides, but I would just like to use the interface part of the recurrence set up while editing events.

Thanks,
Peter
Telerik team
 answered on 04 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?