Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
139 views

I have a grid that does not update automaticly after I deleted an item. However, if I click on the refresh button, the item has been removed from de grid. I placed the grid in a RadAjaxLoadingPanel, but it's not working. Can someone help me?
This is my ascx code:

<%@ Control language="vb" Inherits="BDB.Modules.BDB_Promo_Settings.ViewBDB_Promo_Settings" CodeFile="ViewBDB_Promo_Settings.ascx.vb" AutoEventWireup="false" Explicit="True" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register TagPrefix="dnn" TagName="Audit" Src="~/controls/ModuleAuditControl.ascx" %> 
     
<telerik:RadAjaxLoadingPanel ID="radLoadingPromo" runat="server" Height="75px" Width="75px">  
    <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
        style="border: 0px;" /> 
</telerik:RadAjaxLoadingPanel> 
 
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" EnableAJAX="true" LoadingPanelID="radLoadingPromo">  
<telerik:RadGrid ID="gridPromo" runat="server" AutoGenerateColumns="False" EnableAJAX="true" 
    GridLines="None" AllowAutomaticDeletes="true" OnDeleteCommand="gridPromo_DeleteCommand" 
    EnableEmbeddedSkins="False" Skin="BDB">  
<HeaderContextMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</HeaderContextMenu> 
 
<MasterTableView> 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
    <Columns> 
        <telerik:GridBoundColumn DataField="PromoId" HeaderText="ID" UniqueName="ID"   
            Visible="False">  
        </telerik:GridBoundColumn> 
        <telerik:GridTemplateColumn HeaderText="Afbeelding" UniqueName="Afbeelding" DataField="Folder">  
            <ItemTemplate> 
                <asp:Image ID="afbPromo" runat="server" /> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 
        <telerik:GridBoundColumn DataField="Alt" HeaderText="Alt" UniqueName="Alt">  
        </telerik:GridBoundColumn> 
        <telerik:GridButtonColumn ConfirmText="Wilt u deze afbeelding verwijderen?" ButtonType="ImageButton" ImageUrl="~/images/action_delete.gif" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn" >              
        </telerik:GridButtonColumn> 
        <telerik:GridBoundColumn DataField="Folder" HeaderText="Folder"   
            UniqueName="Folder" Visible="False">  
        </telerik:GridBoundColumn> 
    </Columns> 
    <EditFormSettings> 
        <EditColumn CancelImageUrl="Cancel.gif" EditImageUrl="Edit.gif"   
            InsertImageUrl="Update.gif" UpdateImageUrl="Update.gif">  
        </EditColumn> 
    </EditFormSettings> 
</MasterTableView> 
 
<FilterMenu EnableTheming="True">  
<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
</FilterMenu> 
</telerik:RadGrid> 
 
<br /> 
<span style="float:right">  
    <asp:ImageButton ID="imgbuRefresh" ImageUrl="~/images/action_refresh.gif" runat="server" />&nbsp;  
    <asp:ImageButton ID="imgBuAdd" ImageUrl="~/Portals/_default/Skins/BDB-Blue/images/add.gif" runat="server" />       
</span> 
</telerik:RadAjaxPanel> 
 
<telerik:RadWindowManager ID="windowMgrPromo" runat="server" Animation="Resize"   
    DestroyOnClose="True">  
<Windows> 
<telerik:RadWindow ID="windowPromo" runat="server" Skin="Forest" NavigateUrl="PromoUpload.aspx" VisibleStatusbar="False" VisibleTitlebar="True" Height="300" Width="700">  
</telerik:RadWindow> 
<telerik:RadWindow ID="windowMessage" runat="server"></telerik:RadWindow> 
</Windows> 
</telerik:RadWindowManager> 
<asp:Label ID="lblTest" runat="server"></asp:Label> 
 
 

And this is my code-behind:
'  
' DotNetNuke® - http://www.dotnetnuke.com  
' Copyright (c) 2002-2006  
' by Perpetual Motion Interactive Systems Inc. ( http://www.perpetualmotion.ca )  
'  
' Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated   
' documentation files (the "Software"), to deal in the Software without restriction, including without limitation   
' the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and   
' to permit persons to whom the Software is furnished to do so, subject to the following conditions:  
'  
' The above copyright notice and this permission notice shall be included in all copies or substantial portions   
' of the Software.  
'  
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED   
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL   
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF   
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER   
' DEALINGS IN THE SOFTWARE.  
'  
Imports DotNetNuke  
Imports System.Web.UI  
Imports System.Collections.Generic  
Imports System.Reflection  
Imports Telerik.Web.UI  
Imports System.IO  
 
Namespace BDB.Modules.BDB_Promo_Settings  
 
    ''' -----------------------------------------------------------------------------  
    ''' <summary>  
    ''' The ViewDynamicModule class displays the content  
    ''' </summary>  
    ''' <remarks>  
    ''' </remarks>  
    ''' <history>  
    ''' </history>  
    ''' -----------------------------------------------------------------------------  
    Partial Class ViewBDB_Promo_Settings  
        Inherits Entities.Modules.PortalModuleBase  
        Implements Entities.Modules.IActionable
#Region "Private Members"  
        Private colBDB_Promo_Settings As List(Of BDB_Promo_SettingsInfo)
#End Region  
 
#Region "Event Handlers" 
 
        ''' -----------------------------------------------------------------------------  
        ''' <summary>  
        ''' Page_Load runs when the control is loaded  
        ''' </summary>  
        ''' <remarks>  
        ''' </remarks>  
        ''' <history>  
        ''' </history>  
        ''' -----------------------------------------------------------------------------  
        Private Sub Page_Load(ByVal sender As System.ObjectByVal e As System.EventArgs) Handles MyBase.Load  
            Dim _controller As New BDB_Promo_SettingsController  
            colBDB_Promo_Settings = _controller.GetAllBDB_Promo_Settings()  
            windowPromo.VisibleOnPageLoad = True 
            windowPromo.Visible = False 
        End Sub 
        Protected Sub imgBuAdd_Click(ByVal sender As ObjectByVal e As System.Web.UI.ImageClickEventArgs) Handles imgBuAdd.Click              
            windowPromo.Visible = True 
        End Sub 
        Protected Sub imgbuRefresh_Click(ByVal sender As ObjectByVal e As System.Web.UI.ImageClickEventArgs) Handles imgbuRefresh.Click  
            gridPromo.DataSource = colBDB_Promo_Settings  
            gridPromo.DataBind()  
        End Sub 
        Protected Sub gridPromo_DeleteCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gridPromo.DeleteCommand  
            If (e.CommandName = "Delete"Then 
                Try 
                    ' Remove record from database  
                    Dim data As GridDataItem  
                    data = e.Item  
 
                    Dim _controller As New BDB_Promo_SettingsController  
                    _controller.DeleteBDB_Promo_Settings(CType(data.Item("ID").Text, Integer))  
 
                    ' Remove image from hard disk  
                    If File.Exists(data.Item("Folder").Text) Then 
                        File.Delete(data.Item("Folder").Text)  
                    End If 
 
                    gridPromo.Rebind()  
 
                    lblTest.Text = "De afbeelding is verwijderd." 
                    lblTest.Visible = True 
                Catch ex As Exception  
                    lblTest.Text = "Er is een fout opgetreden bij het verwijderen van de afbeelding." 
                    lblTest.Visible = True 
                End Try 
 
            End If 
        End Sub 
        Protected Sub gridPromo_NeedDataSource(ByVal source As ObjectByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles gridPromo.NeedDataSource  
            gridPromo.DataSource = colBDB_Promo_Settings  
            'gridPromo.DataBind()  
        End Sub 
        Protected Sub gridPromo_PreRender(ByVal sender As ObjectByVal e As System.EventArgs) Handles gridPromo.PreRender  
            Dim gridRows As GridItemCollection = gridPromo.Items  
            Dim obj As BDB.Modules.BDB_Promo_Settings.BDB_Promo_SettingsInfo  
            Dim afbeelding As System.Web.UI.WebControls.Image  
 
            Try 
                For Each data As GridDataItem In gridRows  
                    obj = data.DataItem  
                    afbeelding = CType(data.FindControl("afbPromo"), System.Web.UI.WebControls.Image)  
                    afbeelding.ImageUrl = obj.Lokatie  
                    afbeelding.ToolTip = obj.Alt  
                    'afbeelding.Height = 100  
                    'afbeelding.Width = 400  
                Next 
            Catch ex As Exception  
 
            End Try 
 
        End Sub
#End Region  
 
#Region "Optional Interfaces" 
 
        ''' -----------------------------------------------------------------------------  
        ''' <summary>  
        ''' Registers the module actions required for interfacing with the portal framework  
        ''' </summary>  
        ''' <value></value>  
        ''' <returns></returns>  
        ''' <remarks></remarks>  
        ''' <history>  
        ''' </history>  
        ''' -----------------------------------------------------------------------------  
        Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActions  
            Get 
                Dim Actions As New Entities.Modules.Actions.ModuleActionCollection  
                Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, """", EditUrl(), False, Security.SecurityAccessLevel.Edit, TrueFalse)  
                Return Actions  
            End Get 
        End Property
#End Region  
    End Class 
End Namespace 
Jen
Top achievements
Rank 1
 answered on 07 May 2009
3 answers
93 views

FormDecoration not working...don't know why. I put this in the page:

 

<

telerik:radformdecorator id="FormDecorator1" runat="server" DecoratedControls="all" Skin="Telerik" ></telerik:radformdecorator>

 

but the controls keep showing Web20 style.

Georgi Tunev
Telerik team
 answered on 07 May 2009
5 answers
131 views
Hello,

I use two radmenus. Everything is ok but sometimes, the display of the radmenu is expanded. You can see the result at this link :

 

http://www.iconus.ch/fabien/stuff/Outlook.jpg


Here is a sample of the code :

<td align="right" class="InlinePanels">  
                            <telerik:RadMenu ID="RadMenu1" OnClientItemClicking="OnClientItemClicking"  runat="server" EnableEmbeddedSkins="false" ClickToOpen="true" OnItemClick="RadMenu1_ItemClick">  
                                <Items> 
                                    <telerik:RadMenuItem Text="cashflow">  
                                        <Items> 
                                            <telerik:RadMenuItem Text="cashflow1" /> 
                                            <telerik:RadMenuItem Text="cashflow2" /> 
                                        </Items> 
                                    </telerik:RadMenuItem> 
                                </Items> 
                            </telerik:RadMenu> 
                            &nbsp;  
                            <telerik:RadMenu ID="RadMenu2" OnClientItemClicking="OnClientItemClicking"  runat="server" EnableEmbeddedSkins="false" ClickToOpen="true" OnItemClick="RadMenu1_ItemClick">  
                                <Items> 
                                    <telerik:RadMenuItem Text="market exit">  
                                        <Items> 
                                            <telerik:RadMenuItem Text="marketexit1" /> 
                                            <telerik:RadMenuItem Text="marketexit2" /> 
                                        </Items> 
                                    </telerik:RadMenuItem> 
                                </Items> 
                            </telerik:RadMenu> 
                            &nbsp;  
                            <asp:Button CssClass="green_button" ID="NewBtn" runat="server" Text="new" 
                                OnClick="NewBtn_Click" UseSubmitBehavior="false" ValidationGroup="" /> 
                        </td>         

Do you why I have sometimes this problem ?

Thanks,

Sabrina
Atanas Korchev
Telerik team
 answered on 07 May 2009
2 answers
73 views
We have enabled the RadEditor in list item. However, it seems that the RadEditor cannot pick up the configuration in the ToolsFile.xml.

Could you please help us to resolve this issue?
Ritter
Top achievements
Rank 1
 answered on 07 May 2009
3 answers
119 views
Hi,

I have a Grid which has the ability to expand a row to show further information.  When the parent row is expanded, the child level shows two tables.

I need the first table to display under the first column of the parent row and the second table to display under the 5th column of the parent row.

Is there a way of positioning the child tables so that they are underneath the relevant columns instead of being on top of each other, directly under the first column?
Shinu
Top achievements
Rank 2
 answered on 07 May 2009
1 answer
172 views
I'm using a modified version of the jQuery star rating for asp.net found here. However when I have a radgrid ajax enabled and click the page next or page back the jQuery function is only tied to the page load so I lose the star rating on my grid items and am left with radio buttons.

Can someone help me recall the jQuery after the ajax pager is used to place the stars back on my rating control. The original jQuery function is as follows.

/*
 ### jQuery Star Rating Plugin v2.5 - 2008-09-10 ###
 * http://www.fyneworks.com/ - diego@fyneworks.com
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 ###
 Project: http://plugins.jquery.com/project/MultipleFriendlyStarRating
 Website: http://www.fyneworks.com/jquery/star-rating/
*//*  
    Based on http://www.phpletter.com/Demo/Jquery-Star-Rating-Plugin/  
 Original comments:  
    This is hacked version of star rating created by <a href="http://php.scripts.psu.edu/rja171/widgets/rating.php">Ritesh Agrawal</a>  
    It thansform a set of radio type input elements to star rating type and remain the radio element name and value,  
    so could be integrated with your form. It acts as a normal radio button.  
    modified by : Logan Cai (cailongqun[at]yahoo.com.cn)  
*/  
 
/*# AVOID COLLISIONS #*/ 
;if(window.jQuery) (function($){  
/*# AVOID COLLISIONS #*/ 
      
    // default settings  
    $.rating = {  
        cancel: 'Cancel Rating',   // advisory title for the 'cancel' link  
        cancelValue: '',           // value to submit when user click the 'cancel' link  
        split: 0,                  // split the star into how many parts?  
          
        // Width of star image in case the plugin can't work it out. This can happen if  
        // the jQuery.dimensions plugin is not available OR the image is hidden at installation  
        starWidth: 16,  
          
        //NB.: These don't need to be defined (can be undefined/null) so let's save some code!  
        //half:     false,         // just a shortcut to settings.split = 2  
        //required: false,         // disables the 'cancel' button so user can only select one of the specified values  
        //readOnly: false,         // disable rating plugin interaction/ values cannot be changed  
        //focus:    function(){},  // executed when stars are focused  
        //blur:     function(){},  // executed when stars are focused  
        //callback: function(){},  // executed when a star is clicked  
          
        // required properties:  
        groups: {},// allows multiple star ratings on one page  
        event: {// plugin event handlers  
            fill: function(n, el, settings, state){ // fill to the current mouse position.  
                //if(window.console) console.log(['fill', $(el), $(el).prevAll('.star_group_'+n), arguments]);  
                this.drain(n);  
                $(el).prevAll('.star_group_'+n).andSelf().addClass('star_'+(state || 'hover'));  
                // focus handler, as requested by focusdigital.co.uk  
                var lnk = $(el).children('a'); val = lnk.text();  
                if(settings.focus) settings.focus.apply($.rating.groups[n].valueElem[0], [val, lnk[0]]);  
            },  
            drain: function(n, el, settings) { // drain all the stars.  
                //if(window.console) console.log(['drain', $(el), $(el).prevAll('.star_group_'+n), arguments]);  
                $.rating.groups[n].valueElem.siblings('.star_group_'+n).removeClass('star_on').removeClass('star_hover');  
            },  
            reset: function(n, el, settings){ // Reset the stars to the default index.  
                if(!$($.rating.groups[n].current).is('.cancel'))  
                    $($.rating.groups[n].current).prevAll('.star_group_'+n).andSelf().addClass('star_on');  
                // blur handler, as requested by focusdigital.co.uk  
                var lnk = $(el).children('a'); val = lnk.text();  
                if(settings.blur) settings.blur.apply($.rating.groups[n].valueElem[0], [val, lnk[0]]);  
            },  
            click: function(n, el, settings){ // Selected a star or cancelled  
                $.rating.groups[n].current = el;  
                var lnk = $(el).children('a'); val = lnk.text();  
                // Set value  
                $.rating.groups[n].valueElem.val(val);  
                // Update display  
                $.rating.event.drain(n, el, settings);  
                $.rating.event.reset(n, el, settings);  
                // click callback, as requested here: http://plugins.jquery.com/node/1655  
                if(settings.callback) settings.callback.apply($.rating.groups[n].valueElem[0], [val, lnk[0]]);  
            }        
        }// plugin events  
    };  
      
    $.fn.rating = function(instanceSettings){  
        if(this.length==0) return this// quick fail  
          
        instanceSettings = $.extend(  
            {}/* new object */,  
            $.rating/* global settings */,  
            instanceSettings || {} /* just-in-time settings */ 
        );  
          
        // loop through each matched element  
        this.each(function(i){  
              
            var settings = $.extend(  
                {}/* new object */,  
                instanceSettings || {} /* current call settings */,  
                ($.metadata? $(this).metadata(): ($.meta?$(this).data():null)) || {} /* metadata settings */ 
            );  
              
            ////if(window.console) console.log([this.name, settings.half, settings.split], '#');  
              
            // Generate internal control ID  
            // - ignore square brackets in element names  
            var n = (this.name || 'unnamed-rating').replace(/\[|\]/, "_");  
     
            // Grouping  
            if(!$.rating.groups[n]) $.rating.groups[n] = {count: 0};  
            i = $.rating.groups[n].count; $.rating.groups[n].count++;  
              
            // Accept readOnly setting from 'disabled' property  
            $.rating.groups[n].readOnly = $.rating.groups[n].readOnly || settings.readOnly || $(this).attr('disabled');  
              
            // Things to do with the first element...  
            if(i == 0){  
                // Create value element (disabled if readOnly)  
                $.rating.groups[n].valueElem = $('<input type="hidden" name="' + n + '" value=""' + (settings.readOnly ? ' disabled="disabled"' : '') + '/>');  
                // Insert value element into form  
                $(this).before($.rating.groups[n].valueElem);  
                  
                if($.rating.groups[n].readOnly || settings.required){  
                    // DO NOT display 'cancel' button  
                }  
                else{  
                    // Display 'cancel' button  
                    $(this).before(  
                        $('<div class="cancel"><a title="' + settings.cancel + '">' + settings.cancelValue + '</a></div>')  
                        .mouseover(function(){ $.rating.event.drain(n, this, settings); $(this).addClass('star_on'); })  
                        .mouseout(function(){ $.rating.event.reset(n, this, settings); $(this).removeClass('star_on'); })  
                        .click(function(){ $.rating.event.click(n, this, settings); })  
                    );  
                }  
            }; // if (i == 0) (first element)  
              
            // insert rating option right after preview element  
            eStar = $('<div class="star"><a title="' + (this.title || this.value) + '">' + this.value + '</a></div>');  
            $(this).after(eStar);  
              
            // Half-stars?  
            if(settings.half) settings.split = 2;  
              
            // Prepare division settings  
            if(typeof settings.split=='number' && settings.split>0){  
                var stw = ($.fn.width ? $(eStar).width() : 0) || settings.starWidth;  
                var spi = (i % settings.split), spw = Math.floor(stw/settings.split);  
                $(eStar)  
                // restrict star's width and hide overflow (already in CSS)  
                .width(spw)  
                // move the star left by using a negative margin  
                // this is work-around to IE's stupid box model (position:relative doesn't work)  
                .find('a').css({ 'margin-left':'-'+ (spi*spw) +'px' })  
            };  
              
            // Remember group name so controls within the same container don't get mixed up  
            $(eStar).addClass('star_group_'+n);  
              
            // readOnly?  
            if($.rating.groups[n].readOnly)//{ //save a byte!  
                // Mark star as readOnly so user can customize display  
                $(eStar).addClass('star_readonly');  
            //}  //save a byte!  
            else//{ //save a byte!  
                $(eStar)  
                // Enable hover css effects  
                .addClass('star_live')  
                // Attach mouse events  
                .mouseover(function(){ $.rating.event.drain(n, this, settings); $.rating.event.fill(n, this, settings, 'hover'); })  
                .mouseout(function(){ $.rating.event.drain(n, this, settings); $.rating.event.reset(n, this, settings); })  
                .click(function(){ $.rating.event.click(n, this, settings); });  
            //}; //save a byte!  
              
            ////if(window.console) console.log(['###', n, this.checked, $.rating.groups[n].initial]);  
            if(this.checked) $.rating.groups[n].current = eStar;  
              
            //remove this checkbox  
            $(this).remove();  
              
            // reset display if last element  
            if(i + 1 == this.length) $.rating.event.reset(n, this, settings);  
          
        }); // each element  
              
        // initialize groups...  
        for(n in $.rating.groups)//{ not needed, save a byte!  
            (function(c, v, n){ if(!c) return;  
                $.rating.event.fill(n, c, instanceSettings || {}, 'on');  
                $(v).val($(c).children('a').text());  
            })  
            ($.rating.groups[n].current, $.rating.groups[n].valueElem, n);  
        //}; not needed, save a byte!  
          
        return this// don't break the chain...  
    };  
      
      
      
    /*
        ### Default implementation ###
        The plugin will attach itself to file inputs
        with the class 'multi' when the page loads
    */ 
    $(function(){ $('input[@type=radio].star').rating(); });  
      
      
      
/*# AVOID COLLISIONS #*/ 
})(jQuery);  
/*# AVOID COLLISIONS #*/ 

Thanks in advance,

Ben
Rosen
Telerik team
 answered on 07 May 2009
0 answers
102 views
I noticed that RadTreeView Control have some compatible issues on IE8 standard mode, such as image align with text.  the below code is generated by RadTreeView Control and not worked on IE8 standard mode.
......
<img align="absmiddle">
......
I also found other issues about IE8 standard mode and I don't know if Telerik have a schedule for RadControl full compatible with IE8 standard mode?

thanks,

Wang Shen
Shen
Top achievements
Rank 1
 asked on 07 May 2009
2 answers
168 views
Is it possible that i have items in combobox in two column like this
on column have text and another have value.

plz help me.

Actinic Keratosis

702.1

Seborrheic Keratosis, Inflamed

702.0

Dermatitis, Stasis

504.9

Basal Cell Carcinoma, Face

173.9

 

 

abhay
Top achievements
Rank 1
 answered on 07 May 2009
1 answer
236 views

I have radgrid on my page and want to change footer’s border (top and bottom) color. Which property should I refer to?

Shinu
Top achievements
Rank 2
 answered on 07 May 2009
3 answers
331 views

Hi,

I am trying to add a column to my grid where there is a link to another page. For this, I have been using the GridHyperLinkColumn which does the job, but now instead of the text "View details" which I previously had as a hyperlink, I would like to place an icon (the same for every row in the grid). I tried with the GridHyperLinkColumn but I don't think it supports images. For this, I can only see using GridButtonColumn, but how do I insert the link with this type of column? The link is using the result from a select to detect the id of the content in order to form the url:

 

<telerik:GridHyperLinkColumn DataNavigateUrlFormatString="/lms_bd/ContentDetails.aspx?content={0}" Target="_self" DataTextFormatString="my edit page" DataNavigateUrlFields="ContentID" UniqueName="ExternalEditLink" HeaderText="View Details" Text="View" >
</telerik:GridHyperLinkColumn>

In the .cs code of the ContentDetails.aspx page, the control literal1 receives the value passed in the url:

protected void Page_Load(object sender, EventArgs e)

{
string thisContent = Request.QueryString["content"].ToString();
Literal1.Text = thisContent;
}

I then use the following paramater in my select command:

<SelectParameters>
<asp:ControlParameter ControlID="Literal1" Name="content" PropertyName="Text" Type="String" />
</SelectParameters>

Does anyone have any suggestions?
Thanks!

Pavlina
Telerik team
 answered on 07 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?