Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
145 views
hello to all expert
 
                 Good Day ! i try to follow the again the document on setting a radcombobox inside the grid and also in the source by making a custom template for combobox..

here my source codes in intire grid

<%@ Page Language="C#" MasterPageFile="~/IBOSMaster.Master" AutoEventWireup="true" CodeBehind="CARDTL.aspx.cs" Inherits="IBOS.CAR.CARDTL" Title="CAR DTL" %> 
<%@ MasterType VirtualPath="~/IBOSMaster.master" %> 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %> 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> 
<%@ Register Namespace="RadGrid" TagPrefix="custom" %>    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
 
     <table style="width: 846px">  
        <tr> 
        </tr> 
        <tr> 
            <td style="width: 805px">  
                <table width="100%">  
                    <tr> 
                        <td style="width: 49px">  
                            <asp:Label ID="Label2" runat="server" CssClass="captionField" Text="DATE :" Width="52px"></asp:Label></td>  
                        <td style="width: 154px">  
                            <telerik:RadDatePicker ID="rdDate" runat="server" MinDate="1900/1/1" Width="150px" Skin="Default2006" AutoPostBack="True" OnSelectedDateChanged="rdDate_SelectedDateChanged">  
                                <DateInput runat="server"   LabelCssClass="radLabelCss_Default2006" Skin="Default2006" AutoPostBack="True">  
                                </DateInput> 
                                <Calendar runat="server"   Skin="Default2006" UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" 
                                    ViewSelectorText="x">  
                                </Calendar> 
                                <DatePopupButton CssClass="radPopupImage_Default2006" /> 
                            </telerik:RadDatePicker> 
                            &nbsp;  
                              
                           </td> 
                        <td style="width: 41px">  
                                        <asp:LinkButton ID="LinkButton1" runat="server" CssClass="captionField" Width="57px">SEARCH :</asp:LinkButton></td>  
                        <td style="width: 34px">  
                                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Search-002.png" /> 
                        </td> 
                        <td style="width: 23px">  
                                        <asp:LinkButton ID="lnkViewSetting" runat="server" CssClass="captionField" OnClick="lnkViewSetting_Click1" Width="98px">VIEW SETTINGS :</asp:LinkButton></td>  
                        <td style="width: 33px">  
                                        <asp:Image ID="Image2" runat="server" ImageUrl="~/Images/Control2-002.png" /> 
                        </td> 
                        <td style="width: 37px">  
                                        <asp:Label ID="Label1" runat="server" 
                                            Text="LINE :" CssClass="captionField" Width="33px"></asp:Label></td>  
                        <td style="width: 41px">  
                            <telerik:RadComboBox ID="rcbLine" runat="server" AutoPostBack="False" CssClass="textContent" 
                                            Skin="Office2007" Width="87px" OnSelectedIndexChanged="rcbLine_SelectedIndexChanged">  
                                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                        </telerik:RadComboBox> 
                        </td> 
                        <td style="width: 2px">  
                        </td> 
                        <td> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
        <tr style="font-size: 12pt" align = "left">  
            <td style="width: 805px">  
                <asp:Panel ID="pnlGrid" runat="server" Height="520px" ScrollBars="Auto" Width="837px">  
                  
                      
                     
 
                      
                    <telerik:RadGrid runat="server"  AutoGenerateColumns="False" ID="dgDTL" OnNeedDataSource = "dgDTL_NeedDataSource" 
                    Skin="WebBlue" AllowFilteringByColumn="True" AllowSorting="True" PageSize="15"   
                    ShowStatusBar="True" ShowFooter="True" AllowMultiRowSelection = "True" AllowPaging ="True" 
                    GridLines="None" OnItemDataBound="dgDTL_ItemDataBound" Font-Names = "Tahoma" OnItemCreated="dgDTL_ItemCreated" OnColumnCreating="dgDTL_ColumnCreating" OnItemCommand="dgDTL_ItemCommand" En> 
                        <PagerStyle Mode="NextPrevAndNumeric" /> 
                        <MasterTableView DataKeyNames ="fxISTResponseKey">  
                            <HeaderStyle Width="150px" /> 
                            <RowIndicatorColumn Visible="True">  
                                <HeaderStyle Width="20px" /> 
                            </RowIndicatorColumn> 
                            <ExpandCollapseColumn> 
                                <HeaderStyle Width="20px" /> 
                            </ExpandCollapseColumn> 
                              
                            <Columns>    
                              
                            <telerik:GridClientSelectColumn Reorderable="False" UniqueName="ClientSelectColumn">  
                            </telerik:GridClientSelectColumn>                        
                            <telerik:GridBoundColumn Visible = "False" DataField="fxMemberKeyISS" HeaderText="ISSUER" SortExpression="fxMemberKeyISS" UniqueName="fxMemberKeyISS" Aggregate="Count">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn  DataField="IssBank" HeaderText="ISSUER" SortExpression="IssBank" UniqueName="IssBank">  
                                
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn Visible = "False" DataField="fxMemberKeyACR" HeaderText="ACQUIRER" SortExpression="fxMemberKeyACR" UniqueName="fxMemberKeyACR" Aggregate="Count">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="AcqBank" HeaderText="ACQUIRER" SortExpression="AcqBank" UniqueName="AcqBank">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="TRF" HeaderText="TRF" SortExpression="TRF" UniqueName="TRF">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fnTerminalNumber" HeaderText="TERM NO" SortExpression="fnTerminalNumber" 
                                UniqueName="fnTerminalNumber">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fnTraceNumber" HeaderText="TRACE NO. ISSUER/ACQUIRER/TRF" SortExpression="fnTraceNumber" 
                                UniqueName="fnTraceNumber">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fnCardNumber" HeaderText="CARD NO." SortExpression="fnCardNumber" 
                                UniqueName="fnCardNumber">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fcPCode" HeaderText="TRANS TYPE" SortExpression="fcPCode" 
                                UniqueName="fcPCode" Visible = "False">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fcTransTypeName" HeaderText="TRANS TYPE" SortExpression="fcTransTypeName" 
                                UniqueName="fcTransTypeName">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridDateTimeColumn DataField="fdTransDate" HeaderText="DATE" SortExpression="fdTransDate"    
                                DataFormatString="{0:d}" UniqueName="fdTransDate" > 
                            </telerik:GridDateTimeColumn > 
                  
                      
                            <telerik:GridBoundColumn DataField="fdTransTime" HeaderText="TIME" SortExpression="fdTransTime" 
                                DataFormatString="{0:T}" UniqueName="fdTransTime">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fxISTResponseKey_Res" HeaderText="TRAN CLASSF" SortExpression="fxISTResponseKey_Res" 
                                UniqueName="fxISTResponseKey_Res" Visible="False">  
                            </telerik:GridBoundColumn> 
                              
//i'm having error here object not set to instance of an object                           
<custom:MyCustomFilteringColumn DataField="fcISTResponseMsg" HeaderText="TRAN CLASSF" UniqueName="fcISTResponseMsg"/>  
                              
                              
                              
                            <telerik:GridBoundColumn DataField="fcISTResponseMsg" HeaderText="TRAN CLASSF" SortExpression="fcISTResponseMsg" 
                                UniqueName="fcISTResponseMsg">  
                            </telerik:GridBoundColumn> 
                                 
                          
 
                            <telerik:GridBoundColumn DataField="fnAccountNumFrom" HeaderText="ACCOUNT FROM" SortExpression="fnAccountNumFrom" 
                                UniqueName="fnAccountNumFrom">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridBoundColumn DataField="fnAccountNumTo" HeaderText="ACCOUNT TO" SortExpression="fnAccountNumTo" 
                                UniqueName="fnAccountNumTo">  
                            </telerik:GridBoundColumn> 
                            <telerik:GridNumericColumn  DataField="fnTransAmount" DataType="System.Decimal" HeaderText="AMOUNT" SortExpression="fnTransAmount" 
                                UniqueName="fnTransAmount" Aggregate ="Sum" NumericType="Number">  
                                <FooterStyle Font-Bold="True" /> 
                            </telerik:GridNumericColumn> 
                            <telerik:GridNumericColumn  DataField="fnTransFee" DataType="System.Decimal" HeaderText="FEES" SortExpression="fnTransFee" 
                                UniqueName="fnTransFee" NumericType="Number">  
                                <FooterStyle Font-Bold="True" /> 
                            </telerik:GridNumericColumn> 
                            <telerik:GridNumericColumn  DataField="fnAmountReverse" DataType="System.Decimal" HeaderText="AMOUNT REVERSE" SortExpression="fnAmountReverse" 
                                UniqueName="fnAmountReverse" Aggregate ="Sum" NumericType="Number">  
                                <FooterStyle Font-Bold="True" /> 
                            </telerik:GridNumericColumn> 
                            <telerik:GridNumericColumn  DataField="fnAmountDispense" DataType="System.Decimal" HeaderText="AMOUNT DISPENSE" 
                                SortExpression="fnAmountDispense" UniqueName="fnAmountDispense" Aggregate ="Sum" NumericType="Number">  
                                <FooterStyle Font-Bold="True" /> 
                            </telerik:GridNumericColumn> 
                            <telerik:GridNumericColumn  DataField="fnAmountRecon" DataType="System.Decimal" HeaderText="RECON AMOUNT" SortExpression="fnAmountRecon" 
                                UniqueName="fnAmountRecon" Aggregate ="Sum" NumericType="Number">  
                                <FooterStyle Font-Bold="True" /> 
                            </telerik:GridNumericColumn> 
                 
                            <telerik:GridBoundColumn DataField="fxTransStatusKey" HeaderText="STATUS" SortExpression="fxTransStatusKey" 
                                UniqueName="fxTransStatusKey">  
                            </telerik:GridBoundColumn> 
                              
                            <telerik:GridBoundColumn DataField="fxDTLRemarksKey" HeaderText="REMARKS" SortExpression="fxDTLRemarksKey" 
                                UniqueName="fxDTLRemarksKey">  
                            </telerik:GridBoundColumn> 
                              
                            <telerik:GridBoundColumn DataField="fxChannelKey" HeaderText="CHANNEL" SortExpression="fxChannelKey" 
                                UniqueName="fxChannelKey">  
                            </telerik:GridBoundColumn> 
                              
                            <telerik:GridBoundColumn DataField="fcMsgNumber" HeaderText="fcMsgNumber" SortExpression="fcMsgNumber" 
                                UniqueName="fcMsgNumber" Visible ="False">  
                            </telerik:GridBoundColumn> 
                              
                            <telerik:GridBoundColumn DataField="fxISTResponseKey_Rev" HeaderText="fxISTResponseKey_Rev" SortExpression="fxISTResponseKey_Rev" 
                                UniqueName="fxISTResponseKey_Rev" Visible ="False">  
                            </telerik:GridBoundColumn> 
                                    
                                   
                                      
 
                        </Columns> 
                          
                        </MasterTableView> 
                        <ClientSettings AllowColumnsReorder="True" AllowKeyboardNavigation="True" ReorderColumnsOnClient="True">  
                            <Selecting AllowRowSelect="True" /> 
                            <Resizing AllowColumnResize="True" AllowRowResize="True" /> 
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" FrozenColumnsCount="1">  
                            </Scrolling> 
                        </ClientSettings> 
                        <FilterMenu EnableTheming="True" Skin="Vista">  
                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                        </FilterMenu> 
                    </telerik:RadGrid></asp:Panel> 
            </td> 
        </tr> 
        <tr style="font-size: 12pt">  
            <td style="width: 805px">  
                <div align = "right">  
                    &nbsp;  
                    <asp:Button ID="btnUndo" runat="server" CssClass="captionField" Text="UNDO" OnClick="btnUndo_Click" Width="135px" /> 
                    <asp:Button ID="btnCommitChanges" runat="server" CssClass="captionField" Text="COMMIT CHANGES" OnClick="btnCommitChanges_Click" /></div></td> 
        </tr> 
        <tr style="font-size: 12pt">  
            <td style="width: 805px">  
                <table width="100%">  
                    <tr> 
                        <td> 
                            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                                <AjaxSettings> 
                                   <telerik:AjaxSetting AjaxControlID="dgDTL">  
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="dgDTL" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                        <telerik:AjaxSetting AjaxControlID="clrFilters">  
                                            <UpdatedControls> 
                                                <telerik:AjaxUpdatedControl ControlID="dgDTL" /> 
                                                <telerik:AjaxUpdatedControl ControlID="clrFilters" /> 
                                            </UpdatedControls> 
                                        </telerik:AjaxSetting> 
                                </AjaxSettings>   
                            </telerik:RadAjaxManager> 
                            <telerik:RadMenu ID="mnuDTL" runat="server" OnItemClick="mnuDTL_ItemClick" Skin="WebBlue">  
                                <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            </telerik:RadMenu> 
                            &nbsp;</td> 
                    </tr> 
                </table> 
 
            </td> 
        </tr> 
    </table> 
 
 
</asp:Content> 
 
and here's my class

using System.Data.SqlClient;    
using System.Data;  
using Telerik.Web.UI ;  
using System.Web.UI.WebControls;  
using System.Web.UI;  
using System;  
using System.Collections;  
 
namespace RadGrid  
{  
    public class MyCustomFilteringColumn: GridBoundColumn   
    {  
        //Properties for boolean/checkbox dropdown    
        //public string TrueText { get;set;}  
        //public string FalseText { get; set; }  
 
        private object listDataSource = null;  
 
        //RadGrid will call this method when it initializes the controls inside the filtering item cells    
        protected override void SetupFilterControls(TableCell cell)  
        {  
            base.SetupFilterControls(cell);  
            cell.Controls.RemoveAt(0);  
 
            System.Web.UI.WebControls.DropDownList list = new System.Web.UI.WebControls.DropDownList();  
            list.ID = "list" + this.DataField;  
 
            list.Height = Unit.Pixel(300);  
            list.AutoPostBack = true;  
 
            list.SelectedIndexChanged += new EventHandler(list_SelectedIndexChanged);  
 
            cell.Controls.AddAt(0, list);  
            cell.Controls.RemoveAt(1);  
 
            //If boolean, assume CHECKBOX    
            if (this.DataType.ToString() == "System.Boolean")  
            {  
                DataTable dtBool = new DataTable();  
                dtBool.Columns.Add(this.DataField, Type.GetType("System.Boolean"));  
                dtBool.Columns.Add("description", Type.GetType("System.String"));  
 
                //Blank row    
                DataRow drBlank = dtBool.NewRow();  
                drBlank["description"] = "";  
                dtBool.Rows.Add(drBlank);  
 
                ////Checked row    
                //DataRow drTrue = dtBool.NewRow();  
                //drTrue["description"] = TrueText;  
                //drTrue[this.DataField] = 1;  
                //dtBool.Rows.Add(drTrue);  
 
                ////Unchecked row    
                //DataRow drFalse = dtBool.NewRow();  
                //drFalse["description"] = FalseText;  
                //drFalse[this.DataField] = 0;  
                //dtBool.Rows.Add(drFalse);  
 
                list.DataSource = dtBool;  
                list.DataTextField = "description";  
                list.DataValueField = this.DataField;  
                list.DataBind();  
 
            }  
            else  
            {  
                list.DataTextField = this.DataField;  
                list.DataValueField = this.DataField;  
 
                list.DataSource = this.ListDataSource;  
                list.DataBind();  
            }  
 
        }  
 
        void list_SelectedIndexChanged(object sender, EventArgs e)  
        {  
            GridFilteringItem filterItem = (sender as DropDownList).NamingContainer as GridFilteringItem;  
 
            this.SelectedValue = (sender as DropDownList).SelectedValue;  
            thisthis.FilteredColumnName = this.UniqueName;  
 
            if (this.UniqueName == "Index" || this.DataType.ToString() == "System.Boolean")  
            {  
                //this is example for filtering for integer column type    
                filterItem.FireCommandEvent("Filter", new Pair("EqualTo", this.UniqueName));  
            }  
            //filtering for string column type    
            filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName));  
 
        }  
        public object ListDataSource  
        {  
            get  
            {  
                return this.listDataSource;  
            }  
            set  
            {  
                listDataSource = value;  
            }  
        }  
        public string SelectedValue  
        {  
            get  
            {  
                object res = this.Owner.OwnerGrid.Page.Session["SelectedValue"];  
                if (res != null)  
                {  
                    return (string)res;  
                }  
                return "";  
            }  
            set  
            {  
                this.Owner.OwnerGrid.Page.Session["SelectedValue"] = value;  
            }  
        }  
        public string FilteredColumnName  
        {  
            get  
            {  
                object res = this.Owner.OwnerGrid.Page.Session["FilteredColumnName"];  
                if (res != null)  
                {  
                    return (string)res;  
                }  
                return "";  
            }  
            set  
            {  
                this.Owner.OwnerGrid.Page.Session["FilteredColumnName"] = value;  
            }  
        }  
        //RadGrid will call this method when the value should be set to the filtering input control(s)    
        protected override void SetCurrentFilterValueToControl(TableCell cell)  
        {  
            base.SetCurrentFilterValueToControl(cell);  
 
            System.Web.UI.WebControls.DropDownList list = (System.Web.UI.WebControls.DropDownList)cell.Controls[0];  
            if (this.CurrentFilterValue != string.Empty)  
            {  
                list.SelectedValue = this.CurrentFilterValue;  
            }  
        }  
 
        //RadGrid will call this method when the filtering value should be extracted from the filtering input control(s)    
        protected override string GetCurrentFilterValueFromControl(TableCell cell)  
        {  
            System.Web.UI.WebControls.DropDownList list = (System.Web.UI.WebControls.DropDownList)cell.Controls[0];  
 
            return list.SelectedValue;  
        }  
        public override GridColumn Clone()  
        {  
            return base.Clone();  
        }  
        protected override string GetFilterDataField()  
        {  
            return this.DataField;  
        }  
 
    }    
 
   }  
   
 
 
please help i cant configure what happen..

sample codes is highly appreciated
Sebastian
Telerik team
 answered on 11 May 2009
2 answers
188 views
I have an application in SharePoint that contains a RadGrid whoe edit item calls a RadWindow to get some external information.  This works fine when I run through testing in my visual studio environment, but as soon as I move it it's SharePoint home, it no longer returns the data.   The main page with the RadGrid works fine, it calls the RadWindow fine (and everything in it works as expected), but once I hit the submit button, the RadWindow just closes and the data does not seem to go back to the Parent Window.  

Ive based my code on this demo, and a various other links within the documentation that I can't fnd atm.   Is there something different that needs to be done for the values to be returned to the parent window in SharePoint?  

I'll try to give the main pieces of code blow:
First, from the main form:  the RadWindow declaration:
<telerik:RadWindowManager   
        ID="RadWindowManager1" ShowContentDuringLoad="false"    
        VisibleStatusbar="false" ReloadOnShow="true" runat="server">  
        <Windows> 
            <telerik:RadWindow ID="RadWindow1" Width="350px" Height="450px" Title="Choose Assignees" 
                Behaviors="Close" OnClientClose="OnClientClose"   
                NavigateUrl="/UserControls/ProposalTasks/PeoplePickerDialog.aspx" Modal="True">  
            </telerik:RadWindow> 
        </Windows> 
</telerik:RadWindowManager> 

The field within the RadGrid that needs the data (note the inner Javascript is storing these clientIDs in an array for easy access) :
<telerik:GridTemplateColumn HeaderText="Assigned To" UniqueName="ASSIGNED_TO"   
                            SortExpression="ASSIGNED_TO" DataField="ASSIGNED_TO">  
                            <EditItemTemplate> 
                                 <script type="text/javascript">  
                                     registeredTbAssignedElements.push('<%# Container.FindControl("rtbAssigned").ClientID %>');   
                                 </script>    
                                 <telerik:RadTextBox ID="rtbAssigned" runat="server" Rows="1" Columns="50" 
                                        Text='<%#Bind("ASSIGNED_TO")%>' TextMode="MultiLine" > 
                                 </telerik:RadTextBox> 
                                 <asp:Button ID="btnGetNames" runat="server" Text="^" /> 
                            </EditItemTemplate> 
                            <ItemTemplate> 
                                <asp:Label ID="lblAssignees" runat="server"   
                                    Text='<%# Eval("ASSIGNED_TO") %>'></asp:Label> 
                            </ItemTemplate> 
                        </telerik:GridTemplateColumn> 

The JavaScript related to the RadGrid on the arent page:
<script type="text/javascript">  
    //global DOM ID registry for our rtbAssigned control.  filled up by scripts rendered from template fields.  
    var registeredTbAssignedElements = [];  
 
    // Rad Window functionality (for selecting assignees)  
    //<![CDATA[
    function openWin(radindex) {
        var tbAssignedclientID = registeredTbAssignedElements[radindex];
        var currText = $get(tbAssignedclientID);
        var oWnd = radopen("/UserControls/ProposalTasks/PeoplePickerDialog.aspx?rowIndex=" + radindex + "&currentText=" + currText.value, "RadWindow1");
    }
    function OnClientClose(oWnd, args) {
        //get the transferred arguments
        var arg = args.get_argument();
        if (arg) {
            var radIndex = arg.indexID;
            var assignees = arg.assignees;
            var existingAssignees = $find(registeredTbAssignedElements[radIndex]);
                existingAssignees.set_value(assignees);
        }
    }
       
    
    //]]> 
</script> 

The entier RadWindow Page that is called and it's Javascript:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PeoplePickerDialog.aspx.cs" Inherits="Proposal_Tasks.UserControls.ProposalTasks.PeoplePickerDialog" %> 
<%@ 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" > 
<script type="text/javascript">  
    function GetCurrentItemRequesting(sender, eventArgs) {  
        var context = eventArgs.get_context();  
        context["FilterString"] = eventArgs.get_text();  
    }  
    function GetRadWindow() {  
        var oWindow = null;  
        if (window.radWindow) oWindow = window.radWindow;  
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
        return oWindow;  
    }  
    function returnToParent() {  
        //create the argument that will be returned to the parent page  
        var oArg = new Object();  
          
        // get the Row ID  
        var textRowID = document.getElementById('txtRowID');  
        //get the names  
        var textbox = document.getElementById("<%=rtbStart.ClientID %>");   
 
        oArg.indexID = textRowID.value;  
        oArg.assignees = textbox.value;  
 
        //get a reference to the current RadWindow  
        var oWnd = GetRadWindow();  
 
        //Close the RadWindow and send the argument to the parent page  
        if (oArg.assignees) {  
            oWnd.close(oArg);  
        }  
    }  
</script> 
<head runat="server">  
    <title></title>  
 
</head> 
<body > 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadFormDecorator ID="RadFormDecorator1" Runat="server" /> 
 
        <fieldset id="fld1" > 
            <legend style="text-align:center" >Choose Assignees</legend> 
            <div style="margin: 5px 0 10px 0px; text-align:center;" > 
                 <telerik:RadTextBox ID="rtbStart" runat="server" Rows="3" Columns="35" 
                        TextMode="MultiLine" > 
                 </telerik:RadTextBox> 
                <telerik:RadComboBox ID="rcbAssigned" Runat="server" AccessibilityMode="True"   
                    Width="250px"  MaxHeight="225px" ShowMoreResultsBox="True" EnableLoadOnDemand="True"   
                    OnSelectedIndexChanged="rcbAssigned_SelectedIndexChanged"   
                    OnClientItemsRequesting="GetCurrentItemRequesting"   
                    AutoPostBack="True" > 
                <WebServiceSettings Method="ListADUsers" Path="/UserControls/WebServices/WSADUsers.asmx" /> 
                </telerik:RadComboBox> 
                <input id="txtRowID" type="hidden" runat="server" /> 
            </div> 
        </fieldset> 
        <div style="margin-top: 4px; text-align:right;">  
            <button title="Submit" style="margin-top: 26px;" id="close" onclick="returnToParent(); return false;">  
            Submit</button>      
        </div> 
    </form> 
</body> 
</html> 
 
and that page's code behind, as it does a little bit of the setup work (although I don't think it's related to the problem).:
       protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
            {  
                if (Request["currentText"] != null)  
                {  
                    rtbStart.Text = Request["currentText"];  
                }  
                if (Request["rowIndex"] != null)  
                {  
                    txtRowID.Value = Request["rowIndex"];  
                }  
            }  
        }  
 
        protected void rcbAssigned_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
            string newval = rcbAssigned.Text;  
            // add the selected user to the listing  
            string textboxValue = rtbStart.Text;  
            if (textboxValue.Trim() == "")  
                textboxValue = newval;  
            else  
                textboxValuetextboxValue = textboxValue + "; " + newval;  
            rtbStart.Text = textboxValue;  
        } 

I know it's a lot of code to digest at once, but I need help here.  As I said, all works perfect in the Visual Studio environment, but as soon as I move it to SharePoint the return variables don't work.   Anyone have any idea whats happening?

Thanks,
Russell.



Russ
Top achievements
Rank 1
 answered on 11 May 2009
1 answer
119 views
Hello,

I am working on a customers software and do replace his old grid with telerik rad grid. In his old grid, there was a filter that is new to me. There are two calender controls in a small pop-up window which opens on clicking on the filter. i choose a date on each calendar and all dates between these two dates were found.

is there any possibility to implement a feature like this on telerik rad grid?

thanks.
Sebastian
Telerik team
 answered on 11 May 2009
0 answers
79 views
I have a tree with three nodes: A, B, and C.  I click A so it is now selected. Now I drag B but the text under the cursor is still A. Then I drag C and the text under the cursor is B. This is a problem because the wrong nodes are being handled in the server-side NodeDrop event.

The demo online works fine (http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/draganddropnodes/defaultcs.aspx).  Is this a common/known issue, or does it sound like there's something else in my project influencing this behavior?


Edit: This was a known issue fixed in the latest release.  I'll upgrade later...
Kevin
Top achievements
Rank 1
 asked on 11 May 2009
2 answers
87 views
My client wants me to simulate a table of contents.  All nodes must be open initially without the ability to collapse them.  I need to hide the lines and "plus".  Each node will have context menus associated and must be clicable

I can accomplish most of this, but it seems dirty to me.

Is there a recommended way to make the treeview "fully expanded and non collapsible".  Hopefully I just missed a setting

Thanks
Tommy


Tommy
Top achievements
Rank 1
 answered on 11 May 2009
6 answers
148 views
Hi

I have a multiselect RadComboBox with a checkbox in the itemtemplate. The control is initially disabled but when I enable it the items stay disabled. Here is the code:-

function toggleFPs(chk)
{
var combo = $find("<%= cmbFPs.ClientID %>");
if (chk.checked)
combo.disable();
else
combo.enable();
}
...
<telerik:RadComboBox ID="cmbFPs" runat="server" Height="160px" Width="185px" 
Enabled="false" HighlightTemplatedItems="true" 
DataTextField="Username" DataValueField="UserID" 
OnClientLoad="selChange"
OnClientSelectedIndexChanged="selChange" 
EmptyMessage="Choose Finance partners">
<ItemTemplate>
<asp:CheckBox runat="server" ID="CheckBox" DataValueField="UserID" onclick="event.cancelBubble=true;" Text="" />
<%# Eval( "UserName") %>
</ItemTemplate>
</telerik:RadComboBox>
<asp:CheckBox ID="chkAllFPs" runat="server" Text=" All " Checked="true"
onclick="toggleFPs(this)" />
...

How do I enable the checkbox in the items? 

I also tried this and still couldnt check the boxes...

  var items = combo.get_items();
for (var i = 0; i < items.get_count(); i++) 
items.getItem(i).enable();

I am using ASP.NET Ajax Q2 2008.

Thanks.

Simon
Telerik team
 answered on 11 May 2009
1 answer
158 views
We dynamically create GridTemplateColumn with an inner usercontrol but my usercontrol does not get initialized so whenever I try to access the controls inside it, those are all null.

Is there something I miss??

Bellow is the page codebehind and the ItemTemplate class.

ConfigureGrid() 
{ 
...            OrenGrid.MasterTableView.Columns.Add(CreateItemTemplateColumn("Oren2")); 
... 
} 
 
 
private GridColumn CreateItemTemplateColumn(string fieldName) 
{ 
   GridTemplateColumn templateColumn = new GridTemplateColumn(); 
   templateColumn.ItemTemplate = new MyEditTempate(fieldName); 
   templateColumn.HeaderText = fieldName; 
   templateColumn.DataField = fieldName; 
   return (templateColumn); 
} 
 
 
internal class MyEditTempate : IBindableTemplate 
{ 
   private const string m_MyEditTemplateId = "MyEditTemplateTextBox"; 
 
   private readonly string m_FieldName; 
 
   public MyEditTempate(string fieldName) 
   { 
      m_FieldName = fieldName; 
   } 
 
   public void InstantiateIn(Control container) 
   { 
      Control control = container.Page.LoadControl(typeof(PerformanceObjectiveControl), new object[] { }); 
      control.ID = m_MyEditTemplateId; 
 
      control.DataBinding += DataBindControl; 
      container.Controls.Add(panel); 
      panel.Controls.Add(control); 
   } 
 
   private void DataBindControl(object sender, EventArgs e) 
   { 
      PerformanceObjectiveControl control = (PerformanceObjectiveControl)sender; 
      GridDataItem namingContainer = (GridDataItem)control.NamingContainer; 
      control.Text = ((DataRowView)namingContainer.DataItem)[m_FieldName].ToString(); 
   } 
 
   public IOrderedDictionary ExtractValues(Control container) 
   { 
      PerformanceObjectiveControl control = (PerformanceObjectiveControl)container.FindControl(m_MyEditTemplateId); 
      IOrderedDictionary dictionary = new OrderedDictionary(); 
      dictionary[m_FieldName] = control.Text; 
      return (dictionary); 
   } 
} 
 
 

The usercontrol PerformanceObjectiveControl only contains a asp:TextBox control and has a property called Text which (for now) is only a façade to the TextBox.Text itself.

Thanks,

Hugues
Georgi Krustev
Telerik team
 answered on 11 May 2009
3 answers
308 views
I'm binding a datatable to a radgrid that has 2 consistant columns but there are then 1 to n number of columns that have integers in. I want to total these up in the footer (group and overall footers) and then have a column at the far right that also tallys them up (so I have totals for horizontal and vertical and overal total in the bottom right).
I've looked in pretty much every event (column creating / column created etc) to do this, but cannot find anyway sum up these values into the footer / dynamic column.

Does anyone have any ideas?
Thanks.
Sebastian
Telerik team
 answered on 11 May 2009
7 answers
165 views
I would like to know how to place a control in the menu.. I want to integrate a radcombobox.... sort of like you have the search bar integrated into your (telerik) navbar.

I know how to do it in photoshop :)

the skin is Black... and pretty much standard..

the combobox would be populated by a couple fields in a table.. (but I have all the data streams worked out) i just need to know how to seamlessly place a radcombobox on the right side inside of a radmenu strip, regardless of there only being 2 or 3 items in the menu...

here is a link to the site where the menu is... you will see that there is only 1 item in the menu.. and the menu stretches to the width of the page... (980px in this case)

http://giovanniscoalfirepizza.com






sircutbreaker
Top achievements
Rank 1
 answered on 11 May 2009
1 answer
97 views
Hi,
       

 We need to generate columns for grid dynamicaly.We are thinking of using this grid. Just I want to confirm that after creating the grid dynamically(ItemTemplate and EditItemtemplate) in code, can we refer this grid object from client side, because our client wants sorting, paging and filtering functionality on client side.
             If your answer is yes then please let me know how to do it. It would be great help if you can provide us some sample application.
           if your answer is No then please let me know some other way to achieve this.
        
         
Apart from this we also want below functionality .Please check if this is possible or not with this grid.If possible please provide some sample application or reference.

  • Bulk Update functionality.-: I guess AllowMultiRowEdit property serve this purpose.
  • Can we achieve Bulk upade functionality from client side with runtime column generation ?
  • Row should go to edit mode on click of row.
  • Excel like navigation in grid cells.
  • On click of tab in last cell of editable row the cursor should move to next row which is in edit mode.


Quick reply would be appreciated as we need to provide the client estimate and cost as early as possible.


Thanks
Mahesh
Sebastian
Telerik team
 answered on 11 May 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?