Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
1.3K+ 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
150 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
305 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
139 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
212 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
207 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
189 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
66 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
9 answers
136 views
Hello.  We've been using RadEditor Lite on our WSS 3.0 site for 2 years now.  It's been working great so far.  We're on the latest version (4.5.6).

Few days ago, we noticed that in FireFox 6, editing rich-text fields (and Wiki pages) in SharePoint does not fire up RadEditor any more.  The rich-text content is only editable in HTML code, same as would be the case if RadEditor Lite were not installed at all.  The same rich-text content works fine in Chrome, Safari, and IE, but not on FireFox 6.  Strangely, it works fine in FireFox 5 and lower versions, which but not FireFox 6.

Seeing how rapidly FireFox gets updated nowadays, maybe the problem will go away with the next FF update... But I thought I'd mention this here anyways, and see if there is POSSIBLY a quick fix of any kind.

Thanks!
Taylor
Top achievements
Rank 1
 answered on 10 Nov 2011
15 answers
311 views
In my project, for localization, I need to Rresponse.Redirect the page itself.
Once redirect the page, it will read one given XML file and generate TreeNode dynamicly through the querystring "locale".
But after redirect several times, the whole TreeView cannot be operated no longer although its nodes have displayed in browser.
This problem will occur in IE and Chrome. Firefox and Opera are good.
Plamen
Telerik team
 answered on 10 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?