Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
112 views
In order to replace all broken image links in my RagGrid, I'm using the following code in my ItemDataBound() event to add the "onError" attribute to my GridImageColumn. The code works great until a Grouping is performed on the RadGrid, which throws an exception of "Specified argument was out of the range of valid values.". Is there any workaround for this? I tried checking if Controls.Count > 0 but then the attribute is never added. 


void uxDirectoryGrid_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        //set the onError attribute to handle images which do not exist
        var imageColumnIndex = e.Item.OwnerTableView.Columns.FindByUniqueName("AccountName").OrderIndex;
        var imageCell = e.Item.Cells[imageColumnIndex];
        var image = imageCell.Controls[0] as Image; //<--- BOMBS OUT HERE: Specified argument was out of the range of valid values
 

 
        if (image != null)
        {
            image.Attributes["onError"] = "this.src='EmployeePhotos/404.jpg'";
        }
    }
}
Debora
Top achievements
Rank 1
 answered on 16 Jan 2013
2 answers
186 views
 I can't figure out how to bind the selected value of an autocompletebox in a radgrid edittemplate.  I suspect it needs to be added to the autoboxes entries collection, possibly server-side, but can't find examples.  Would be great if it was as easy as SelectedValue='<%# Bind("xSemester_ID") %>'


Thanks 



        <telerik:RadGrid ID="rgGuestLecture" runat="server" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="ldsGuestLecture" GridLines="None" ondeletecommand="rgGuestLecture_DeleteCommand" oninsertcommand="rgGuestLecture_InsertCommand" onitemcreated="rgGuestLecture_ItemCreated" onupdatecommand="rgGuestLecture_UpdateCommand">
                <MasterTableView DataSourceID="ldsGuestLecture" CommandItemDisplay="Bottom" DataKeyNames="ID">
                <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                    <Columns>
                        <telerik:GridEditCommandColumn UniqueName="GridEditCommandColumn"></telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="True" SortExpression="ID" UniqueName="ID" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="FacultyYear_ID" DataType="System.Int32" FilterControlAltText="Filter FacultyYear_ID column" HeaderText="FacultyYear_ID" ReadOnly="True" SortExpression="FacultyYear_ID" UniqueName="FacultyYear_ID" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="xlsRDS_Course_ID" FilterControlAltText="Filter xlsRDS_Course_ID column" HeaderText="xlsRDS_Course_ID" ReadOnly="True" SortExpression="xlsRDS_Course_ID" UniqueName="xlsRDS_Course_ID" DataType="System.Int32" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="xSemester_ID" FilterControlAltText="Filter xSemester_ID column" HeaderText="xSemester_ID" ReadOnly="True" SortExpression="xSemester_ID" UniqueName="xSemester_ID" DataType="System.Int32" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Course_Other" FilterControlAltText="Filter Course_Other column" HeaderText="Course_Other" ReadOnly="True" SortExpression="Course_Other" UniqueName="Course_Other" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="ACAD_CAREER" FilterControlAltText="Filter ACAD_CAREER column" HeaderText="ACAD_CAREER" ReadOnly="True" SortExpression="ACAD_CAREER" UniqueName="ACAD_CAREER" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SUBJECT_CD" FilterControlAltText="Filter SUBJECT_CD column" HeaderText="SUBJECT_CD" ReadOnly="True" SortExpression="SUBJECT_CD" UniqueName="SUBJECT_CD" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="CATALOG_NBR" FilterControlAltText="Filter CATALOG_NBR column" HeaderText="CATALOG_NBR" ReadOnly="True" SortExpression="CATALOG_NBR" UniqueName="CATALOG_NBR" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="DESCR" FilterControlAltText="Filter DESCR column" HeaderText="DESCR" ReadOnly="True" SortExpression="DESCR" UniqueName="DESCR" Visible="false"></telerik:GridBoundColumn>                
                        <telerik:GridBoundColumn DataField="CourseCode" FilterControlAltText="Filter CourseCode column" HeaderText="Course Code" ReadOnly="True" SortExpression="CourseCode" UniqueName="CourseCode"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Semester" FilterControlAltText="Filter Semester column" HeaderText="Semester" ReadOnly="True" SortExpression="Semester" UniqueName="Semester"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Hours_Count" DataType="System.Decimal" FilterControlAltText="Filter Hours_Count column" HeaderText="Hours Count" ReadOnly="True" SortExpression="Hours_Count" UniqueName="Hours_Count"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter Notes column" HeaderText="Notes" ReadOnly="True" SortExpression="Notes" UniqueName="Notes" Visible="false"></telerik:GridBoundColumn>
                        <telerik:GridButtonColumn CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" ConfirmText="Are you sure you want to delete this record?"></telerik:GridButtonColumn>
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <EditColumn UniqueName="eccGuestLecture"></EditColumn>
                        <FormTemplate>
                            <table width="100%" border="0" cellspacing="2" cellpadding="2">
                                <tr>
                                    <td width="25%">Course: </td>
                                    <td width="75%"><telerik:RadAutoCompleteBox ID="racbCourse" runat="server" DataSourceID="ldsRDSCourses" DataTextField="CourseCode" DataValueField="ID" InputType="Text">
                                        <TextSettings SelectionMode="Single"  />
                                        </telerik:RadAutoCompleteBox></td>
                                </tr>
                                <tr>
                                    <td width="25%"><asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ddlSemester" Display="Dynamic">*</asp:RequiredFieldValidator>Semester: <asp:RequiredFieldValidator ID="RequiredFieldValidator31" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ddlSemester" Display="Dynamic">*</asp:RequiredFieldValidator></td>
                                    <td width="75%"><asp:DropDownList ID="ddlSemester" Width="50%" runat="server" DataSourceID="ldsSemester" DataTextField="Semester" DataValueField="ID" SelectedValue='<%# Bind("xSemester_ID") %>' AppendDataBoundItems="True"><asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem></asp:DropDownList></td>
                                </tr>
                                <tr>
                                    <td width="25%"><asp:RequiredFieldValidator ID="RequiredFieldValidator32" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="tbHoursCount" Display="Dynamic">*</asp:RequiredFieldValidator>Hours Count: <asp:RequiredFieldValidator ID="RequiredFieldValidator33" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="tbHoursCount" Display="Dynamic">*</asp:RequiredFieldValidator></td>
                                    <td width="75%"><telerik:RadNumericTextBox ID="tbHoursCount" runat="server" Text='<%# Bind("Hours_Count") %>' Skin="Vista" DataType="System.Int32"></telerik:RadNumericTextBox></td>
                                </tr>
                            </table>
                            <table style="width: 100%">
                                <tr><td align="left"><asp:Button ID="btnRptdEvnt" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'></asp:Button> <asp:Button ID="btnEvntPrsnsCncl" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button></td></tr>
                            </table>
                        </FormTemplate>
                        </EditFormSettings>
                </MasterTableView>
                <FilterMenu EnableImageSprites="False"></FilterMenu>
            </telerik:RadGrid>
Erin Manuel
Top achievements
Rank 1
 answered on 16 Jan 2013
11 answers
148 views
Hey at Telerik

As you can see in the provided attachment the mousehover look of 'transparent' skin on RadMenu doesn't look right.

Seems like the transparency of the images overrides transparency of radmenuitem.

Is there a css fix available or do i need more than that ?

Sincerly

Jan.
Ivan Zhekov
Telerik team
 answered on 16 Jan 2013
0 answers
69 views
Hello everyone,
I am a one-man-and-his-dog web developer who works with ASP.Net. I currently use AjaxControlToolkit for my validation and for extenders such as the calendar extender. Ceing based in the UK and developing for the european market it is of utmost importance that my websites work well in the international environment but I am becomming increasingly disatisfied with the performance of the AjaxControlToolkit.
My requests for an alternative that 'just works' pointed me here but I also notice that there are a lot of fourm posts relating to lots of different issues; now this can be an indicator of software that has a lot of bugs, or a lot of users that are implementing it incorrectly or an active community working with a very capable piece of software that has a few issues that require the odd work around.

I was wondering what people's general feelings were on this system? Is it worth investing in if you want a plug-in-and-forget-about-it type solution to validation and extenders or should I consider cutting my own controls?

Any comments are appreciated (and I understand that the people selling the software are on the forums so obviously everything is taken with a pinch of salt :) )
Craig
Top achievements
Rank 1
 asked on 16 Jan 2013
2 answers
70 views
I can get the OnRowDblClick event working just fine on an iPad, but the OnRowClick event never seems to fire. The code works just fine in IE and Chrome, but why won't the OnRowClick fire on an iPad:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
...
<script type="text/javascript">
function gridClick(sender, eventArgs) {
 alert('click');
}
function gridDoubleClick(sender, eventArgs) {
 alert('double click');
}
</script>
...
<telerik:RadScriptManager ID="trsm" runat="server" />
<telerik:RadGrid
 ID="grid"
 runat="server"
 AllowFilteringByColumn="True"
 AllowPaging="True"
 AllowSorting="True"
 AutoGenerateColumns="False"
 CellSpacing="0"
 DataSourceID="XXXXX"
 GridLines="None"
 Skin="Default">
 <GroupingSettings CaseSensitive="False" />
 <MasterTableView DataKeyNames="XXXXX" ClientDataKeyNames="XXXXX" DataSourceID="XXXXX">
  <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
   <HeaderStyle Width="20px"></HeaderStyle>
  </RowIndicatorColumn>
  <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
   <HeaderStyle Width="20px"></HeaderStyle>
  </ExpandCollapseColumn>
  <Columns>
   ...
  </Columns>
 </MasterTableView>
 <FilterMenu EnableImageSprites="False"></FilterMenu>
 <clientsettings EnableAlternatingItems="true" EnableRowHoverStyle="True">
  <selecting AllowRowSelect="True" />
  <clientevents OnRowClick="gridClick" OnRowDblClick="gridDoubleClick" />
 </clientsettings>
</telerik:RadGrid>
...
Marin
Telerik team
 answered on 16 Jan 2013
1 answer
131 views
I am using the Web Mail Demo as an example source for new layout I need.  Everything works fine except the SelectedIndexChanged is not working when a new row is selected.  I have EnablePostBackOnRowClick=True in Grid cleint settings. and Event for SelectedIndexChanged but it never fires event and loads selected data in DetailsView.

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="false"
                GridLines="None" Height="100%" BorderWidth="0" AllowSorting="true"
                ShowGroupPanel="true" Skin="Windows7">
                <ClientSettings Scrolling-AllowScroll="True" Scrolling-UseStaticHeaders="True" Selecting-AllowRowSelect="True" EnablePostBackOnRowClick="True" EnableRowHoverStyle="True"
                ClientEvents-OnRowSelected="onGridRowSelected"></ClientSettings>
                <MasterTableView TableLayout="Fixed" GroupLoadMode="Client" DataKeyNames="MessageGUID" ClientDataKeyNames="MessageGUID" Width="100%" OnSelectedIndexChanged="RadGrid1_RowSelected">
                    <GroupByExpressions>
                        <telerik:GridGroupByExpression>
                            <SelectFields>
                                <telerik:GridGroupByField FieldName="GroupDate" HeaderText="Date" FormatString="{0}" />
                            </SelectFields>
                            <GroupByFields>
                                <telerik:GridGroupByField FieldName="Grouping" SortOrder="Ascending" HeaderText="Sort By Date" />
                            </GroupByFields>
                        </telerik:GridGroupByExpression>
                    </GroupByExpressions>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="TemplateColumn1">
                            <HeaderStyle Width="24px" />
                            <ItemStyle VerticalAlign="Middle"/>
                            <ItemTemplate>
                                <img src="~/images/icon-msg-read.gif" id="mailicon" runat="server" style="width: 16px; height: 16px" alt="MailIcon" align="middle" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <Telerik:GridBoundColumn HeaderStyle-Width="130px" HeaderText="To" Visible="false" DataField="ToUserFullName" SortExpression="ToUserFullName" UniqueName="ToUserFullName" >
                        </Telerik:GridBoundColumn>
                        <Telerik:GridBoundColumn HeaderStyle-Width="130px" HeaderText="From" DataField="FromUserFullName" SortExpression="FromUserFullName" UniqueName="FromUserFullName" >
                        </Telerik:GridBoundColumn>
                        <Telerik:gridboundcolumn HeaderText="Subject" DataField="Subject" SortExpression="Subject" UniqueName="Subject" />
                        <Telerik:GridBoundColumn UniqueName="DateCreated" SortExpression="DateCreated" HeaderText="Received" DataField="DateCreated" HeaderStyle-Width="150px">
                        </Telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
Protected Sub RadGrid1_RowSelected(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)
        Session("SelectedMessage") = RadGrid1.SelectedValue.ToString
        LoadMessage()
        Dim errors As String = ""
    End Sub
 
Kostadin
Telerik team
 answered on 16 Jan 2013
1 answer
136 views
Hi

I have not looked at my references or webconfig for a few years but after upgrading from

"

2009.2.826.35" to 2012.3.1308.35
I get
Could not load file or assembly 'Telerik.Web.UI, Version=2009.1.311.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

This error rings a bell from my last upgrade but I bamboozled by the size and complexity of my webconfig and reference section.
For some reason i have this in the<dependentAssembly>

 

<

 

assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121FAE78165BA3D4" culture="neutral" />

 

<

 

bindingRedirect oldVersion="0.0.0.0-2009.2.826.35" newVersion="2009.2.826.35" />

 

</

 

dependentAssembly>

It  my no longer be needed
Any help please

 

Al
Top achievements
Rank 1
Iron
 answered on 16 Jan 2013
3 answers
199 views

HI,

I want to use 'outlook' skin for my radsharepointeditor provided by telerik control. FYI, 

For certain controls, we are already using our custom skins. 


I have already put the 

Telerik.Web.UI.Skins.dll in gac . But I am getting following error. 



Telerik.SharePoint.MOSSRadEditor with ID='ctl00' was unable to find an embedded skin with the name 'Outlook'. 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.


Default skin is working fine as it is already available in telerik.web.ui dll.

How can I resolve this error, as you know that we are using Radhtmlfield and we all know that skin control is only applicable to telerik editor control. We are using WCM option.

For more information, Please find web.config lines

this is for mosseditor to redirect to 3.5 version as per the help document provided by telerik control
 <dependentAssembly>
        <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4"/>
        <bindingRedirect oldVersion="1.0.0.0-2008.3.1314.20" newVersion="2012.3.1205.35"/>
      </dependentAssembly>
  <add key="Telerik.Editor.EnableEmbeddedSkins" value="True" />
    <add key="Telerik.Editor.Skin" value="Outlook" />


for certain controls we are using our own skin assembly
<add key="Telerik.Web.SkinsAssembly" value="Ecm360.Utilities.SkinResources, Version=1.0.0.0, Culture=neutral, PublicKeyToken=E1998016F025A868"/>

Do we have to do any safecontrol or assembly entry for telerik.web.ui.skin.dll as no where in the help document?

Please provide us the solution asap.

Thanks,
Ankit Trivedi




Rumen
Telerik team
 answered on 16 Jan 2013
1 answer
106 views
I'm having an issue with a RadTabStrip and a RadGrid in the NeedDataSource event. When the control loads the selected index is set to 0 for the tab strip and when I click around the tabs, the selected index is correct. The problem occrus when I select a checkbox in RadGrid that is auto posting back, the NeedDataSource event is showing the RadTabStrip selected index to be 0 everytime.

Example screenshots: The seleted index should be 4 but the NeedDataSource event is showing 0 everytime.

Thanks
Pavlina
Telerik team
 answered on 16 Jan 2013
3 answers
44 views
Getting a server error...
Please fix!
Pavlina
Telerik team
 answered on 16 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?