Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
364 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
238 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
128 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
89 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
119 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
214 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
327 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
263 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
3 answers
219 views
When editing an appointment in the Scheduler control, I'm trying to get the resource to show what I'm pulling from the database.  If I do this from the Design View it works fine.  However, I'm trying to dynamically show resources based on certain conditions, so I have to create them on the fly.

I already have the Resources set from our database being created, but the value from the resource doesn't match up with what's in the database.  For example, if the resource named "Letter" has values A, B, C and the value is B in the database, the resource will remain in the "Unselected" position.

Can you please tell me how to correctly set the value of the resource in the code behind file?

Thanks,
David
Peter
Telerik team
 answered on 04 Apr 2008
5 answers
268 views
We recently began migrating to the new Prometheus suite of controls, and have been extremely happy with the quality of the software. Telerik has simply done an amazing job with the controls, and we couldn't be happier. Consequently, we are right now trying to migrate all of our existing ComponentArt controls over to Telerik.

We've run into one thing ComponentArt does that Telerik does not: a dialog box where the source of the content comes directly from the page (via templates).

We absolutely love the new Telerik RadWindow control -- the skins, functionality and performance are awesome. But the control was built to only utilize external pages (through an IFRAME). This doesn't work for us -- we absolutely need the content of the dialog to come from the page itself.

We'd really like to ditch ComponentArt if at all possible. Is there anything on your roadmap to enable internal content for RadWindow? Or is there a way to hack the control to do it now? (We looked briefly at RadDock -- that's not what we need.) If not, we'll keep using ComponentArt's Dialog control for the foreseeable future.

Thanks for your help and for all the work you're doing on this suite. I really respect that you started from scratch with this -- it shows.
Georgi Tunev
Telerik team
 answered on 04 Apr 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?