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

I have a link button inside the RadAjaxPanel and a formview on my page.

On click of link button inside the RadAjaxPanel, the form view mode needs to be changed to Insert Mode, which is not happening right now.

Help me with this as i am struggling with this since last few days.

Thanks.
robertw102
Top achievements
Rank 1
 answered on 03 Mar 2010
8 answers
131 views
Hi,$0I was using RadControls 'Prometheus' for ASPNET Q3 2007. Today I installed RadControls for ASPNET AJAX Q2 2008 and when I am trying to use this in my application.It is showing errors. That is I removed the old Telerik.Web.UI dll and refer the new dll.But when I build the application, the version of dll can be seen as the old one itself.I had done the steps which is defined in KB regarding upgrading to new version.Removed all refernces caches etc. Can anyone help me to sort out this issue?$0$0$0$0$0Regards,$0$0Jincy$0
dean.carrefour
Top achievements
Rank 1
 answered on 03 Mar 2010
11 answers
740 views

Hello Telerik, 

I have problem when I try to assign GridCheckbox column with Number datatype column (real value 0 and 1 in datasource table). I have saw Exception in Internal method GridCheckBoxColumn.OnDataBindColumn. Is it possible to work with number field as boolean in GridCheckBoxColumn.

Bob Smith
Top achievements
Rank 1
 answered on 03 Mar 2010
1 answer
187 views
As an exercise to help me become more familiar with RadGrid and LINQ as well as master/detail pages, I am building an application which will help me to track a gear list for participants in a backpacking trip.  Hikers are required to obtain all of the items on the gear list.  I wish to create a page with a list of hikers in one grid and a list of gear items in another.  When the user clicks on the name of a hiker in one grid, the other grid will display a full list of gear items, each with a checkbox to indicate whether or not the item has been obtained by the selected hiker.  The user can check or uncheck items as needed.

I have created a simple DB which is depicted in the attached image.  I have also created a VS2008 web application which includes a DBML for the LINQ to SQL entities.  As this is an personal exercise, I have complete control of the DB and application code, so no options are off the table.

My particular question involves presenting the data to the user and recording their input (checking/unchecking gear items.)  As you can see from the diagram, I have tables for Person, Gear, and PersonGear.  Person contains a master list of hikers, Gear contains a master gear list, and PersonGear is a link table which holds a record for each piece of gear a person has obtained. 

How can I most efficiently present the gear records for a hiker and allow the user to check and uncheck boxes in a detail grid?  Will I have to bind the gear grid to the Gear table, include a checkbox column, then iterate through the records and set the checkbox value based on the presence or absence of a record in the PersonGear table, or is there a more straightforward approach that I'm missing?

Thanks in advance for your help.
Veli
Telerik team
 answered on 03 Mar 2010
3 answers
198 views
Hello,
I'm get stucked with the ajax application I'm developing... I've got a master table with a detail table, the detail table shows the groups a user is binded to and I've got a button for removing the user from group... the problem is that the DataBind in the page load suppresses the gvUtenti_ItemCommand...

Here're my ASPX :

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GestioneUtenti.aspx.cs" 
    EnableEventValidation="true" Inherits="IFWebLight.Web.Management.Content.GestioneUtenti" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server" style="height: auto; width: auto"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> 
    <telerik:RadAjaxManager runat="server" ID="radAjax" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="gvUtenti"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gvUtenti" /> 
                    <telerik:AjaxUpdatedControl ControlID="gvGruppoUtenti" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="gvGruppoUtenti"> 
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="gvGruppoUtenti" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <telerik:RadScriptBlock runat="server" ID="scriptBlock"> 
 
        <script type="text/javascript"> 
                <!-- 
            function onRowDropping(sender, args) { 
                if (sender.get_id() == "<%=gvUtenti.ClientID %>") { 
                    var node = args.get_destinationHtmlElement(); 
                    if (!isChildOf('<%=gvGruppoUtenti.ClientID %>', node) && !isChildOf('<%=gvUtenti.ClientID %>', node)) { 
                        args.set_cancel(true); 
                    } 
                } 
                else { 
                    var node = args.get_destinationHtmlElement(); 
                    if (!isChildOf('trashCan', node)) { 
                        args.set_cancel(true); 
                    } 
                    else { 
                        if (confirm("Are you sure you want to delete this order?")) 
                            args.set_destinationHtmlElement($get('trashCan')); 
                        else 
                            args.set_cancel(true); 
                    } 
                } 
            } 
 
            function isChildOf(parentId, element) { 
                while (element) { 
                    if (element.id && element.id.indexOf(parentId) > -1) { 
                        return true; 
                    } 
                    elementelement = element.parentNode; 
                } 
                return false; 
            } 
 
            function LoadUtentiGrid(sender) { 
                alert(sender); 
            } 
 
 
           
             --> 
        </script> 
 
    </telerik:RadScriptBlock> 
    <div> 
        <div style="width: 49%; float: left"> 
            <telerik:RadGrid ID="gvUtenti" runat="server" BackColor="LightSteelBlue" AllowFilteringByColumn="True" OnItemCommand="gvUtenti_ItemCommand" 
                AutoGenerateColumns="False" GridLines="None" ShowGroupPanel="True" AllowPaging="True" OnPageIndexChanged="RadGrid1_PageIndexChanged" 
                AllowMultiRowSelection="true" AllowSorting="True" OnRowDrop="gvUtenti_Drop" OnDetailTableDataBind="gvUtenti_DetailDataBind"> 
                <MasterTableView GroupLoadMode="Client" ClientDataKeyNames="Codice" > 
                    <ExpandCollapseColumn Visible="True"> 
                    </ExpandCollapseColumn> 
                    <Columns> 
                        <telerik:GridBoundColumn HeaderText="Codice" HeaderButtonType="TextButton" DataField="Codice"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Descrizione" HeaderButtonType="TextButton" DataField="Descrizione"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="PWD" HeaderButtonType="TextButton" DataField="PWD"> 
                        </telerik:GridBoundColumn> 
                        <telerik:GridBoundColumn HeaderText="Filiale" HeaderButtonType="TextButton" DataField="Filiale"> 
                        </telerik:GridBoundColumn> 
                    </Columns> 
                    <DetailTables   > 
                        <telerik:GridTableView Name="gvGruppi" > 
                            <Columns> 
                                <telerik:GridBoundColumn HeaderText="Gruppo" HeaderButtonType="TextButton" DataField="DescrizioneGruppo"> 
                                </telerik:GridBoundColumn> 
                                      <telerik:GridButtonColumn ButtonType="PushButton" Text="prova" CommandName="CancellaGruppo" > 
                             
                            </telerik:GridButtonColumn> 
                            </Columns> 
                        </telerik:GridTableView> 
                    </DetailTables> 
                </MasterTableView> 
                 
                <ClientSettings AllowRowsDragDrop="true"> 
                    <Selecting AllowRowSelect="True" EnableDragToSelectRows="false" /> 
                    <ClientEvents OnRowDropping="onRowDropping" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
        </div> 
        <div style="width: 50%; float: right"> 
            <div> 
                <asp:Label Text="Gruppi" runat="server"></asp:Label> 
                <telerik:RadComboBox ID="cbGruppi" runat="server" Width="250px" Height="150px" EmptyMessage="Selezionare un gruppo" 
                    EnableLoadOnDemand="true" ShowMoreResultsBox="false" AutoPostBack="true" EnableVirtualScrolling="false" 
                    OnSelectedIndexChanged="cbGruppi_IndexChanged"> 
                    <WebServiceSettings Method="GetGruppi" Path="../WS/IFManagement.svc" /> 
                </telerik:RadComboBox> 
            </div> 
            <div style="height: 400px"> 
                <telerik:RadGrid ID="gvGruppoUtenti"  runat="server" 
                    BackColor="LightSteelBlue" AutoGenerateColumns="False" ShowGroupPanel="True" 
                    AllowPaging="True" AllowMultiRowSelection="true" AllowSorting="True"> 
                    <MasterTableView>  <%--OnDeleteCommand="OnGridCancel"--%> 
                        <ExpandCollapseColumn Visible="True"> 
                        </ExpandCollapseColumn> 
                        <Columns> 
                            <telerik:GridBoundColumn HeaderText="Utente" DataField="User"> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn HeaderText="Descrizione" HeaderButtonType="TextButton" DataField="Descrizione"> 
                            </telerik:GridBoundColumn> 
                            <telerik:GridButtonColumn ButtonType="PushButton" Text="prova" CommandName="Delete" CommandArgument="A"> 
                             
                            </telerik:GridButtonColumn> 
 
                        </Columns> 
                    </MasterTableView> 
                    <ClientSettings AllowRowsDragDrop="true"> 
                        <%-- <DataBinding SelectMethod="GetDataAndCount" Location="../WS/IFManagement.svc" 
                        SortParameterType="Linq"  FilterParameterType="Linq"></DataBinding> 
                         <ClientEvents OnCommand="pLoad()" />--%> 
                    </ClientSettings> 
                </telerik:RadGrid> 
            </div> 
        </div> 
    </div> 
 
    <script language="javascript" type="text/javascript"> 
           <!-- 
        function pLoad() { 
 
            var dataSource = null; 
 
            var tableView = $find('gvGruppoUtenti').get_masterTableView(); 
 
            if (tableView.get_dataItems().length == 0) { 
                alert('ok'); 
                $find('gvGruppoUtenti').get_masterTableView().set_dataSource(dataSource); 
                $find('gvGruppoUtenti').get_masterTableView().dataBind(); 
            } 
            else { 
                alert('dati'); 
            } 
 
        }  
              
             --> 
    </script> 
 
    </form> 
</body> 
</html> 
 

and my .Cs (important parts) file

    private IFManagement clientManagement; 
        private List<UtenteGruppo> m_ListaUtenteGruppo; 
        private List<Utente> m_ListaUtente; 
        private int idxPage; 
 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            clientManagement = new IFManagement(); 
 
            if (IsPostBack) 
            { 
                if (Cache["lug"] != null) 
                { 
                    m_ListaUtenteGruppo = (List<UtenteGruppo>)Cache["lug"]; 
 
                    gvGruppoUtenti.DataSource = m_ListaUtenteGruppo; 
                    gvGruppoUtenti.DataBind(); 
                } 
                if (Cache["lu"] != null) 
                { 
                    m_ListaUtente = (List<Utente>)Cache["lu"]; 
 
                    gvUtenti.DataSource = m_ListaUtente; 
                    gvUtenti.DataBind(); //(*)
                } 
                
            } 
            else 
                LoadUtenti(); 
        } 
 
 
 private void LoadUtenti() 
        { 
            if (m_ListaUtente == null) 
            { 
                m_ListaUtente = clientManagement.GetListaUtenti(); 
                Cache["lu"] = m_ListaUtente; 
            } 
 
            gvUtenti.DataSource = m_ListaUtente; 
            gvUtenti.DataBind(); 
 
            Cache["a"] = gvUtenti; 
 
            gvGruppoUtenti.MasterTableView.EnableNoRecordsTemplate = true; 
            gvGruppoUtenti.MasterTableView.NoDetailRecordsText = "vuoto"; 
 
        } 
 
 
 protected void gvUtenti_DetailDataBind(object source, Telerik.Web.UI.GridDetailTableDataBindEventArgs e) 
        { 
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem; 
            Utente u = dataItem.DataItem as Utente; 
 
            if (null != u) 
            { 
                e.DetailTableView.DataSource = u.GruppiAppartenenza; 
            } 
            else 
                e.DetailTableView.DataSource = null; 
        } 
 
 
 protected void gvUtenti_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            if (e.CommandName == "CancellaGruppo") 
            { 
                int iRewardID = 0; 
 
            } 
 
        } 

If I do the (*) in pageload the gvUtenti_ItemCommand will be suppressed... what am I doing wrong? I was so happy of having moved to SL and not having to do anymore with postbacks...but past returns!
Thanks

Paolo


Tsvetoslav
Telerik team
 answered on 03 Mar 2010
7 answers
201 views
Hi,

I have four radgrids on the same page and each of these have a "GridClientSelectColumn". In order to persist the selected rows in the grid on sorting/paging/filtering/grouping, i refered to the approach given at the following link-
http://www.telerik.com/help/aspnet-ajax/grid-persist-selected-rows-client-sorting-paging-grouping-filtering.html

This seems to work fine for a single grid but as I have 4 grids so whenever i select any of the items (say the one with the row index 1) in any one of these 4 grids and perform sorting, filtering etc on that grid itself, in the remaining 3 grids also the items with the same index (in this case, those with the rowindex 1) become selected.
Please suggest what changes i need to make to the approach given at the above mentioned link to fix this.
Please reply soon as i need to fix this ASAP.

Thanks In Advance,
Abhishek Chauhan
Abhishek Chauhan
Top achievements
Rank 1
 answered on 03 Mar 2010
4 answers
178 views
Hi,  I have a main rotator in a content page that rotates 5 banner images.   Then on the master page I have a 2nd rotator which displays products that match the main rotator.    I databind each rotator separately but from the same datasource and they either start off out of sync or after a while they get out of sync.

The ScrollDuration and the FrameDuration are set the same.

Are there any examples on how I can sync the 2nd rotator in the master page to the one in the content page,  like when the frame changes on the main rotator it changes the frame on the 2nd?

Thanks for any help
-Keith
Fiko
Telerik team
 answered on 03 Mar 2010
5 answers
199 views
Hello,

There is something wrong with the positioning of the "Right Scroll" button in the Safari on Windows. You can see it on your sample projects here - http://demos.telerik.com/aspnet-ajax/rotator/examples/default/defaultcs.aspx - it is being positioned within content area. You can also checked attached screenshot.

Please let me know how this can be fixed.

Thank you,
Andrei
Fiko
Telerik team
 answered on 03 Mar 2010
3 answers
258 views
Hi, in the documantion I read I can use multiple RadEditors on my page. I want to show only one toolbar at the time and it should show at the top op the editors.Not of the page.There is an option PageTop, this option shows the toolbar at the top of the page. The problem is, I designed my page using a masterpage and the RadSplitters. So I have a PageTop secion, content section and PageFooter.

Is it possible to configure the editor to show only on toolbar, but this toolbar should show at the top of the content section, not of the page, because then it wil overwrite the menu of my page.


Rumen
Telerik team
 answered on 03 Mar 2010
4 answers
416 views
Hello,

      I create a RadGrid programmaticly and define the bound fields, one of which is a GridHyperLinkColumn  below:
GridHyperLinkColumn siteLink = new GridHyperLinkColumn(); 
string[] siteLinkUrlFields = new String[1]; 
siteLinkUrlFields[0] = "SiteURL"; 
siteLink.DataNavigateUrlFields = siteLinkUrlFields; 
siteLink.DataTextField = "Title"; 
siteLink.HeaderText = "Site Name"; 
siteLink.UniqueName = "SiteName"; 
siteLink.SortExpression = "Title"; 
siteLink.Target = "_blank"; 
grid.MasterTableView.Columns.Add(siteLink); 
       Now I'm gonna double click on a row that a new window will show up based on the hyperlink's target site. I have already set grid.ClientSettings.ClientEvents.OnRowDblClick = "RowDblClick";

       How to accomplish the client script to get the navigatorUrl of the hyperlink and redirect. Hence, another approach is provided to users if they don't want to click on the hyperlink.

       I think the client script should be like this:

       function RowDblClick(sender, eventArgs)
       {
              var dataItem = eventArgs.get_dataItem();
              ........................................
              ........................................
              window.open();
       }

Any suggestion is appreciated.
TIA
BR
Brett
Top achievements
Rank 2
 answered on 03 Mar 2010
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?