Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
338 views
Hi there,

I am trying to create an editor programmatically.

A part of my code is :

RadEditor _editor = new RadEditor();
/*Document Manager*/
string documentsPath = "Library/Documents/";           
_editor.DocumentManager.UploadPaths = new string[] { documentsPath };
_editor.DocumentManager.ViewPaths = new string[] { documentsPath };
_editor.DocumentManager.DeletePaths = new string[] { documentsPath };
_editor.DocumentManager.SearchPatterns = new string[] { "*.doc,*.txt,*.docx,*.xls,*.xlsx,*.pdf,*.jpg,*.jpeg,*.eps" };
_editor.DocumentManager.MaxUploadFileSize = 104857600;

It is reading the new extensions allowed, but is neither pulling in the old documents uploaded previously via Document Manager, nor is allowing me to upload any other document. I have attached the screen shots. 

Please help!
Somya
Top achievements
Rank 1
 answered on 11 Nov 2011
5 answers
159 views
After checking the demos i have designed a hierarchy with etailtables.I have a textbox in edititemtemplate of detailtable.How can i access the datakeyvalue and show in this textbox in edit mode?
Shinu
Top achievements
Rank 2
 answered on 11 Nov 2011
8 answers
1.4K+ views
Hello,

1. I want to trigger an onclick method in the c# code-behind when the AccountNumber is clicked. I cannot find an attribute or such an event to trigger an onclick method.

<telerik:GridHyperLinkColumn DataNavigateUrlFields="ID"
    DataNavigateUrlFormatString="Page.aspx?id={0}" DataTextField="AccountNumber"
    HeaderText="Account Number" UniqueName="AccountNumber">


Thanks
Mike McMillan
Top achievements
Rank 1
 answered on 11 Nov 2011
4 answers
169 views
Is it possible to capture the aggregates event that comes from the Radgrid AJAX headercontextaggregatesmenu? I can capture the item click for everything except the aggregates.  The custom aggregate function is also picked up fine.   There is no indication of any specific additional code that I need to capture the aggregates item click event in any of the telerik demos or documentation.

Thanks in advance for your help.
Chad
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
324 views
I have a customized gridtemplatecolumn.  I have an HTML table in the gridtemplatecolumn.  I would like the table to fill the entire grid cell so that the lines touch the lining of the grid cell.  Please see screenshot to see what it currently looks like.  The "Open Items by Age" column contains the table.  I am also attaching the aspx code.  Thanks in advance.

          <telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowRowResize="True" AllowSorting="True" AutoGenerateColumns="False"
                            GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="897px" Height="252px"
                            OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnExcelMLExportRowCreated="grdCurrentandPrior_ExcelMLExportRowCreated"
                            OnSortCommand="grdCurrentandPrior_SortCommand"> 
                            <exportsettings filename="OpenItemsCurrentInventory" ignorepaging="True" openinnewwindow="True"
                                exportonlydata="true" excel-format="ExcelML"> 
                            </exportsettings> 
                            <mastertableview commanditemdisplay="Bottom" allownaturalsort="false" usealldatafields="true"> 
                                <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
                                    ShowRefreshButton="false" /> 
                                <Columns> 
                                    <telerik:GridTemplateColumn DataField="Assignee" HeaderText="Assignee" UniqueName="Assignee"
                                        SortExpression="Assignee"> 
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="State" HeaderText="State" UniqueName="State"
                                        SortExpression="State" Visible="false"> 
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="JurisdictionCount" HeaderText="Jurisdictions"
                                        UniqueName="JurisdictionCount" SortExpression="JurisdictionCount"> 
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn>                  
             <telerik:GridTemplateColumn UniqueName="OpenItemsByAge" > 
        <HeaderTemplate> 
          <table id="Table1" cellspacing="0" cellpadding="0" width="100%" border="0" > 
            <tr> 
              <td colspan="3" align="center"> 
                <b>Open Items by Age</b> 
              </td> 
            </tr> 
           <tr> 
                                    <td align="center" style="width: 33%"> 
<asp:LinkButton CssClass="Button" ID="btnPrioOpen" Text="Prior" 
CommandName='Sort' CommandArgument='OpenItemsCountPrior' runat="server" /></td> 
                                    <td align="center" style="width: 33%"> 
<asp:LinkButton CssClass="Button" ID="btnLastMonth" Text="Last Month" 
CommandName='Sort' CommandArgument='OpenItemsCountLastMonth' runat="server" /></td> 
                                    <td align="center" style="width: 34%"> 
<asp:LinkButton CssClass="Button" ID="btnCurrentOpen" Text="Current" 
CommandName='Sort'  CommandArgument='OpenItemsCountCurrent' runat="server" /></td> 
                                </tr> 
          </table> 
        </HeaderTemplate> 
        <ItemTemplate > 
          <table id="Table2" cellspacing="0" cellpadding="0" width="100%" border="0"  style="margin: 0px 0px 0px 0px;" > 
            <tr> 
              <td align="right" width="33%" style="border-bottom-color:White; border-left-color:White"> 
                <%# Eval("OpenItemsCountPrior", "{0:N0}") %> 
              </td> 
   <td align="right" width="33%" style="border-bottom-color:White"> 
                <%# Eval("OpenItemsCountLastMonth", "{0:N0}")%> 
              </td>               
              <td align="right" width="34%" style="border-bottom-color:White"> 
                <%#  Eval("OpenItemsCountCurrent", "{0:N0}") %> 
              </td> 
                         
            </tr> 
          </table> 
        </ItemTemplate> 
      </telerik:GridTemplateColumn> 
                        
                                    <telerik:GridTemplateColumn DataField="TotalRemainingItems" HeaderText="Items Left to Pay"
                                        UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems"> 
                                        <HeaderStyle Font-Bold="True" Width="95px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                        <telerik:GridTemplateColumn DataField="CompleteCount" HeaderText="Complete"
                                        UniqueName="CompleteCount" SortExpression="CompleteCount"> 
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblCompleteCount" runat="server" Text='<%# Eval("CompleteCount", "{0:N0}") %>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                                    <telerik:GridTemplateColumn DataField="PercentComplete" HeaderText="% Complete" UniqueName="clmPctComplete"
                                        SortExpression="PercentComplete"> 
                                        <HeaderStyle Font-Bold="True" Width="85px" HorizontalAlign="Center" Font-Names="Arial" /> 
                                        <ItemTemplate> 
                                            <asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:N2}%")%>'></asp:Label> 
                                        </ItemTemplate> 
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" /> 
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" /> 
                                    </telerik:GridTemplateColumn> 
                      
                                </Columns> 
                            </mastertableview> 
                            <headerstyle borderstyle="Solid" /> 
                            <clientsettings> 
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
                            </clientsettings> 
                        </telerik:RadGrid>

aks
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
159 views
Hi all:

I currently have the very basics set up with using the ComboBox that also allows users to select multiple items using a checkbox.  Code below:
<telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="myDS"
    DataTextField="fullname" DataValueField="id" oncopy="return false;" onpaste="return false;"
                    oncut="return false;" onkeypress="return tabOnly(event)" onmousewheel="return false"
                    OnClientDropDownOpening="OnClientDropDownOpening" OnClientDropDownClosing="OnClientDropDownClosing"
                    OnClientSelectedIndexChanging="OnClientSelectedIndexChanging" OnClientBlur="OnClientBlur"
                    Width="200px" AllowCustomText="True" ChangeTextOnKeyBoardNavigation="False">
                    <ItemTemplate>
                        <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("fullname") %>' Checked="true"/>
                    </ItemTemplate>
</telerik:RadComboBox>
As you can see, by default ALL of the checkboxes are checked.  Not what I want/need.  For the life of me I can't seem to figure out how to bind my data.  Below is the sqldatasource I'm using for this list, which pulls ALL options, which is what I want, but when a user edits information, I want the items that should be selected... selected.
<asp:SqlDataSource ID="myDS" runat="server"
    ConnectionString="<%$ ConnectionStrings:myconnection %>"
    SelectCommand="SELECT DISTINCT contacts.id, contacts.fullname FROM contacts ORDER BY fullname">
</asp:SqlDataSource>
The query that pulls the "selected" contacts should look like this:
SELECT id, areaID, contactID FROM area_contact_map WHERE areaID = 6 AND (blnRemoved IS NULL OR blnRemoved = 0)
I've been reverse engineering all of the demos here on the site, but I can't seem to get this.  Any further help would be greatly appreciated.

Thanks,
TL
Terri-Lynn
Top achievements
Rank 1
 answered on 10 Nov 2011
4 answers
227 views
Hi,
I'm using a RadTextBox like so :
HTML:
<div class="MyClass">
<telerik:RadTextBox ID="txtCloseDateWeeks" runat="server"/>
</div>

CSS:
.MyClass span input
    {width:200px !important;}

I need to use this css structure for other controls within my divs, including making the radComboBoxes the same size as the RadTextBoxes.

As you probably know, when the  RadTextBox is rendered, it appears in the HTML as :


<span class="RadInput RadInput_Outlook" id="ctl00_ctl00_txtCloseDateWeeks_wrapper" style="white-space: nowrap;">
    <input name="ctl00_ctl00_txtCloseDateWeeks_text" class="riTextBox riEnabled" id="ctl00_ctl00_txtCloseDateWeeks_text" style="width: 125px;" type="text" size="20" _events="[object Object]" value="1"/>
    <input name="ctl00$ctl00$txtCloseDateWeeks" title="" class="rdfd_" id="ctl00_ctl00_txtCloseDateWeeks" style="width: 1px; height: 1px; overflow: hidden; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: -18px; margin-right: 0px; margin-bottom: 0px; margin-left: -1px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; visibility: hidden;" type="text" control="[object Object]" value="1"/>
    <input name="ctl00_ctl00_txtCloseDateWeeks_ClientState" id="ctl00_ctl00_txtCloseDateWeeks_ClientState" type="hidden" autocomplete="off"/>


The 1st <Input> tag seems to be the control on the page which correctly has a width of 200px

The 2nd <Input> tag is where the problem lies. This is also 200px (because of the CSS) but even though 
 overflow: hidden; visibility: hidden;
it still renders on the page - I can't see it until I analyse with a HTML viewer, but it's being rendered to the right of the textbox and pushing my <div> out by another 200px which of course totally screws up the rest of the layout.

The 3rd <Input> tag doesn't show on the page and has a property type="hidden"  This might be why.

In the attached image - you can see the blue line of the 2nd <input> tag

Help me, please !!!!!!
Kevin
Top achievements
Rank 2
 answered on 10 Nov 2011
3 answers
251 views
Hi,

I'm trying to set the header date formatting for the MonthView to not have a leading zero.

When I make the format change for the "first day" like this MonthView-FirstDayHeaderDateFormat="MMM d", the values are formatted correctly as Feb 1.

However, when I make the following format change for the remaining day headers: MonthView-DayHeaderDateFormat="d", it doesn't format the values as I would have expected (eg. 2). It instead formats the day headers as 02/02/2010.

Is there something I'm doing wrong?

Thanks,
Greg
Neil
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
197 views
Hi,

I am wondering if you can provide globalization resourse file RadEditor.Dialogs.resx for Russian and Spanish languages. Standard installation of Telerik does not supply those cultures. Please advise.

Thanks! 
brian
Top achievements
Rank 1
 answered on 10 Nov 2011
2 answers
67 views
Hi all,

I'm having trouble with editor "past as text" functionality. After I click the "submit" button It does not paste any text when browsing with Internet Explorer IE9 (It works with Chrome). Other functionalities seems to work fine.

Any help would be appreciated. Thank you

Telerik.Web.UI.dll

Version
2009.1.527.35
Filipe
Top achievements
Rank 1
 answered on 10 Nov 2011
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?