Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
111 views
Hello,
I want to set hover style all the time in the buttons of radtoolbar, because in normal style, the button is too much flat and it hasn't border, it seems a label instead of a button.
Can anybody help me?

Thanks in advance.
Kate
Telerik team
 answered on 22 Jun 2011
1 answer
324 views
Dear sirs

I have added 4 new resource types Task,Client,Infotype,Status
Im facing 2 problems
1. I could not access these controls from codebehind
below im given you a sample of finding <Task> the dd_combo return nothing the same happens if i try to find the other 4
resources <client,infotype,status>
2. I will like to know how can i handle advancedform validation for these 4 new resources when user press the save button, i have tried all javascript sample you provided in forums with no luck

CodeBehind
'=======================================================================================
Protected
Sub rs_FormCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerFormCreatedEventArgs) Handles rs.FormCreated

 

 

If ((e.Container.Mode = Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) _

 

 

OrElse (e.Container.Mode = Telerik.Web.UI.SchedulerFormMode.AdvancedInsert)) Then

 

 

 

 

 

 

Dim ddl_combo As radcombobox= DirectCast(e.Container.FindControl("task"), radcombobox)

 

 

 

 

 

 

End If

 

 

 

 

 

 

end Sub
'==========================================================================================

 

 

 


'===========================================================================================
<

 

telerik:RadScheduler runat="server" ID="rs" SelectedDate="2007/03/30"

 

 

TimeZoneOffset="03:00:00" StartEditingInAdvancedForm="true"

 

 

CustomAttributeNames="StatusID,Task"

 

 

StartInsertingInAdvancedForm="true" Width="100%" Height="500px"

 

 

DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"

 

 

DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID"

 

 

Culture="Greek (Greece)" EditFormDateFormat="dd/MM/yy" Skin="Office2007">

 

 

<AdvancedForm Modal="True" DateFormat="dd/MM/yy"/>

 

 

<AppointmentTemplate>

 

<%

# Eval("Subject")%>

 

 

 

</AppointmentTemplate>

 

 

 

<ResourceTypes>

 

 

<telerik:ResourceType KeyField="taskID" Name="Task" TextField="descr" ForeignKeyField="taskid"

 

 

DataSourceID="taskds" />

 

 

<telerik:ResourceType KeyField="ID" Name="Client" TextField="UserName" ForeignKeyField="UserID"

 

 

DataSourceID="usersds" />

 

 

<telerik:ResourceType KeyField="informID" Name="InfoType" TextField="descr" ForeignKeyField="informid"

 

 

DataSourceID="informds" />

 

 

<telerik:ResourceType KeyField="StatusID" Name="Status" TextField="descr" ForeignKeyField="StatusID"

 

 

DataSourceID="statusds" />

 

 

</ResourceTypes>

 

 

 

<TimeSlotContextMenuSettings EnableDefault="True" />

 

 

<AppointmentContextMenuSettings EnableDefault="True" />

 

 

</telerik:RadScheduler>
'===================================================================================

 

Plamen
Telerik team
 answered on 22 Jun 2011
2 answers
982 views
After submitting this request, I kept searching your knowledge base, forums, etc. and found a solution to my problem -- turning off the auto scroll setting.  What an idiot I am!

You may close this item now.  I'm a happy camper.  My apologies for mucking up the works with this one!

I have a RadGrid that I need to grow vertically with content.  If I do not set a height, it always defaults to 300px.  I have attached or included several items for you to review.  Using the IE Developer Tools, I have turned off the default 300px height setting and the grid behaves exactly the way I want it to.

First the definition of the grid:
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false" EnableEmbeddedSkins="true" Skin="Default" ShowHeader="false"
     AllowPaging="True" PageSize="5" GridLines="Horizontal" >
    <PagerStyle Mode="NextPrevAndNumeric" />
    <MasterTableView >
        <Columns>
            <telerik:GridTemplateColumn UniqueName="TemplateColumn1" >
                <ItemTemplate>
                    <table width="155px">
                        <tr>
                            <td >
                                <asp:Image ID="Image1" Style="float: left;" Width="150px" Height="100px" ImageUrl='<%# Eval("PicturePath")%>'
                                    BorderWidth="1px" runat="server" AlternateText="Stock Image" />
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn UniqueName="TemplateColumn2" >
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <div>
                                    <ul>
                                        <li>
                                            <label><b>Address: </b></label><%# Eval("ListingStreetAddress")%>
                                        </li>
                                        <li>
                                            <label><b>Beds: </b></label><%# Eval("Bedrooms")%>
                                        </li>
                                        <li>
                                            <label><b>Baths: </b></label><%# Eval("Bathrooms")%>
                                        </li>
                                        <li>
                                            <label><b>Price: </b></label><%# Eval("ListingPrice", "{0:##,##0.00}")%>
                                        </li>
 
                                        <li>
                                            <label><b>City: </b></label><%# Eval("CityName")%>
                                        </li>
                                        <li>
                                            <label><b>State: </b></label><%# Eval("StateName")%>
                                        </li>
                                        <li>
                                            <label><b>Country: </b></label><%# Eval("CountryName")%>
                                        </li>
 
 
                                    </ul>
                                </div>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn UniqueName="Lat1" DataField="Lat1" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="Long1" DataField="Long1" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="TblName" DataField="TblName" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ListingStreetAddress" DataField="ListingStreetAddress" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="CityName" DataField="CityName" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="StateName" DataField="StateName" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="CountryName" DataField="CountryName" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ListingPlannedCommName" DataField="ListingPlannedCommName" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ListingSubdivision" DataField="ListingSubdivision" Visible="false"></telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="ListingZipPostalCode" DataField="ListingZipPostalCode" Visible="false"></telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="false">
        <Scrolling AllowScroll="true" UseStaticHeaders="false" />
    </ClientSettings>
</telerik:RadGrid>


Attachments:
(1) I have attached a screen capture of the grid as it displays with default settings as grid_height_issue_1.png .

(2) I have attached a screen capture of the IE Developer Tools window where I have disabled the default height setting as grid_height_issue_2.png .

(3) I have attached a screen capture of the grid as it displays after disabling the default height setting as grid_height_issue_3.png.

Your help in the best manner of turning off this 300px height setting would be most appreciated.

Thanks!

Lynn
Iana Tsolova
Telerik team
 answered on 22 Jun 2011
2 answers
177 views

For some reason I am having a problem with a Radgrid's  Context Menu when only some of the groups are expanded in a radgrid. 

The Grid is grouped using an expression. And when all groups are expanded a right click fires the Context Menu.

However if any of the groups are collapsed the event does not fire and the normal browser right click menu appears. If I then expand the collapsed item the context menu re appears on right click. 

Any ideas?

Cheers

Tox
Iana Tsolova
Telerik team
 answered on 22 Jun 2011
4 answers
123 views
<%@ Control Language="VB" AutoEventWireup="true" CodeFile="SegmentationCreator.ascx.vb" Debug="true"
    Inherits="Controls_SegmentationCreator" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
    <telerik:RadFilter ID="RadFilter1" runat="server"
        CssClass="RadFilter RadFilter_Default" ExpressionPreviewPosition="Bottom" ShowApplyButton="false" AllowFilterOnBlur="true">
        <FieldEditors>
            <telerik:RadFilterTextFieldEditor DisplayName="text1" FieldName="textfield" TextBoxWidth="120" />
            <telerik:RadFilterNumericFieldEditor DisplayName="number1" FieldName="numberField" />
            <telerik:RadFilterBooleanFieldEditor DataType="System.Boolean" DisplayName="check1" FieldName="bitField" />
            <telerik:RadFilterDateFieldEditor DataType="System.DateTime" DisplayName="date1" FieldName="dateField" />
        </FieldEditors>
    </telerik:RadFilter>
    <ul>
    <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="sqlData1">
        <ItemTemplate>
        <li><%# Eval("text1")%></li>
        </ItemTemplate>
    </telerik:RadListView>
    </ul>
    <asp:SqlDataSource ID="sqlData1" runat="server" ConnectionString="<%$ ConnectionStrings:FEI%>" SelectCommand="SELECT TOP 10 Email.email as text1, 1 as number1, 0 as check1, GETDATE() as date1 FROM Email">
    </asp:SqlDataSource>
    <asp:HiddenField id="hiddenQueryText" runat="server" />
</telerik:RadAjaxPanel>
Every time I click on add field or anything it just reverts to the first-time load state.  There is nothing in the code-behind file.  The only other odd thing is that If I add the RadScriptManager to the the ascx, the page gives an error that "Only one instance of a ScriptManager can be added to the page."  This control above is being added to the page using Page.LoadControl("path/nameof.ascx") so I don't really have control over that part.
Iana Tsolova
Telerik team
 answered on 22 Jun 2011
3 answers
161 views
hi
captcha control is not showing radtooltip and also focus does not goes the capctha textbox but to the chage image link?
Slav
Telerik team
 answered on 22 Jun 2011
3 answers
182 views
Hi to all,

Friends i need to do maintain templates for Rad Editor.
I upload 4 different types of Templates (.html,.css)

ex:
 "Temp1.html" have its own CSS
 "Temp2.html" have its own CSS
 "Temp3.html" have its own CSS

If i Choose  "Temp1.html"  display its template design
if i choose another one display its template design.

and if i get the content from rad editor. with template design

any one help.....

Thanks

Vinoth Xavier 
Rumen
Telerik team
 answered on 22 Jun 2011
4 answers
189 views
Hello Everyone,

We are using radcaptcha for validating purpose. I have come across a weird problem with audio link button of captcha control. 

Audio link button working fine on IE and firefox, but we are not able to play the ImageText multiple time on chrome. It works for the first click, but if we click multiple times on audio link button, its not playing Image Text.

I  might need to enable some property for captcha control that i am not aware of.  

Does any one have any suggestions??


<telerik:RadCaptcha ID="radCaptcha" Runat="server" EnableRefreshImage="true" CaptchaImage-EnableCaptchaAudio="true" CaptchaImage-UseAudioFiles="true" ErrorMessage="You have entered an invalid code." ValidationGroup="Summary"  forecolor="#660000" Display="Dynamic" CaptchaLinkButtonText="Generate New Image<br/>" EnableEmbeddedScripts="True" EnableViewState="True" CaptchaImage-AudioFilesPath="~/App_Data/RadCaptcha" ImageStorageLocation="Cache" ViewStateMode="Enabled">
                    </telerik:RadCaptcha>
Pero
Telerik team
 answered on 22 Jun 2011
2 answers
203 views
Hello,

I'm using RadGrid Q1 2011 (2011.1.519.40) with several bound columns and then dynamically added check box columns that I add at run time and set in RadGrid1_ItemCreated on bind.  These are templated columns with checkbox headers and the columns using the typical:

GridTemplateColumn templateColumn = new GridTemplateColumn();
templateColumn.HeaderTemplate = new MyHeaderTemplate(sHeader, i);
templateColumn.HeaderText = sHeader;
templateColumn.ItemTemplate = new MyCheckboxTemplate(sHeader, i);
this.RadGrid1.Columns.Add(templateColumn);
 inside of a loop.  The classes are typical InstantiateIn classes only the header has a label with a date.  The checkbox template is just that, a checkbox in every column of every row.  

For reference:
public MyCheckboxTemplate(string cName, int j)
{
    colname = cName;
    index = j;
}
public void InstantiateIn(System.Web.UI.Control container)
{
    CheckBox cb = new CheckBox();
    cb.ID = colname + "_" + index;
    cb.Visible = true;
    cb.Enabled = true;
    container.Controls.Add(cb);
}

MyHeaderTemplate :
public MyHeaderTemplate(string cName, int j)
{
   colname = cName;
   index = j;
}
public void InstantiateIn(System.Web.UI.Control container)
{
 
    Label lblHeader = new Label();
    lblHeader.ID = colname;
    lblHeader.Text = colname;
    CheckBox cb = new CheckBox();
    cb.Attributes.Add("onClick", "CheckAll(event);");
    cb.ID = colname + "_" + index;
    cb.Visible = true;
    cb.Enabled = true;
    container.Controls.Add(cb);
    container.Controls.Add(lblHeader);
 
}

I've been banging my head trying to create a straight forward CheckAll client side javascript that will detect which header was clicked and check all the checkboxes in that column if they aren't checked and vice versa.  I've found many examples of how to do this with static columns but can't quite seem to get the JS correct for dynamic columns.  There could be anywhere between 1-180.

Thanks in advance for any help!


Genti
Telerik team
 answered on 22 Jun 2011
1 answer
127 views
I have set up a treeview / grid combo and I am trying to set a folder icon for each node. Basically I am aiming for the Outlook 2010 look, but just can't recreate it even with the example.

My folders appear underneath the +/- symbols and the tree structure goes crazy and is no longer neatly nested but more like stepped.

What have I done wrong?

Thanks


<telerik:RadSplitter ID="rdSplitter" runat="server" Height="800px"
    Width="623px" BorderSize="1" BorderStyle="None" Skin="Windows7">
    <telerik:RadPane ID="rdTreeViewPane" runat="server" Height="500px" Width="295px">
        <telerik:RadTreeView ID="rdTreeView" Runat="server"
            onnodeclick="rdTreeView_NodeClick" Width="100%" Height="100%" Skin="Windows7">
        </telerik:RadTreeView>
    </telerik:RadPane>
 
    <telerik:RadSplitBar ID="RadSplitBar1" runat="server" />
 
    <telerik:RadPane ID="rdGridViewPane" runat="server" Width="330px">
        <telerik:RadGrid ID="rdViewDocuments" runat="server" GridLines="None"
            Width="99.5%" AllowPaging="True" Skin="Windows7" PageSize="20">
            <MasterTableView AutoGenerateColumns="False" DataKeyNames="DocumentID">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridImageColumn DataImageUrlFields="FileType" DataImageUrlFormatString="~/images/icons/{0}.png"
                        ImageHeight="12px" ImageWidth="12px" UniqueName="column6" AllowFiltering="False"
                        AllowSorting="False" DataAlternateTextField="FileType">
                        <ItemStyle Width="22px" Height="22px" VerticalAlign="Middle" HorizontalAlign="Center" />
                    </telerik:GridImageColumn>
 
                    <telerik:GridTemplateColumn DataField="Title" HeaderText="Title" UniqueName="column3">
                        <ItemTemplate>
                            <asp:HyperLink runat="server" ID="DownloadLink" NavigateUrl='<%# DataBinder.Eval(Container, "DataItem.FilePath", "{0}") %>'
                                Text='<%# DataBinder.Eval(Container, "DataItem.Title") %>' Target="_blank"></asp:HyperLink>
 
                            <telerik:RadToolTip ID="rdTitleToolTip" runat="server" TargetControlID="DownloadLink"
                                Width="200" RelativeTo="Element" Position="MiddleLeft">
                                <strong>
                                    <%# DataBinder.Eval(Container, "DataItem.Title") %></strong><br />
                                <%# DataBinder.Eval(Container, "DataItem.Summary")%>
                            </telerik:RadToolTip>
                        </ItemTemplate>
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Left" />
                    </telerik:GridTemplateColumn>
 
                    <telerik:GridBoundColumn DataField="FileSize" HeaderText="Size" UniqueName="column4"
                        AllowFiltering="False" AllowSorting="False">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" />
                    </telerik:GridBoundColumn>
 
                    <telerik:GridDateTimeColumn DataField="LastUpdated" DataFormatString="{0:dd/MM/yyyy}"
                        HeaderText="Last Updated" UniqueName="column5" AllowFiltering="False">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" />
                    </telerik:GridDateTimeColumn>
                </Columns>
            </MasterTableView>
            <PagerStyle AlwaysVisible="True" Mode="NumericPages" />
            <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>
        </telerik:RadGrid>
    </telerik:RadPane>
</telerik:RadSplitter>



string imageURL = "images/icons/mailfolder.gif";

private void GetTree()
{
    PDUser U = PDUser.GetCurrentUser();
    List<Folder> FolderList = Folder.GetFolders(U.SchemeID, 0, 0);
 
    foreach (Folder F in FolderList)
    {
        //Create parent
        RadTreeNode NewNode = new RadTreeNode();
        NewNode.ImageUrl = imageURL;
        NewNode.Text = F.FolderName + "<span style='font-style:italic; font-size:10px;'> (" + F.DocumentCount.ToString() + " files)</span>";
        NewNode.ToolTip = F.FolderName;
        NewNode.Value = F.FolderID.ToString();
 
        //Create children
        GetChild(U.SchemeID, U.UserID, F.FolderID, ref NewNode);
 
        rdTreeView.Nodes.Add(NewNode);
    }
}
 
private void GetChild(int SchemeID, int UserID, int FolderID, ref RadTreeNode NewNode)
{
    List<Folder> FolderList = Folder.GetFolders(SchemeID, 0, FolderID);
    foreach (Folder F in FolderList)
    {
        RadTreeNode ChildNode = new RadTreeNode(F.FolderName);
        GetChild(SchemeID, UserID, F.FolderID, ref ChildNode);
        ChildNode.ImageUrl = imageURL;
        ChildNode.Text = F.FolderName + "<span style='font-style:italic; font-size:10px;'> (" + F.DocumentCount.ToString() + " files)</span>";
        ChildNode.ToolTip = F.FolderName;
        ChildNode.Value = F.FolderID.ToString();
        NewNode.Nodes.Add(ChildNode);
    }
}
 
//Populate GridView with available documents
protected void rdTreeView_NodeClick(object sender, RadTreeNodeEventArgs e)
{
    PDUser U = PDUser.GetCurrentUser();
 
    string folderStr = e.Node.Value;
    int folderID = Convert.ToInt32(folderStr);
    List<Document> DocumentList = Document.GetDocuments(U.UserID, folderID);
 
    rdViewDocuments.DataSource = DocumentList;
    rdViewDocuments.DataBind();
    rdViewDocuments.Visible = true;
}

Kate
Telerik team
 answered on 22 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?