Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
217 views
I used the Combobox/Template example to build a RadComboBox with a RadTreeView as an ItemTemplate, but instead of a SqlDataSource I bound the tree in C# using a List<object>. The same tree works fine when it is by itself and shows all the data correctly, but when it is inside of the Item it is BLANK - the drop down is empty.

this is my front end code:
<telerik:RadComboBox
    ID="rcbDrawing"
    Width="205px"
    Height="300px"
    AllowCustomText="true"
    EmptyMessage="Select A Drawing"
    runat="server"
    Skin="Outlook"
    >
    <ItemTemplate>
        <div onclick="StopPropagation(event)">
            <telerik:RadTreeView
                ID="treeDrawings"
                runat="server"
                DataTextField="Name"
                DataValueField="ID"
                DataFieldID="ID"
                DataFieldParentID="ParentID"
                Skin="Outlook"
                OnClientNodeClicking="OnTreeNodeClicking"
                ></telerik:RadTreeView>
        </div>
    </ItemTemplate>
    <Items>
        <telerik:RadComboBoxItem />
    </Items>
</telerik:RadComboBox>


This is how I do the binding:
RadTreeView treeDrawings = (RadTreeView)rcbDrawing.Items[0].FindControl("treeDrawings");
DrawingsCollection d = DrawingsCollection.GetByClientID(PageUser);
treeDrawings.DataSource = d;
treeDrawings.DataBind();
treeDrawings.ExpandAllNodes();

Am I doing anything wrong?
Ivan Zhekov
Telerik team
 answered on 20 Feb 2013
1 answer
199 views
Hi,
I created a  skin for telerik controls by using http://stylebuilder.telerik.com/ and downloaded as zip file. then convert it as dll by using  a toll got from http://www.telerik.com/community/forums/aspnet-ajax/style-builder/tool-for-embedding-custom-skins-into-an-assembly.aspx , TELERIK ADMIN POST SECTION(First Post).  The converted dll referenced to my project. In my page, using skin chooser (including your default skins and my custom skin)and change the skin at run time.  But when i choosing my custom skin it show the below error message.


Telerik.Web.UI.RadFormDecorator with ID='RadFormDecorator1' was unable to find an embedded skin with the name 'TelerikSkins'. 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. 


I can' t set  

EnableEmbeddedSkins=false.Because i need to set any skin from the skin chooser at run time.



What i do?.
Princy
Top achievements
Rank 2
 answered on 20 Feb 2013
2 answers
122 views
<telerik:RadGrid ID="RadGridQuotes" runat="server" OnNeedDataSource="RadGridQuotes_NeedDataSource"
    PageSize="15" EnableAjax="True" OnItemDataBound ="RadGridQuotes_ItemDataBound" >
    <MasterTableView ShowFooter="true" DataKeyNames="ID">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" HeaderText="ID" DataType="System.Int32" ItemStyle-Width="50" HeaderStyle-Width="50" />
            <telerik:GridBoundColumn DataField="Views" HeaderText="Views" DataType="System.Int32" ItemStyle-Width="40" HeaderStyle-Width="40" />
            <telerik:GridBoundColumn DataField="ClientID" HeaderText="ClientID" DataType="System.Int32" ItemStyle-Width="50" HeaderStyle-Width="50"  />
            <telerik:GridBoundColumn DataField="Name" HeaderText="Name" DataType="System.String" ItemStyle-Width="200" HeaderStyle-Width="200"/>
            <telerik:GridBoundColumn DataField="EmailAddress" HeaderText="EmailAddress" DataType="System.String" />
            <telerik:GridBoundColumn DataField="Sex" HeaderText="Sex" DataType="System.String" ItemStyle-Width="40" HeaderStyle-Width="40"/>
            <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" DataType="System.String" />
            <telerik:GridBoundColumn DataField="Inserted" HeaderText="Inserted" DataType="System.DateTime" DataFormatString="{0:dd-MM-yyyy}" />
            <telerik:GridBoundColumn DataField="Type" HeaderText="Type" DataType="System.String"  ItemStyle-Width="70" HeaderStyle-Width="70" />
            <telerik:GridCheckBoxColumn DataField="IsTransfer" UniqueName="IsTransfer" HeaderText="IsTransfer" DataType="System.Boolean"  ItemStyle-Width="70" HeaderStyle-Width="70" />
            <telerik:GridCheckBoxColumn DataField="IsOther" HeaderText="IsOther" DataType="System.Boolean"  ItemStyle-Width="70" HeaderStyle-Width="70" />
            <telerik:GridTemplateColumn AllowFiltering="false" HeaderStyle-Width="120" UniqueName="DownloadQuoteButton">
                <ItemTemplate>
                    <asp:Button ID="ButtonOpen" runat="server" CausesValidation="false" OnClick="ButtonOpen_OnClick"
                        CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>' Text="Open Quote" />
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="NULL" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>


Now I want to disable (Visible = false) the asp-button like this;

if (column["IsTransfer"] == true && column["IsOther]" == true)
{
ButtonOpen.Visible = false;
}

I don't see how to access the button and how I check these column cell-values
Pascal
Top achievements
Rank 1
 answered on 20 Feb 2013
5 answers
1.2K+ views

Hi ,

I would like to hide the column of the radgrid based on value selected from dropdown. Following is the code.
On selectedIndexChanged i am finding the column and hiding.
For the first time works fine. When i select other, column is getting hidden but when i selected any other option,
 hidden column is not coming up even though i have made visible is true.

Do i need to do any other things.
Can u help me on this . ???

Regards,
Akki


<telerik:GridTemplateColumn UniqueName="group">
                            <HeaderTemplate>
                                <span class="errCopy">*</span>
                                <asp:Label ID="lblGrp" runat="server" Text="Group"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlGrp" runat="server" Width="100%" CssClass="textCopy"
                                AutoPostBack="true" OnSelectedIndexChanged="ddlGrp_SelectedIndexChanged">
                                </asp:DropDownList>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn UniqueName="description">
                            <HeaderTemplate>
                                <asp:Label ID="lblDesc" runat="server" Text="Description,if Group"></asp:Label>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:TextBox ID="txtBxDesc" runat="server" Width="100%" CssClass="textCopy"
                                    MaxLength="100">
                                </asp:TextBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>



protected void ddlGrp_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList ddlSender = (DropDownList)sender;
            GridDataItem editForm = (GridDataItem)ddlSender.NamingContainer;
            DropDownList ddlAudGrp = (DropDownList)editForm.FindControl("ddlGrp");
            string abc = ddlAudGrp.SelectedItem.Text;
            if (abc == "Other")
            {
                rdGrp.MasterTableView.GetColumnSafe("group").Visible = true;
            }
            else
            {
                rdGrdAudienceGrp.MasterTableView.GetColumnSafe("group").Visible = false;
            }

             
        }

Akki
Top achievements
Rank 1
 answered on 20 Feb 2013
2 answers
168 views
I am creating my RadGrid programmatically in the Page_Init. During the process I am creating a GridTemplateColumn that will be used as a CheckBox. I am doing this to convert my database value to a boolean. I have also added an attribute to the checkbox so that when they click the checkbox I want to run some javascript. In that javascript I would like to gather some of the values in the other cells on the row of the checkbox I just clicked in. So say I have 5 columns in my grid, the third column has checkboxes and there are a total of 100 rows. When I click the checkbox of the the third row, I want to gather the values of all 5 columns for the row of the checkbox I clicked. I see a lot of Client-side scripting methods but unfortunately am new to the RadGrid. I did set the OnGridSelected to a javascript function to get the RadGrid object but that is as far as I know how to go. Please let me know.

RadGrid1.ClientSettings.ClientEvents.OnGridCreated =

 

"GetGridObject"

 

 

 

var RadGrid1;

 

 

 

function GetGridObject(sender, eventArgs)

 

{

RadGrid1 = sender;

}

 

 

 

 

 

Public Class MyTemplate
    Implements ITemplate
    Protected textBox As TextBox
    Protected boolValue As CheckBox
    Private colname As String
    Public Sub New(ByVal cName As String)
        colname = cName
    End Sub
    Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn
        boolValue = New CheckBox()
        boolValue.ID = colname
        AddHandler boolValue.DataBinding, _
                   AddressOf boolValue_DataBinding
        boolValue.Enabled = True
        container.Controls.Add(boolValue)
    End Sub
    Sub boolValue_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
        Dim cBox As CheckBox = DirectCast(sender, CheckBox)
        Dim container As GridDataItem = DirectCast(cBox.NamingContainer, GridDataItem)
        If ((DirectCast(container.DataItem, DataRowView))(colname)) = 1 Or ((DirectCast(container.DataItem, DataRowView))(colname)) = True Then
            cBox.Checked = True
        Else
            cBox.Checked = False
        End If
        cBox.Attributes.Add("onClick", "Javascript:fnOpenGeoInfoView('')")
    End Sub
    Sub textBox_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
        Dim cTextBox As TextBox = DirectCast(sender, TextBox)
        Dim container As GridDataItem = DirectCast(cTextBox.NamingContainer, GridDataItem)
        cTextBox.Text = (DirectCast(container.DataItem, DataRowView))(colname).ToString()
    End Sub
End Class

Eyup
Telerik team
 answered on 20 Feb 2013
5 answers
677 views
I cannot seem to figure out how to do this. By default the editor is only occupying about 50% of the pane.

I have tried to follow the most recent example I could find of how to do this: http://www.telerik.com/community/forums/aspnet-ajax/editor/rad-editor-height-problem.aspx

But I am having problems when attempting to retrieve the pane height.

Here is my code for the javascript function:
function OnClientLoad(editor) {
                //sets the height of the radeditor to the height of the pane
                var paneHeight = $get("<%=paneBottom.ClientID %>").style.height;
                alert(paneHeight);
                editor.get_element().style.height = paneHeight;
            }

The alert window that pops up for the pane height has nothing in it.

And here is the pane with the radeditor inside of it:
<radspl:RadPane runat="server" ID="paneBottom" Scrolling="none" CssClass="RadEToolbar">
    <radE:RadEditor runat="server" ID="editor" Width="100%"  EnableDocking="false" Skin="Telerik"  ShowPreviewMode="false" CssFiles="~/Css/public_page.css" StripAbsoluteAnchorPaths="true" StripAbsoluteImagesPaths="true" AnchorPathToStrip="http://localhost:8080" ImagesPathToStrip="http://localhost:8080" ToolsFile="ToolsFile.xml" OnClientLoad="OnClientLoad"/>
</radspl:RadPane>



Rumen
Telerik team
 answered on 20 Feb 2013
1 answer
102 views
Does anyone know how to make the radtxtbox have the same appearance as the regular asp textbox? The regular one has more of a 3d appearance (I guess some dropped shadow stuff going on) where as the radtxtbox just looks flat.

Thanks,
Rut
Princy
Top achievements
Rank 2
 answered on 20 Feb 2013
2 answers
83 views
Dear Community,

We have been using Telerik ASP.NET AJAX controls version 2012.2.912.40. We met the issue with color picker inside image manager properties pane. It doesn't contain color palette, please see attached image.

The following configuration has been used:
            FileManagerDialogParameters imageManagerParameters = new FileManagerDialogParameters();
            imageManagerParameters.ViewPaths = BrowseMediaPaths;
            imageManagerParameters.UploadPaths = UploadMediaPaths;
            imageManagerParameters.DeletePaths = DeleteMediaPaths;
            imageManagerParameters.MaxUploadFileSize = Settings.MaxImageSize;
            DialogDefinition imageManager = new DialogDefinition(typeof(ImageManagerDialog), imageManagerParameters);
            imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/";
            imageManager.ClientCallbackFunction = "sd.insertImage";
            imageManager.Width = Unit.Pixel(694);
            imageManager.Height = Unit.Pixel(440);
            DialogOpener1.Window.Modal = true;
            DialogOpener1.UseClassicDialogs = false;
            DialogOpener1.Window.Title = StringResource.Picture;
            DialogOpener1.DialogDefinitions.Add("ImageManager", imageManager);
            DialogOpener1.Window.ReloadOnShow = true;

Thank you in advance for any information how to fix it.

Best regards,
Viktor Burdeinyi
Viktor
Top achievements
Rank 1
 answered on 20 Feb 2013
2 answers
109 views
Hello,
 I am using hierrachical grid.The hierarchical grid placed inside a radpanel .In radpanel there are two radpanes.inside grid radcombobox are there, autopostback is enabled in combobox.while radcombobox selected index changed am calling a dopostback in clientside.after that the grid is blinking and radpane is collapsed and expanded.but here am using update control and radajax settings also.can i avoid these changes
Andrey
Telerik team
 answered on 20 Feb 2013
3 answers
105 views
Hi,

I'm using rad combo box within the rad grid. The combo box is populated on the client and within the combo there's an "add new item" link.
When I insert new item, the item is inserted into the database via web service but the combo box doesn't update with the new item. I think if i'm able to some how invoke or call the combo_onload client event after I've inserted the new item that this would work. So my question is can I call the combo_onload client event from another method?

function OwnerComboBox_OnLoad(sender, eventArgs) {
 
             InvoiceWebService.GetItemsByCompanyId(sessionStorage.CompanyId, OnItemsComplete);
         }
         function OnItemsComplete(result) {
             for (var i = 0; i < result.length; i++) {
 
                 var item = new Telerik.Web.UI.RadComboBoxItem();
                 item.set_text(result[i].Items + "");
 
                 var grid = $find("ctl00_BodyContentPlaceHolder_grdInvoiceItems");
                 var masterTbl = grid.get_masterTableView();
                 var gridRow = masterTbl.get_dataItems()[0];
 
                 var comboBox = gridRow.findControl("ddlItems");
           
                 comboBox.get_items().add(item);
             }
         }
Thanks,
ron.
Hristo Valyavicharski
Telerik team
 answered on 20 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?