Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
150 views
How do you prevent the RadMenu from displaying the submenu items as a drop down.

For example:

+ Home
+ Services
   - Coding
   - Web Design
   - SQL Server
+ Contact

I only want to display: Home | Services | Contact

Thanks!
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
25 answers
456 views
I'm trying to install Telerik ASP.NET 2011 Q1 and it's failing. 

First download installation log: http://dl.dropbox.com/u/1929707/Telerik.Web.UI_2011_1_315_Dev.msi.log
Second download installation log: http://dl.dropbox.com/u/1929707/Telerik.Web.UI_2011_1_315_Dev%20%281%29.msi.log

Thanks,
Daryl
Chavdar Dimitrov
Telerik team
 answered on 22 Aug 2012
1 answer
68 views
I can load a RadGrid in the main page using get_masterTableView().  However, If I have the grid in an ASCX page, what do I need to do to load that grid from the main ASPX page?  I can get a reference to the grid:
var myGrid = document.getElementById('<%= ((RadGrid)myControl.FindControl("RadGrid1")).ClientID %>')
but get_masterTableView() is not valid for myGrid.
Marin
Telerik team
 answered on 22 Aug 2012
3 answers
162 views
I have been adding validation to a RadGrid, whenever i try to add any Validation groups it causes the RequiredFieldValidator to not work at all

Is there any work around for this? I would like to have a summary of errors listed

<telerik:RadGrid ID="RadGrid2" runat="server" Width="100%"
                    AllowAutomaticInserts="True"
                    AllowAutomaticUpdates="True"
                    AllowPaging="True"
                    AllowMultiRowEdit="false"
                    AllowMultiRowSelection="false"
                    AutoGenerateColumns="False"
                    DataSourceID="SqlDataSource2"
                    EnableLinqExpressions="false"
                    GridLines="None"
                    OnItemCreated="RadGrid2_ItemCreated"
                    OnItemDataBound="RadGrid2_ItemDataBound"
                    OnItemUpdated="RadGrid2_ItemUpdated"
                    OnItemInserted="RadGrid2_ItemInserted"
                    OnDataBound="RadGrid2_DataBound"
                    OnItemCommand="RadGrid2_ItemCommand"
                    OnPreRender="RadGrid2_PreRender">
                    <PagerStyle Mode="NextPrevAndNumeric" />
                    <MasterTableView Width="100%" CommandItemDisplay="Bottom" EditMode="InPlace"
                        DataSourceID="SqlDataSource2" HorizontalAlign="NotSet" AutoGenerateColumns="false">
                        <Columns>
                            <telerik:GridBoundColumn DataField="ProductTypeId" HeaderText="ProductTypeId" SortExpression="ProductTypeId" UniqueName="ProductTypeId" Visible="false">
                            </telerik:GridBoundColumn>
 
                            <telerik:GridBoundColumn DataField="ProductAttributeDefKeyOri" HeaderText="ProductAttributeDefKeyOri" SortExpression="ProductAttributeDefKeyOri" UniqueName="ProductAttributeDefKeyOri" Visible="false">
                            </telerik:GridBoundColumn>
                             
                            <telerik:GridDropDownColumn ListTextField="Name" ListValueField="ProductAttributeDefKey" DataSourceID="SqlDataSource3" HeaderText="Attribute" DataField="ProductAttributeDefKey" UniqueName="ProductAttributeDefKey" DropDownControlType="DropDownList" EnableEmptyListItem="true" EmptyListItemText="Select an attribute..." EmptyListItemValue="">
                            </telerik:GridDropDownColumn>
 
                            <telerik:GridTemplateColumn DefaultInsertValue="1" DataField="SortOrder" HeaderText="Sort Order" SortExpression="SortOrder" UniqueName="SortOrder"  ForceExtractValue="Always" >
                                <EditItemTemplate>
                                    <telerik:RadNumericTextBox runat="server" ID="tbSortOrder" DbValue='<%# Bind("SortOrder") %>' ShowSpinButtons="true" SpinDownCssClass="" SpinUpCssClass="" Width="50px" MinValue="1" MaxValue="999" NumberFormat-DecimalDigits="0" CssClass="textbox_increment">
                                    </telerik:RadNumericTextBox>
                                    <asp:RequiredFieldValidator runat="server" ControlToValidate="tbSortOrder" ErrorMessage="*" ValidationGroup="grid2"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <%# Eval("SortOrder")%>
                                </ItemTemplate>
                                <ItemStyle CssClass="MyImageButton" />
                            </telerik:GridTemplateColumn>
 
                            <telerik:GridCheckBoxColumn DataField="Enabled" HeaderText="Enabled" SortExpression="Enabled" UniqueName="Enabled" DefaultInsertValue="Checked"  >
                            </telerik:GridCheckBoxColumn>
 
                            <telerik:GridCheckBoxColumn DataField="Required" HeaderText="Required" SortExpression="Required" UniqueName="Required" DefaultInsertValue="1">
                            </telerik:GridCheckBoxColumn>
 
                            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                                <ItemStyle CssClass="MyImageButton" />
                            </telerik:GridEditCommandColumn>
                        </Columns>
                        <EditFormSettings ColumnNumber="2" CaptionFormatString="Edit Attribute" InsertCaption="Add Attribute">
                            <FormTableItemStyle Wrap="true"></FormTableItemStyle>
                            <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                            <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="0" BackColor="White" Width="100%" />
                            <FormTableStyle CellSpacing="0" CellPadding="1" BackColor="White" />
                            <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                            <PopUpSettings Modal="true" />
                            <EditColumn ButtonType="ImageButton" InsertText="Add Attribute" UpdateText="Update Attribute" UniqueName="EditCommandColumn1" CancelText="Cancel Edit"></EditColumn>
                            <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                        </EditFormSettings>
                        <CommandItemSettings AddNewRecordText="Add Attribute" />
                    </MasterTableView>
                </telerik:RadGrid>

protected void RadGrid2_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                //attribute validation
                GridEditableItem item = e.Item as GridEditableItem;
                DropDownList dropDownList1 = item["ProductAttributeDefKey"].Controls[0] as DropDownList;
                GridDropDownColumnEditor editor = (GridDropDownColumnEditor)item.EditManager.GetColumnEditor("ProductAttributeDefKey");
                TableCell cell = (TableCell)editor.ContainerControl;
 
                RequiredFieldValidator validator = new RequiredFieldValidator();
                validator.ControlToValidate = dropDownList1.ID;
                validator.ErrorMessage = "*";
                validator.ValidationGroup = "grid2";
                cell.Controls.Add(validator);
            }
             
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                if (e.Item.OwnerTableView.IsItemInserted)
                {
                    //set required and enabled default values for inserting
                    GridEditableItem edititem = (GridEditableItem)e.Item;
                    CheckBox chkbx = (CheckBox)edititem["Enabled"].Controls[0];
                    chkbx.Checked = true;
                    chkbx = (CheckBox)edititem["Required"].Controls[0];
                    chkbx.Checked = true;
                }
            }
        }

Marin
Telerik team
 answered on 22 Aug 2012
1 answer
67 views
Hi, I was searching for the telerik radtextbox in my asp.net project and I can't find the control. Am I able to use this control in my web project? If so, could you tell me how I would get that dll into my project so I can start using the control?

Thanks,
Ben
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
3 answers
84 views
I had several issues when I converted my classic radcontrols Q3 2008 to asp.net ajax Q1 2012. I had updated as well the framework from .Net 2.0 to .Net 4.0 and using Visual Studio 2010 from VS2k5. Now only button works well with RadAjaxManager. All my asp Dropdown, Checkbox, Radiobutton etc dont fire postback anymore and no longer works with RadAjaxManager. Any reason why this happen? Any workaround?
Cat Cheshire
Top achievements
Rank 1
 answered on 22 Aug 2012
1 answer
66 views
When I drag a file over the upload text, it will show a section with text "Drop files here". Is there a way to customize the section style such as backgroud-color, padding-top, padding-left?
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
4 answers
428 views
Hi,

I am using asp.net 2.0.

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
        If e.CommandName = "RowClick" Then
            Dim item As GridDataItem = e.Item
            selUserid = item("UserId").Text
            TxtName.Text = item("Name").Text
            TxtUserName.Text = item("UserName").Text
            TxtEmail.Text = item("Email").Text
            TxtPassword.Text = item("Password").Text 
            TxtPhone.Text = item("UserPhone").Text
            cmbCity.Text = item("PosId").Text
        End If
    End Sub


The password textbox is in password mode, but by clicking on grid all the textboxes are filled with values except password textbox.

Can any body help me out.

Thanks in advance
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
1 answer
166 views
I'm binding a RadGrid to a BindingList, when I edit a Template column with a dropDown I'm trying  it to keep the previously selected value

here is a sample of my code:

<telerik:GridTemplateColumn HeaderText="Contributor" UniqueName="Contributor" DataField="Contrib">
    <EditItemTemplate>
        <asp:DropDownList ID="ddContributor" runat="server" DataSourceID="ldsContibutors"
        DataTextField="ContributorName" DataValueField="ContributorID" AppendDataBoundItems="True"
        SelectedValue='<%# Eval("Contrib.ContributorID") %>'>
            <asp:ListItem>Select a value</asp:ListItem>
        </asp:DropDownList>
    </EditItemTemplate>
    <ItemTemplate>
        <%# Eval("Contrib.ContributorName") %>
    </ItemTemplate>


eval works fine but bind throws an exception: DataBinding: 'Telerik.Web.UI.GridInsertionObject' does not contain a property with the name 'Contrib'.


I also tried in cs but I cannot find the value in the item["Contributor"].Text 
then I tried witha a label in the Item template,  ((Label)item["Contributor"].findControl("labelID")).Text but it's always ""
any help will be apreciated thanks!
Princy
Top achievements
Rank 2
 answered on 22 Aug 2012
1 answer
143 views
I have this code in the Pre Render event in one of my RadGrids.............



 For Each item As GridDataItem In Radgrid_AddRemoveProvider.MasterTableView.Items
            Dim lblPID As Label = DirectCast(item.FindControl("lblPID"), Label)

            Dim btnAddProvider As LinkButton = DirectCast(item.FindControl("btnAddProvider"), LinkButton)
            Dim btnRemoveProvider As LinkButton = DirectCast(item.FindControl("btnRemoveProvider"), LinkButton)
            Dim lblFullName As Label = DirectCast(item.FindControl("lblFullName"), Label)
            Dim btnFullName As LinkButton = DirectCast(item.FindControl("btnFullName"), LinkButton)
            '  Dim lblContactType As Label = DirectCast(item.FindControl("lblContactType"), Label)
            ' Dim ddPreferredContact As DropDownList = DirectCast(item.FindControl("ddPreferredContact"), DropDownList)

            If lblPID.Text = Nothing Then
                btnAddProvider.Visible = True
                'ddPreferredContact.Visible = True
                'lblContactType.Visible = False
                btnRemoveProvider.Visible = False
                lblFullName.Visible = True
                btnFullName.Visible = False
            ElseIf lblPID.Text <> Nothing Then
                btnAddProvider.Visible = False
                'ddPreferredContact.Visible = False
                'lblContactType.Visible = True
                btnRemoveProvider.Visible = True
                lblFullName.Visible = False
                btnFullName.Visible = True
            End If

Next



However it loops through this code 100 times looping through each item in my RadGrid.  The problem is that it goes through this loop every time I perform any sort of event on the page.  Is there anyway I can tell it to stop looping through this code when i am not working with this RadGrid on the page.  I tried putting the code in the ItemCreated event, but it does the same thing. Overall I believe this is effecting the performance and speed of my page. 
Shinu
Top achievements
Rank 2
 answered on 22 Aug 2012
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?