Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
154 views
Hello, please see the following link, it is my source code:
http://www.fronseetechnology.com/ShortSalesWeb/Default.aspx

You will notice the US map, try hovering over some states, I know it does the issue for sure on CA.  You will notice all of the pop-ups I am getting and it is just not working.  I used the sample application here:
http://www.telerik.com/community/forums/aspnet-ajax/tooltip/imagemap-with-tooltip-and-database-data.aspx

and here: http://demos.telerik.com/aspnet-ajax/tooltip/examples/imagemaptooltipmanager/defaultcs.aspx

- Im not sure what I have wrong, it looks like it is trying to work, but there are authentication issues (i imagine with the web service?).  Does anyone have any suggestions?   OH, a big thing I was thinking about, instead of using a web service (.asmx), cant I just call a [webmethod] directly in the code behind?  I have tried this with other code, but not this ImageMap and tooltipmanager.   I gave Everyone permission to the directory on the server, and still these issues.  Someone please help!!! Thank you

Joe






Svetlina Anati
Telerik team
 answered on 13 Apr 2010
1 answer
112 views
Is there an established way for creating an instance of an Appointment through using its ID without creating a scheduler and looping through all of the appointments?
Veronica
Telerik team
 answered on 13 Apr 2010
1 answer
244 views
Hi,

After looking at the doc, I can't find all the hooks I need for a seemingly logical scenario: I have many RadComboBoxes on a page, and I need to load one or the other of them via client "onclick" events. For example, when a user clicks a checkbox, I need to load a related RadComboBox and also set the selected index to the first item loaded. I cant expect the user to check the checkbox and then also click on the RadComboBox to trigger it. Does anybody have an example or a tip how to do this? The easy part is the Ajax loading, the difficult part seems to be: fire and event to get the RadComboBox to start its ajax loading and also set the first item as selected in the ComboBox.

I have seen this post:
http://www.telerik.com/community/forums/aspnet-ajax/combobox/ajax-refresh-of-radcombobox.aspx

but aside from being very complex for a simple scenario (which I could live with), it doesn't work :-) No matter where I put the AjaxManager etc on my (non trivial) page, I get:
Please, see whether wrapping the code block, generating the exception, within RadCodeBlock resolves the error. ---> System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
eb.UI.ControlCollection.AddAt(Int32 index, Control child)....
Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
inner exception stack trace ---
Web.UI.RadAjaxControl.MoveUpdatePanel(Control initiator, Control updated)
...

It is wrapped, of course, just as in the example presented...


THANKS!
Richard
Veselin Vasilev
Telerik team
 answered on 13 Apr 2010
2 answers
111 views

Using RadGrid (asp.net 2.0) VS 2008, my grouped items are collapsed. I am grouping by multiple items, the initial view looks good, once I expand, I do not see the aggregate value. I have attached an image before and after expanding.

        <telerik:RadGrid ID="grid" runat="server" 
            DataSourceID="LinqDataSource1" AutoGenerateColumns="False"   
            AllowSorting="True" 
            GridLines="None" ShowGroupPanel="True" ShowFooter="true"   
            ongroupschanging="OnGroupChanged" Skin="WebBlue" 
             > 
            <ClientSettings AllowDragToGroup="true" AllowColumnsReorder="true"   
                ReorderColumnsOnClient="True"></ClientSettings> 
            <MasterTableView GroupsDefaultExpanded="false" ShowGroupFooter="true">  
                <Columns> 
                    <telerik:GridBoundColumn DataField="Participant" HeaderText="Participant"   
                        SortExpression="Participant" UniqueName="Participant">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="activityType" HeaderText="Activity Type"   
                        SortExpression="activityType" UniqueName="activityType">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Items" HeaderText="Items"  Groupable="false" 
                        SortExpression="Items" UniqueName="Items" Aggregate="sum" FooterText="Total: " FooterAggregateFormatString="Total: {0:###,###}">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="EntityType" HeaderText="Entity Type"   
                        SortExpression="EntityType" UniqueName="EntityType">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Entity" HeaderText="Entity"   
                        SortExpression="Entity" UniqueName="Entity">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="Region" HeaderText="Region"   
                        SortExpression="Region" UniqueName="Region">  
                    </telerik:GridBoundColumn> 
                </Columns> 
                <GroupByExpressions> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="Participant" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="Participant"  HeaderText="Participant" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="activityType" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="activityType"  HeaderText="Activity Type" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                    <telerik:GridGroupByExpression> 
                        <GroupByFields> 
                            <telerik:GridGroupByField fieldName="EntityType" /> 
                        </GroupByFields> 
                        <SelectFields> 
                            <telerik:GridGroupByField fieldName="EntityType"  HeaderText="Entity Type" /> 
                        </SelectFields> 
                    </telerik:GridGroupByExpression> 
                </GroupByExpressions> 
            </MasterTableView>        
                                
        </telerik:RadGrid> 
      
 
Eli Yaacoby
Top achievements
Rank 1
 answered on 13 Apr 2010
2 answers
163 views
How can i stay in insert mode after i created a new record?
i have seen a lot of solutions to close the insert window  but nothing to keep it open.

my code aspx:
<telerik:RadGrid  EnableViewState="true"   EnableEmbeddedSkins="False" Skin="ABCustom" OnItemDataBound="RadGrid2_ItemCommand" 
        runat="server" ID="productrelations"  OnNeedDataSource="datarelations" OnInsertCommand="RadGrid2_InsertCommand" 
        AutoGenerateColumns="false" AllowSorting="true"  > 
        <MasterTableView NoMasterRecordsText="Er zijn momenteel geen vergelijkbare producten geselecteerd" 
            CommandItemDisplay="Top" DataKeyNames="ProductBaseId"> 
            <Columns> 
                <telerik:GridBoundColumn UniqueName="ProductBaseId" HeaderText="ProductBaseId" DataField="ProductBaseId" 
                    SortExpression="ProductBaseId" Visible="false" ReadOnly="true" /> 
                <telerik:GridTemplateColumn UniqueName="RelatedProducts" AllowFiltering="false" HeaderText="Vergelijkbare producten" 
                    SortExpression="RelatedProductBaseId"> 
                    <ItemTemplate> 
                        <%# Eval("RelatedProductBase.Name")%> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <asp:DropDownList runat="server" ID="relatedCategory" OnSelectedIndexChanged="fillproduct" 
                            AutoPostBack="true" /> 
                        <asp:DropDownList runat="server" ID="relatedProduct" /> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
                <telerik:GridTemplateColumn AllowFiltering="false"  ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" HeaderText="Acties" UniqueName="Actions"> 
                    <ItemTemplate> 
                        <asp:ImageButton runat="server" ID="deleterelation" ImageUrl="~/Images/delete.png" 
                            OnCommand="relation_OnClick" CommandArgument='<%# Eval("RelatedProductBaseId") %>' ToolTip="Delete" 
                            OnClientClick="return confirm('Weet u zeker dat u de relatie met dit product wilt verwijderen?');" 
                            CausesValidation="false" /> 
                    </ItemTemplate> 
                </telerik:GridTemplateColumn> 
            </Columns> 
            <EditFormSettings EditColumn-ButtonType="ImageButton" EditColumn-InsertImageUrl="~/Images/SaveBtn.gif" 
                EditColumn-UpdateImageUrl="~/Images/SaveBtn.gif" EditColumn-CancelImageUrl="~/Images/CancelBtn.gif"> 
            </EditFormSettings> 
            <CommandItemSettings AddNewRecordText="Vergelijkbare producten toevoegen" AddNewRecordImageUrl="~/Images/AddRecord.gif" 
                RefreshText="Verversen" RefreshImageUrl="~/Images/Refresh.gif" /> 
        </MasterTableView> 
    </telerik:RadGrid> 

aspx.cs:
        protected void RadGrid2_ItemCommand(object source, Telerik.Web.UI.GridItemEventArgs e) 
        { 
            if ((e.Item is GridEditFormItem) && e.Item.IsInEditMode) 
            { 
                PrefetchPath prefetch = new PrefetchPath(EntityType.CategoryBaseEntity); 
                prefetch.Add(CategoryBaseEntity.PrefetchPathSubCategoryBase); 
                GridEditFormItem categorydopdown = (GridEditFormItem)e.Item; 
                DropDownList dropdownlistcategory = (DropDownList)categorydopdown.FindControl("relatedCategory"); 
 
                CategoryBaseCollection theCategoryColl = new CategoryBaseCollection(); 
                theCategoryColl.GetMulti(CategoryBaseFields.IsActive == true, prefetch); 
                dropdownlistcategory.Items.Add(new ListItem("- Selecteer een Category -", "0")); 
                foreach (CategoryBaseEntity category in theCategoryColl) 
                { 
                    dropdownlistcategory.Items.Add(new ListItem(category.Name, category.Id.ToString())); 
                    foreach (SubCategoryBaseEntity subCategory in category.SubCategoryBase) 
                    { 
                        dropdownlistcategory.Items.Add(new ListItem(".." + subCategory.Name, ".." + subCategory.Id.ToString())); 
                    } 
                } 
            } 
        } 
 
        protected void RadGrid2_InsertCommand(object source, GridCommandEventArgs e) 
        { 
            GridEditFormInsertItem insertitems = (GridEditFormInsertItem)e.Item; 
             
            ProductRelationBaseEntity newproduct = new ProductRelationBaseEntity(); 
             
            DropDownList deliverytime = (DropDownList)insertitems.FindControl("relatedProduct"); 
            newproduct.ProductBaseId = Url.QueryStringParser.GetInt("ProductId"); 
            newproduct.RelatedProductBaseId = int.Parse(deliverytime.SelectedValue); 
            newproduct.Save(); 
            productrelations.DataBind(); 
             
             
             
 
             
        } 
 
 
        protected void fillproduct(object sender, EventArgs e) 
        { 
 
            DropDownList dropdownlistcategory = (DropDownList)sender; 
            DropDownList dropdownlistprodudct = (DropDownList)dropdownlistcategory.Parent.FindControl("relatedProduct"); 
            ProductBaseCollection productcollection = new ProductBaseCollection(); 
 
 
            if (dropdownlistcategory.SelectedItem.Text.Substring(0, 2) == "..") 
            { 
                productcollection.GetMulti(ProductBaseFields.SubCategoryBaseId == int.Parse(dropdownlistcategory.SelectedValue.Substring(2, dropdownlistcategory.SelectedValue.Length - 2)) & ProductBaseFields.IsDeleted == false); 
            } 
            else 
            { 
                productcollection.GetMulti(ProductBaseFields.CategoryId == int.Parse(dropdownlistcategory.SelectedValue) & ProductBaseFields.IsDeleted == false); 
            } 
 
            dropdownlistprodudct.Items.Clear(); 
            dropdownlistprodudct.Items.Add(new ListItem("- Selecteer een product -", "0")); 
            foreach (ProductBaseEntity product in productcollection) 
            { 
                ProductRelationBaseEntity productrelation = new ProductRelationBaseEntity(Url.QueryStringParser.GetInt("ProductId"), product.Id); 
                if (productrelation.IsNew == true && Url.QueryStringParser.GetInt("ProductId") != product.Id) 
                    dropdownlistprodudct.Items.Add(new ListItem(product.Name, product.Id.ToString())); 
            } 
        } 
 
    protected void datarelations(object source, GridNeedDataSourceEventArgs e) 
        { 
            ProductRelationBaseCollection product = new ProductRelationBaseCollection(); 
            product.GetMulti(ProductRelationBaseFields.ProductBaseId == Url.QueryStringParser.GetInt("ProductId")); 
            productrelations.DataSource = product; 
        } 


Maarten Alleman
Top achievements
Rank 1
 answered on 13 Apr 2010
5 answers
200 views
I keep getting errors thrown when trying to use the RadFilter with a RadGrid

I'm binding the DS in Page_Load...

How should this be setup?


Rosen
Telerik team
 answered on 13 Apr 2010
1 answer
154 views

 

I place the RadFormDecorator1 see below.
I want no roundedcorners so EnableRoundedCorners="false"
But now the textboxes have no styling at all.
They look the same as if i have no styling at all.

What am i doing wrong?

<form id="Form1" method="post" runat="server">  
 
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
 
</telerik:RadScriptManager> 
 
<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" 
 
DecoratedControls="All" Skin="Office2007" EnableRoundedCorners="false" 
 
/> 
 
Georgi Tunev
Telerik team
 answered on 13 Apr 2010
7 answers
98 views
Hello,

The standard 'look and feel' for sortable grids at the organsiation at which I work, it to have the sort buttons always visible (even if that column is not sorted). When a column is sorted the appropriate image (i.e. asc or desc image) source would change to an active version.

I'm not here to argue whether or not its a good idea to to always display the sort buttons on every column. I am asking what would be the recommended approach to do what I am attempting.

Many thanks,
Ryan.
Yavor
Telerik team
 answered on 13 Apr 2010
1 answer
115 views
I'm sure there's a simple answer but I can't find it.  I'm trying to make the left margin of the radTreeView 5px via a CSS class.  Can't seem to overide using margin-left.  Any ideas?

Thanks in advance,
Everett
Veselin Vasilev
Telerik team
 answered on 13 Apr 2010
1 answer
136 views
c#

Hi,
I used the TextBoxTemplate which Nick provided.. in my code.. In my case, am creating the radcombo dynamically from code behind..  and adding the item template also dynamically from code behind. But its not displaying the values, Instead it creates text boxes with out any text.. And I want to set the the Initial value also like 'Select one'..  Its displaying "System.Data.DataRowView" in DropDown.. If I click it is displaying textboxes without text.. How can I solve this..

In designing  we can give like <asp:TextBox id="text1" runat="server" Text='<%=Eval("Name") %>' />.. Like that how to do for text box in template of rad combo in code behind c#

  class TextBoxTemplate : ITemplate  
    {  
        string ColName = "Text";  
 
        public void InstantiateIn(Control container)  
        {  
            TextBox textBox = new TextBox();  
            textBox.ID = "tabTextBox";  
            textBox.DataBinding += new EventHandler(this.txt_DataBind);  
            container.Controls.Add(textBox);  
        }  
        public void txt_DataBind(Object sender, EventArgs e)  
        {  
            TextBox txt = (TextBox)sender;  
            RadComboBoxItem radCombo = (RadComboBoxItem)txt.NamingContainer;  
                     txt.Text = DataBinder.Eval(radCombo, ColName).ToString();  
        }  
    }  
 
/*-------------- Dynamic creation of rad combo----------------*/  
 
 
   RadComboBox RadDropDownShopper = new RadComboBox();  
                        RadDropDownShopper.ID = "RadDropdownShopper" + i.ToString();  
                        RadDropDownShopper.Attributes.Add("style", "padding-top: 8px;");  
                        RadDropDownShopper.Attributes.Add("style", "padding-left: 30px;");  
                        RadDropDownShopper.ItemTemplate = new TextBoxTemplate();  
                        RadDropDownShopper.DataSource = FakeDataTable();  
                                           RadDropDownShopper.DataBind();  
("Select Shopper/Member"));  
 
                                              tdShopper.Controls.Add(RadDropDownShopper); 

Thanks in advance
Nimmi

Vesko
Top achievements
Rank 2
 answered on 13 Apr 2010
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?