Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
184 views
Hi I am really struggling to get my head around these tools using the supplied documentation.

I have what I think is a pretty common scenario. We have a tab strip with several dynamically loaded tabs, that use load on demand to fill in a page view. The page views all load a user webcontrol which contains a RadGrid. The RadGrid loads different data depending on the Category property assigned to teh user webcontrol.

Could someone please have a look at my code and tell me what I need to do to get the grid to work with the edit/update/cancel code in ajax? At the moment I think they are always posting back.

I have cut our code down to the bare essentials, it will not take long for Telerik to look. I have tried to read and understand the documentation on RadAjaxManager/RadProxyManager but do not know how I can set this to work properly sorry.

<!--test.aspx--> 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<%@ Register assembly="RadTabStrip.Net2" namespace="Telerik.WebControls" tagprefix="radTS" %> 
<%@ Register TagPrefix="uc" TagName="UserControl1" Src="UserControl1.ascx"%> 
 
<!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>Untitled Page</title> 
    <script type="text/javascript">  
    </script> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
       
    <asp:ScriptManager ID="ScriptManager" runat="server" /> 
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1">  
        <asp:Image runat="server" ID="LoadingImage1" ImageUrl="~/Ajax/Img/loading7.gif" AlternateText="Loading..." /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
    <script type="text/javascript">  
        function onTabSelecting(sender, args)  
        {     
            if (args.get_tab().get_pageViewID())  
            {args.get_tab().set_postBack(false);}  
        }  
    </script> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated">  
    </telerik:RadMultiPage> 
    <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" Skin="Office2007" OnTabClick="RadTabStrip1_TabClick" Orientation="HorizontalBottom">  
    </telerik:RadTabStrip> 
    <span id="spnDebug" runat="server">  
    </span> 
    </div> 
    </form> 
</body> 
</html> 
 
 
<!--test.aspx.cs--> 
using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
using Telerik.Web.UI;  
 
public partial class Test : System.Web.UI.Page  
{  
    protected void Page_Load(object sender, System.EventArgs e)  
    {  
        if (!Page.IsPostBack)  
        {  
              
            AddTab("Category 1");  
            AddTab("Category 2");  
            AddTab("Category 3");  
            if(RadTabStrip1.Tabs.Count > 0){AddPageView(RadTabStrip1.Tabs[0]);}  
              
        }  
    }  
 
    private void AddTab(string tabName)  
    {  
        RadTab tab = new RadTab();  
        tab.Text = tabName;  
        RadTabStrip1.Tabs.Add(tab);  
    }  
 
    protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e)  
    {  
        string userControlName = "UserControl1.ascx";  
        test_UserControl1 userControl = (test_UserControl1) Page.LoadControl(userControlName);  
        userControl.ID = e.PageView.ID + "_userControl";  
        userControl.Category = e.PageView.ID;  
        e.PageView.Controls.Add(userControl);  
    }  
 
    private void AddPageView(RadTab tab)  
    {  
        RadPageView pageView = new RadPageView();  
        pageView.ID = tab.Text;  
        RadMultiPage1.PageViews.Add(pageView);  
        tab.PageViewID = pageView.ID;  
    }  
 
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)  
    {  
        AddPageView(e.Tab);  
        e.Tab.PageView.Selected = true;  
    }  
      
      
}  
 
<!--User Control 1--> 
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UserControl1.ascx.cs" Inherits="test_UserControl1" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="Horizontal" AutoGenerateEditColumn="true" Skin="WebBlue" OnUpdateCommand="RadGrid1_UpdateCommand" OnItemDataBound="RadGrid1_ItemDataBound" OnNeedDataSource="RadGrid1_NeedDataSource">  
    <MasterTableView AutoGenerateColumns="True" EditMode="InPlace" TableLayout="Auto">  
        <RowIndicatorColumn Visible="False">  
            <HeaderStyle Width="20px"></HeaderStyle> 
        </RowIndicatorColumn> 
        <ExpandCollapseColumn Visible="False" Resizable="False">  
            <HeaderStyle Width="20px"></HeaderStyle> 
        </ExpandCollapseColumn> 
        <Columns> 
        </Columns> 
        <EditFormSettings> 
            <PopUpSettings ScrollBars="None"></PopUpSettings> 
        </EditFormSettings> 
    </MasterTableView> 
</telerik:RadGrid> 
<span id="spnDebug" runat="server"/>  
 
<!--UserControl1.ascx.cs--> 
using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Linq;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Linq;  
 
using Telerik.Web.UI;  
 
public partial class test_UserControl1 : System.Web.UI.UserControl  
{  
    public string Category{get;set;}  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        spnDebug.InnerHtml = "UC loaded at " + DateTime.Now.ToString() + "<br/>Category is " + Category + "<br/>";  
    }  
      
      
    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        ArrayList list = new ArrayList();  
        switch (Category)  
        {  
            case "Category 1":  
                list.Add("Cat1 Thing 1");  
                list.Add("Cat1 Thing 2");  
                list.Add("Cat1 Thing 3");  
                break;  
            case "Category 2":  
                list.Add("Cat2 Thing 1");  
                list.Add("Cat2 Thing 2");  
                list.Add("Cat2 Thing 3");  
                break;  
            case "Category 3":  
                list.Add("Cat3 Thing 1");  
                list.Add("Cat3 Thing 2");  
                list.Add("Cat3 Thing 3");  
                break;  
            default:  
                list.Add("Cat Unknown Thing 1");  
                break;  
        }  
        RadGrid1.DataSource = list;  
          
    }  
 
    protected void RadGrid1_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
    {  
        spnDebug.InnerHtml += "RadGrid1_UpdateCommand Called<br/>";  
    }  
 
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        spnDebug.InnerHtml += "RadGrid1_ItemDataBound Called<br/>";  
    }  
      
}  
 
Maria Ilieva
Telerik team
 answered on 08 Oct 2010
1 answer
77 views

I have a webpage that has a RadGrid on it (among other controls) and display a modal window when the user submits data. If the rows on the grid are less than 100 rows it all works fine. But if the row count is greater than 100 (or somewhere around 100, haven't got it to an exact figure) the parent webpage's control etc. all disappear and only once the modal window is closed does the parent window redisplay correctly.
Any ideas?

I am using the following javascript to display the window:

 

function OpenValidationWindow() {
    oWnd = window.radopen('../MarketDataPriceInputValidation.aspx', null);
    oWnd.show();
    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close);
    oWnd.SetSize(625, 600);
    //Adjust position of validation window
    oWnd.MoveTo(162.5, 110);
    //Set the callBack function to be called once the user has clicked on a button on the validation window
    oWnd.add_close(OnValidationWindowClose);
}

 

 

Georgi Tunev
Telerik team
 answered on 08 Oct 2010
1 answer
90 views
Dear Telerik Team,

I add during the page cycle (page_load event) templates for the alert and confirm dialog. This works good and I can use my own templates.

But how can I set the width and height properties for this windows? I try it by looking into the windowsCollection in debug time, but this templates aren't a part of it. If I try to set the first div in my templates to a width for example 600px the design of window corners/boarders are broken.

Thanks for your help.

Kind regards
Christian
Georgi Tunev
Telerik team
 answered on 08 Oct 2010
2 answers
68 views
Hello all,

I have RAD window in which i have form where i allow users to enter information, on that form i have 2 buttons "Save" and "Save & Add Another".

On the "Save & Add Another" i want to refresh the parent screen to refresh and grid and show the added information. I dont want to close the current RADwindow because user can add one more item. but in mean time i want parent screen to be refreshed with latest information thats been added.

let me know how i can do that.

Thanks in advance.
Georgi Tunev
Telerik team
 answered on 08 Oct 2010
1 answer
66 views
Hello,

I have a screen with number of opened radwindows. All winodws have the same TopLeft coordinate, whenever I minimize them, the mininized windows stack up into one "pile". Is there a way to separated the minimized windows ?

To reproduce :

http://demos.telerik.com/aspnet-ajax/window/examples/restrictionzone/defaultcs.aspx

try opening two windows at same location and minimize them.

10x.
Georgi Tunev
Telerik team
 answered on 08 Oct 2010
5 answers
351 views
Hi, does anybody know whether it is possible to set the VisibleOnPageLOad attribute via client script ? I haven't found an appropriate method in the client side api of the RadWindow.

Thanks very much,
Wolfgang
Georgi Tunev
Telerik team
 answered on 08 Oct 2010
1 answer
127 views
I have a web page and it has one textbox and button. User can enter specific url to textbox and clicking button opens a new telerik window. This popup window has cancel button and clicking that button close the window.

For example: When user navigates http://server1/testpage.aspx then user enters http://server1/newpopup.aspx then clicks open button and popup shows up then user clicks cancel button on the newpopup.aspx page window closes. When user types http://server2/newpopup.aspx popup shows up but clicking cancel button does not close the newpopup window and it gives access denied error message. This is not a cross browsing issue because I am trying to close popup window in the popup window control.

//Open popup
        protected void xcBrowseDes_Click(object sender, EventArgs e)
        {
            string destinationURL = txtDESTURL.Text.ToLower().Trim().TrimEnd(new char[] { '/' });
            ScriptManager.RegisterStartupScript(xcBrowseDes, typeof(string), "alertScript1", "Confirm('" + destinationURL+"');",true);
        }

//javascript
function Confirm(par) {

            var oWnd = radopen(par, "Browse");
            var width = $(window).width();
            if (width > 750)
                width = 750;

            oWnd.setSize(width - 15, $(window).height() - 15); 
            
            oWnd.center(true);
            oWnd.set_modal(false);
        }

//javascript closing popup window
  function GetRadWindowClose() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog 
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well) 

            oWindow.close();
        } 

I also tried just window.close() javascript method or self.close() but both methods did not close the window.


Georgi Tunev
Telerik team
 answered on 08 Oct 2010
2 answers
131 views
Hello Everyone,

I have a weird problem in editing a detail row from hierarchy grid.

Please check on attached screenshot for reference and for more details.

ASPX:
<rad:RadGrid runat="server" ID="gridCPDiag"
AllowPaging="True" AllowSorting="True"  PageSize="15"       AutoGenerateColumns="False" GridLines="None" BorderStyle="None"            Skin="Outlook" AllowMultiRowEdit="true" AllowMultiRowSelection="true"
OnNeedDataSource="gridCPDiag_NeedDataSource"
OnDetailTableDataBind="gridCPDiag_DetailTableDataBind"
OnInsertCommand="gridCPDiag_InsertCommand"
OnDataBound="gridCPDiag_Databound"
OnUpdateCommand="gridCPDiag_UpdateCommand"
OnItemCreated="gridCPDiag_ItemCreated"
OnDeleteCommand="gridCPDiag_DeleteCommand" OnItemDataBound="gridCPDiag_ItemDataBound"
OnPreRender="gridCPDiag_PreRender" 
OnItemCommand="gridCPDiag_ItemCommand">
            <MasterTableView Name="Master" DataKeyNames="cpd_id" CommandItemDisplay="Top" EditMode="InPlace" Width="100%">
                <CommandItemTemplate>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td style="width:60%">
                                <div style="padding:3px 4px 3px 4px">
                                    <table border="0" cellpadding="1" cellspacing="1">
                                        <tr style="font: normal 11px tahoma, Verdana, Helvetica, Sans-serif;vertical-align:middle">
                                            <td>
                                                <div class="toolbarIconDivider">|</div>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="master_btnAdd" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="InitInsert" ><img style="border:0px" alt="" src="../images/addemail.gif" /> Add</asp:LinkButton>
                                                <asp:LinkButton ID="master_lnkPerformInsert" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="PerformInsert" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                            </td>
                                            <td>
                                                <div class="toolbarIconDivider">|</div>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="master_btnEditSelected"  CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="EditSelected" ><img style="border:0px" alt="" src="../images/edit.gif" /> Edit</asp:LinkButton>
                                                <asp:LinkButton ID="master_btnUpdateEdited" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Update" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                <asp:LinkButton ID="master_btnCancel" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="CancelAll"  Visible="false" CausesValidation="false"><img style="border:0px" alt="" src="../images/cancel.gif" /> Cancel</asp:LinkButton>
                                            </td>
                                            <td>
                                                <div class="toolbarIconDivider">|</div>
                                            </td>
                                            <td>
                                                <asp:LinkButton ID="master_btnDelete" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Delete" OnClientClick="javascript:return confirm('Are you sure you want to delete this Clinical Pathway?')" ><img style="border:0px" alt="" src="../images/delete.gif" /> Delete</asp:LinkButton>
                                            </td>
                                            <td>
                                                <div class="toolbarIconDivider">|</div>
                                            </td>
                                            <td align="right">
                                               <asp:LinkButton id="master_PrintFriendly" ForeColor="Black" runat="server" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" ><img  style="border:0px" alt="" src="../images/print.gif" /> Printer Friendly Version</asp:LinkButton>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </td>
                        </tr>
                    </table>
                 </CommandItemTemplate>
                 <DetailTables>
                    <rad:GridTableView Name="Detail2"  DataKeyNames="cp_id" DataMember="visit"  CommandItemDisplay="Top" EditMode="InPlace" Width="100%">
                    <CommandItemTemplate>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td style="width:60%">
                                    <div style="padding:3px 4px 3px 4px">
                                        <table border="0" cellpadding="1" cellspacing="1">
                                            <tr style="font: normal 11px tahoma, Verdana, Helvetica, Sans-serif;vertical-align:middle">
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="det2_btnAdd" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="InitInsert"><img style="border:0px" alt="" src="../images/addemail.gif" /> Add</asp:LinkButton>
                                                    <asp:LinkButton ID="det2_lnkPerformInsert" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="PerformInsert" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                </td>
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="det2_btnEditSelected"  CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="EditSelected" ><img style="border:0px" alt="" src="../images/edit.gif" /> Edit</asp:LinkButton>
                                                    <asp:LinkButton ID="det2_btnUpdateEdited" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Update" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                    <asp:LinkButton ID="det2_btnCancel" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="CancelAll"  Visible="false" CausesValidation="false"><img style="border:0px" alt="" src="../images/cancel.gif" /> Cancel</asp:LinkButton>
                                                </td>
                                                <td>
                                                    <div class="toolbarIconDivider">|</div>
                                                </td>
                                                <td>
                                                    <asp:LinkButton ID="det2_btnDelete" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Delete"  OnClientClick="javascript:return confirm('Are you sure you want to delete this/these Clinical Pathway Visit Frequency?')" ><img style="border:0px" alt="" src="../images/delete.gif" /> Delete</asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </td>
                            </tr>
                        </table>
                     </CommandItemTemplate>                   
                        <DetailTables>
                            <rad:GridTableView  Name="Detail3" DataKeyNames="cpi_id" DataMember="instruction" CommandItemDisplay="Top" EditMode="InPlace" Width="100%">
                            <CommandItemTemplate>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td style="width:60%">
                                        <div style="padding:3px 4px 3px 4px">
                                            <table border="0" cellpadding="1" cellspacing="1">
                                                <tr style="font: normal 11px tahoma, Verdana, Helvetica, Sans-serif;vertical-align:middle">
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="det3_btnAdd" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="InitInsert" ><img style="border:0px" alt="" src="../images/addemail.gif" /> Add</asp:LinkButton>
                                                        <asp:LinkButton ID="det3_lnkPerformInsert" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="PerformInsert" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="det3_btnEditSelected"  CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="EditSelected" ><img style="border:0px" alt="" src="../images/edit.gif" /> Edit</asp:LinkButton>
                                                        <asp:LinkButton ID="det3_btnUpdateEdited" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Update" Visible="false"><img style="border:0px" alt="" src="../images/save.gif" /> Save</asp:LinkButton>
                                                        <asp:LinkButton ID="det3_btnCancel" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="CancelAll" Visible="false" CausesValidation="false"><img style="border:0px" alt="" src="../images/cancel.gif" /> Cancel</asp:LinkButton>
                                                    </td>
                                                    <td>
                                                        <div class="toolbarIconDivider">|</div>
                                                    </td>
                                                    <td>
                                                        <asp:LinkButton ID="det3_btnDelete" CssClass="mu" onmouseover="this.className='mo'" onmouseout="this.className='mu'" runat="server" CommandName="Delete"  OnClientClick="javascript:return confirm('Are you sure you want to delete this Clinical Pathway Instruction?')" ><img style="border:0px" alt="" src="../images/delete.gif" /> Delete</asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                    </td>
                                </tr>
                            </table>
                            </CommandItemTemplate>
                             
                            <Columns>
                            <rad:GridBoundColumn DataField="cpi_id" HeaderText="CPI_ID" UniqueName="CPI_ID" Visible="false"></rad:GridBoundColumn>
                            <rad:GridBoundColumn DataField="instructions" HeaderText="instructions" UniqueName="instructions" Visible="false"></rad:GridBoundColumn>
                            <rad:GridTemplateColumn HeaderText="Instructions" UniqueName="instructions" DataField="instructions">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "instructions")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="tbIns" runat="server" Text='<%# Bind( "instructions") %>' width="100%" TabIndex="1" TextMode="MultiLine" Rows="4"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="descValidator" Runat="server" Display="Dynamic" ControlToValidate="tbIns" ErrorMessage="* Required Field">
                                </asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <HeaderStyle Width="90%" />
                            </rad:GridTemplateColumn>
                            <rad:GridTemplateColumn HeaderText="Sort Order" UniqueName="sortorder" DataField="sortorder">
                                <ItemTemplate>
                                    <%# DataBinder.Eval(Container.DataItem, "sortorder")%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="tbSortOrder" runat="server" Text='<%# Bind( "sortorder") %>' width="30px" TabIndex="2"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="descValidator2" Runat="server" Display="Dynamic" ControlToValidate="tbSortOrder" ErrorMessage="* Required Field">
                                </asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" Display="Dynamic" ControlToValidate="tbSortOrder" ErrorMessage="Please enter a valid sort order number." ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                            </EditItemTemplate>
                            </rad:GridTemplateColumn>
                         </Columns>
                            </rad:GridTableView>
                        </DetailTables>
                     
                    <Columns>
                        <rad:GridBoundColumn DataField="cp_id" HeaderText="CP_ID" UniqueName="CP_ID" Visible="false"></rad:GridBoundColumn>
                        <rad:GridBoundColumn DataField="VisitFrequency" HeaderText="VisitFrequency" UniqueName="VisitFrequency" Visible="false"></rad:GridBoundColumn>
                        <rad:GridClientSelectColumn UniqueName="ClientSelectColumnDetail1"></rad:GridClientSelectColumn>
                        <rad:GridTemplateColumn HeaderText="Visit Frequency" UniqueName="VisitFrequency" DataField="VisitFrequency">
                            <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "VisitFrequency")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="tbVisit" runat="server" Text='<%# Bind( "VisitFrequency") %>' width="100%" TabIndex="1" ></asp:TextBox>
                                <asp:RequiredFieldValidator ID="descValidator" Runat="server" Display="Dynamic" ControlToValidate="tbVisit" ErrorMessage="* Required Field">
                            </asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <HeaderStyle Width="80%" />
                        </rad:GridTemplateColumn>
                        <rad:GridTemplateColumn HeaderText="Sort Order" UniqueName="Sortorder" DataField="Sortorder">
                            <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem, "Sortorder")%>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="tbVisitSortOrder" runat="server" Text='<%# Bind( "Sortorder") %>' width="30px" TabIndex="2" Visible="false"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="descValidator2" Runat="server" Display="Dynamic" ControlToValidate="tbVisitSortOrder" ErrorMessage="* Required Field" >
                            </asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" Display="Dynamic" ControlToValidate="tbVisitSortOrder" ErrorMessage="Please enter a valid sort order number." ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                        </EditItemTemplate>
                        </rad:GridTemplateColumn>               
 
                     </Columns>
                    </rad:GridTableView>
                 </DetailTables>
                  
               <Columns>
                    <rad:GridBoundColumn DataField="cpd_id" HeaderText="CPD_ID" UniqueName="CPD_ID" Visible="False"></rad:GridBoundColumn>
                    <rad:GridBoundColumn DataField="short_desc" HeaderText="short desc" UniqueName="short_desc" Visible="False"></rad:GridBoundColumn>
                    <rad:GridTemplateColumn HeaderText="Diagnosis" UniqueName="short_desc" DataField="short_desc">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "short_desc")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="tbDiag" runat="server" Text='<%# Bind( "short_desc") %>' Width="95%" TabIndex="1"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="descValidator" Runat="server" Display="Dynamic" ControlToValidate="tbDiag" ErrorMessage="* Required field">
                            </asp:RequiredFieldValidator>
                        </EditItemTemplate>
                        <HeaderStyle Width="20%" />
                    </rad:GridTemplateColumn>
                    <rad:GridTemplateColumn HeaderText="Description" UniqueName="long_desc" DataField="long_desc">
                        <ItemTemplate>
                            <%# DataBinder.Eval(Container.DataItem, "long_desc")%>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="tbDesc" runat="server" Text='<%# Bind( "long_desc") %>' Width="95%" TabIndex="2"></asp:TextBox>
                        </EditItemTemplate>
                        <HeaderStyle Width="80%" />
                    </rad:GridTemplateColumn>
                 </Columns>      
            </MasterTableView>
    <ClientSettings EnablePostBackOnRowClick="false">
       <Selecting AllowRowSelect="True"/>
       <ClientEvents />
    </ClientSettings>
     </rad:RadGrid>


Below is the C# code for master grid. 
protected void gridCPDiag_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)
{
            if (!e.IsFromDetailTable)
            {
                ClinicalPathway cp = new ClinicalPathway(AgencyId, BranchId);
                DataTable dt = cp.GetClinicalPathwayList();
                gridCPDiag.DataSource = dt.DefaultView;
            }
}
 
protected void gridCPDiag_PreRender(object sender, EventArgs e)
{
            if (gridCPDiag.MasterTableView.IsItemInserted || cpd_id <= 0) return;
 
            int currentPageIndex = gridCPDiag.CurrentPageIndex;
 
            for (int i = 0; i < gridCPDiag.PageCount; i++)
            {
                foreach (GridDataItem item in gridCPDiag.Items)
                {
                    if (cpd_id.Equals(Convert.ToInt32(item["cpd_id"].Text)))
                    {
                        item.Selected = true;
                        currentPageIndex = -1;
                        break;
                    }
                }
 
                if (currentPageIndex.Equals(-1))
                    break;
 
                currentPageIndex++;
                if (currentPageIndex >= gridCPDiag.PageCount)
                    currentPageIndex = 0;
                gridCPDiag.CurrentPageIndex = currentPageIndex;
                gridCPDiag.Rebind();
            }
}
 
protected void gridCPDiag_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e)
{
            GridDataItem dataItem = (GridDataItem)e.DetailTableView.ParentItem;
            switch (e.DetailTableView.DataMember)
            {
                case "visit":
                    {
                        string CPID = dataItem.GetDataKeyValue("cpd_id").ToString();
                        ClinicalPathway cp = new ClinicalPathway(AgencyId, BranchId);
                        DataTable dt = cp.GetVisitFreqByDiag(Convert.ToInt32(CPID));
                        e.DetailTableView.DataSource = dt.DefaultView;
                        break;
                    }
 
                case "instruction":
                    {
                        string CPDID = dataItem.GetDataKeyValue("cp_id").ToString(); 
                        ClinicalPathway cp = new ClinicalPathway(AgencyId, BranchId);
                        DataTable dt = cp.GetInstructionsByVisitFreq(Convert.ToInt32(CPDID));
                        e.DetailTableView.DataSource = dt.DefaultView;
                        break;
                    }
            }
        }
 
 
protected void gridCPDiag_ItemDataBound(object sender, Telerik.WebControls.GridItemEventArgs e)
{
            if (e.Item is GridCommandItem && e.Item.OwnerTableView.Name == "Master")
            {
                GridCommandItem diagcommandItem = (GridCommandItem)e.Item;
                LinkButton diagbtnAdd = (LinkButton)diagcommandItem.FindControl("master_btnAdd");
                LinkButton diaglnkPerformInsert = (LinkButton)diagcommandItem.FindControl("master_lnkPerformInsert");
                LinkButton diagbtnEditSelected = (LinkButton)diagcommandItem.FindControl("master_btnEditSelected");
                LinkButton diagbtnUpdateEdited = (LinkButton)diagcommandItem.FindControl("master_btnUpdateEdited");
                LinkButton diagbtnCancel = (LinkButton)diagcommandItem.FindControl("master_btnCancel");
                LinkButton diagbtnDelete = (LinkButton)diagcommandItem.FindControl("master_btnDelete");
                LinkButton diagbtnPrint = (LinkButton)diagcommandItem.FindControl("master_PrintFriendly");
 
                string printurl = "ClinicalPathways/ClinicalPathwaysrpt.aspx";
                diagbtnPrint.Attributes.Add("onclick", "javascript:window.open('" + printurl + "', '', '');");
 
                if (IsMasterExpanded || IsDetailExpanded)
                {
                    diagbtnAdd.Enabled=false;
                    diagbtnEditSelected.Enabled=false;
                    diagbtnDelete.Enabled = false;
                }
 
                if (hdnCommandName.Value == "master_initinsert" || hdnCommandName.Value == "master_editselected")
                {
                    diagbtnAdd.Visible = false;
                    diagbtnEditSelected.Visible = false;
                    diagbtnDelete.Visible = false;
                    diagbtnCancel.Visible = true;
                }
 
                if (hdnCommandName.Value == "master_initinsert")   
                    diaglnkPerformInsert.Visible = true;
 
                if (hdnCommandName.Value == "master_editselected")
                    diagbtnUpdateEdited.Visible = true;
 
                if (hdnCommandName.Value == "master_performinsert" || hdnCommandName.Value == "master_update" || hdnCommandName.Value == "master_cancelall")
                {
                    diagbtnAdd.Visible = true;
                    diagbtnEditSelected.Visible = true;
                    diagbtnDelete.Visible = true;
                    diaglnkPerformInsert.Visible = false;
                    diagbtnUpdateEdited.Visible = false;
                    diagbtnCancel.Visible = false;
                }
            }
 
            if (e.Item is GridCommandItem && e.Item.OwnerTableView.Name == "Detail2")
            {
                GridCommandItem visitcommandItem = (GridCommandItem)e.Item;
                LinkButton visitbtnAdd = (LinkButton)visitcommandItem.FindControl("det2_btnAdd");
                LinkButton visitlnkPerformInsert = (LinkButton)visitcommandItem.FindControl("det2_lnkPerformInsert");
                LinkButton visitbtnEditSelected = (LinkButton)visitcommandItem.FindControl("det2_btnEditSelected");
                LinkButton visitbtnUpdateEdited = (LinkButton)visitcommandItem.FindControl("det2_btnUpdateEdited");
                LinkButton visitbtnCancel = (LinkButton)visitcommandItem.FindControl("det2_btnCancel");
                LinkButton visitbtnDelete = (LinkButton)visitcommandItem.FindControl("det2_btnDelete");
 
                if (IsDetailExpanded)
                {
                    visitbtnAdd.Enabled = false;
                    visitbtnEditSelected.Enabled = false;
                    visitbtnDelete.Enabled = false;
                }
 
                if (hdnCommandName.Value == "det2_initinsert" || hdnCommandName.Value == "det2_editselected")
                {
                    visitbtnAdd.Visible = false;
                    visitbtnEditSelected.Visible = false;
                    visitbtnDelete.Visible = false;                   
                    visitbtnCancel.Visible = true;
                }
 
                if (hdnCommandName.Value == "det2_initinsert")
                    visitlnkPerformInsert.Visible = true;
 
                if (hdnCommandName.Value == "det2_editselected")
                    visitbtnUpdateEdited.Visible = true;      
                     
                if (hdnCommandName.Value == "det2_performinsert" || hdnCommandName.Value == "det2_update" || hdnCommandName.Value == "det2_cancelall")
                {
                    visitbtnAdd.Visible = true;
                    visitbtnEditSelected.Visible = true;
                    visitbtnDelete.Visible = true;
                    visitlnkPerformInsert.Visible = false;
                    visitbtnUpdateEdited.Visible = false;
                    visitbtnCancel.Visible = false;
                }
 
            }
 
            if (e.Item is GridCommandItem && e.Item.OwnerTableView.Name == "Detail3")
            {
                GridCommandItem inscommandItem = (GridCommandItem)e.Item;
                LinkButton insbtnAdd = (LinkButton)inscommandItem.FindControl("det3_btnAdd");
                LinkButton inslnkPerformInsert = (LinkButton)inscommandItem.FindControl("det3_lnkPerformInsert");
                LinkButton insbtnEditSelected = (LinkButton)inscommandItem.FindControl("det3_btnEditSelected");
                LinkButton insbtnUpdateEdited = (LinkButton)inscommandItem.FindControl("det3_btnUpdateEdited");
                LinkButton insbtnCancel = (LinkButton)inscommandItem.FindControl("det3_btnCancel");
                LinkButton insbtnDelete = (LinkButton)inscommandItem.FindControl("det3_btnDelete");
 
 
                if (hdnCommandName.Value == "det3_initinsert" || hdnCommandName.Value == "det3_editselected")
                {
                    insbtnAdd.Visible = false;
                    insbtnEditSelected.Visible = false;
                    insbtnDelete.Visible = false;
                    insbtnCancel.Visible = true;
                }
 
                if (hdnCommandName.Value == "det3_initinsert")
                    inslnkPerformInsert.Visible = true;
 
                if (hdnCommandName.Value == "det3_editselected")
                    insbtnUpdateEdited.Visible = true;
 
                if (hdnCommandName.Value == "det3_performinsert" || hdnCommandName.Value == "det3_update" || hdnCommandName.Value == "det3_cancelall")
                {
                    insbtnAdd.Visible = true;
                    insbtnEditSelected.Visible = true;
                    insbtnDelete.Visible = true;
                    inslnkPerformInsert.Visible = false;
                    insbtnCancel.Visible = false;
                }
            }
        }
 
protected void gridCPDiag_ItemCommand(object sender, GridCommandEventArgs e)
{
          if (e.CommandName == RadGrid.ExpandCollapseCommandName)
            {
                foreach (GridItem item in e.Item.OwnerTableView.Items)
                {
                    if (item.Expanded && item != e.Item)
                    {
                        item.Expanded = false;
                        this.ExpandedStates.Remove(item.ItemIndexHierarchical);
                        this.ClearExpandedChildren(item.ItemIndexHierarchical);
                    }
                }
 
                if (!e.Item.Expanded)
                {
                    this.ExpandedStates[e.Item.ItemIndexHierarchical] = true;
                }
                else
                {
                    this.ExpandedStates.Remove(e.Item.ItemIndexHierarchical);
                    this.ClearExpandedChildren(e.Item.ItemIndexHierarchical);
                }
 
                if (e.Item.OwnerTableView.Name == "Master")
                {
                    GridCommandItem commandItem = (GridCommandItem)gridCPDiag.MasterTableView.GetItems(GridItemType.CommandItem)[0];
                    LinkButton diagbtnAdd = (LinkButton)commandItem.FindControl("master_btnAdd");
                    LinkButton diagbtnEditSelected = (LinkButton)commandItem.FindControl("master_btnEditSelected");
                    LinkButton diagbtnDelete = (LinkButton)commandItem.FindControl("master_btnDelete");
 
                    if (!e.Item.Expanded)
                    {
                        IsMasterExpanded = true;
                        diagbtnAdd.Enabled = false;
                        diagbtnEditSelected.Enabled = false;
                        diagbtnDelete.Enabled = false;
                    }
                    else
                    {
                        IsMasterExpanded = false;
                        diagbtnAdd.Enabled = true;
                        diagbtnEditSelected.Enabled = true;
                        diagbtnDelete.Enabled = true;
                    }
 
                }
 
                if (e.Item.OwnerTableView.Name == "Detail2")
                {
                    int countOfExpandedItems = 0;
 
                    foreach (GridDataItem masterItem in gridCPDiag.MasterTableView.Items)
                    {
                        IsDetailExpanded = false;
                        if (masterItem.Expanded)
                        {
                            GridCommandItem commandItem = (GridCommandItem)masterItem.ChildItem.NestedTableViews[0].GetItems(GridItemType.CommandItem)[0];
                            LinkButton visitbtnAdd = (LinkButton)commandItem.FindControl("det2_btnAdd");
                            LinkButton visitbtnEditSelected = (LinkButton)commandItem.FindControl("det2_btnEditSelected");
                            LinkButton visitbtnDelete = (LinkButton)commandItem.FindControl("det2_btnDelete");
 
                            countOfExpandedItems += 1;
 
                            visitbtnAdd.Enabled = (e.Item.Expanded && countOfExpandedItems == 1);
                            visitbtnEditSelected.Enabled = (e.Item.Expanded && countOfExpandedItems == 1);
                            visitbtnDelete.Enabled = (e.Item.Expanded && countOfExpandedItems == 1);
                            IsDetailExpanded = true;
                        }                       
                    }                   
                }
            }
 
            if (e.Item.OwnerTableView.Name == "Master")
            {
 
                if (e.Item is GridCommandItem)
                {
                    if (e.CommandName == "InitInsert")
                        hdnCommandName.Value = "master_initinsert";
 
                    if (e.CommandName == "PerformInsert")
                        hdnCommandName.Value = "master_performinsert";
 
                    if (e.CommandName == "EditSelected")
                        hdnCommandName.Value = "master_editselected";
 
                    if (e.CommandName == "Update")
                        hdnCommandName.Value = "master_update";
                     
                    if (e.CommandName == "CancelAll")
                        hdnCommandName.Value = "master_cancelall";
 
                    if (e.CommandName == "Delete")
                        hdnCommandName.Value = "master_delete";
                }
 
            }
                         
            if (e.Item.OwnerTableView.Name == "Detail2")
            {
                if (e.Item is GridCommandItem)
                {
                    GridDataItem parentItem = e.Item.OwnerTableView.ParentItem;
                    SelectedCPDiag = (int)(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["cpd_id"]);
 
                    if (e.CommandName == "InitInsert")
                    {
                        hdnCommandName.Value = "det2_initinsert";
                        if (!e.Item.Expanded)
                            IsMasterExpanded = true;
                        else
                            IsMasterExpanded = false;
                    }
 
                    if (e.CommandName == "PerformInsert")
                    {
                        hdnCommandName.Value = "det2_performinsert";
 
                        GridEditableItem insertedItem = e.Item.OwnerTableView.GetInsertItem();                       
                        if (insertedItem.IsInEditMode)
                        {
                            int cpv_id = 0;
                            cpv_id = InsertVisitFreq(insertedItem);
                            e.Item.OwnerTableView.Rebind();
                        }
                    }
 
                    if (e.CommandName == "EditSelected")
                    {
                        hdnCommandName.Value = "det2_editselected";
                        if (!e.Item.Expanded)
                            IsMasterExpanded = true;
                        else
                            IsMasterExpanded = false;
                    }
 
                    if (e.CommandName == "Update")
                    {
                        hdnCommandName.Value = "det2_update";
 
                        GridTableView table = (GridTableView)e.Item.OwnerTableView;
                        foreach (GridEditableItem editItem in table.GetItems(GridItemType.EditItem))
                        {
                            string cpid = editItem.GetDataKeyValue("cp_id").ToString();
                            TextBox txtVisitFreq = (TextBox)editItem.FindControl("tbVisit");
                            TextBox txtVisitSortOrder = (TextBox)editItem.FindControl("tbVisitSortOrder");
 
                            UpdateVisitFreq(cpid, txtVisitFreq.Text, Convert.ToInt32(txtVisitSortOrder.Text));
                            editItem.Edit = false;
                        }
                    }
                     
                    if (e.CommandName == "CancelAll")
                    {
                        hdnCommandName.Value = "det2_cancelall";
 
                    }
 
                    if (e.CommandName == "Delete")
                    {
                        hdnCommandName.Value = "det2_delete";
 
                        GridTableView table = (GridTableView)e.Item.OwnerTableView;
                        foreach (GridDataItem childitem in table.Items)
                        {
                            if (childitem.Selected)
                            {
                                int cpid = Convert.ToInt32(childitem.GetDataKeyValue("cp_id"));
                                string desc = childitem.Cells[3].Text;
                                DeleteVisitFreq(cpid, desc);
                            }
                        }
                        table.Rebind();
                    }
                }
 
            }
 
            if (e.Item.OwnerTableView.Name == "Detail3")
            {
                 
                    GridDataItem parentItem = e.Item.OwnerTableView.ParentItem;
                    SelectedCPVisitFreq = (int)(parentItem.OwnerTableView.DataKeyValues[parentItem.ItemIndex]["cp_id"]);
 
                    if (e.CommandName == "InitInsert")
                    {
                        hdnCommandName.Value = "det3_initinsert";
                        if (!e.Item.Expanded)
                            IsDetailExpanded = true;
                        else
                            IsDetailExpanded = false;
                    }
 
                    if (e.CommandName == "PerformInsert")
                    {
                        hdnCommandName.Value = "det3_performinsert";
 
                        GridEditableItem insertedItem = e.Item.OwnerTableView.GetInsertItem();
                        if (insertedItem.IsInEditMode)
                        {
                            int cpi_id = 0;
                            cpi_id = InsertVFIns(insertedItem);
                            e.Canceled = true;
                            e.Item.OwnerTableView.Rebind();
                        }
                    }
 
                    if (e.CommandName == "EditSelected")
                    {
                        hdnCommandName.Value = "det3_editselected";
                        if (!e.Item.Expanded)
                            IsDetailExpanded = true;
                        else
                            IsDetailExpanded = false;
                    }
 
                    if (e.CommandName == "Update")
                    {
                        hdnCommandName.Value = "det3_update";
 
                        GridTableView table = (GridTableView)e.Item.OwnerTableView;
                        foreach (GridEditableItem editItem in table.GetItems(GridItemType.EditItem))
                        {
                            string cpiid = editItem.GetDataKeyValue("cpi_id").ToString();
                            TextBox txtInstr = (TextBox)editItem.FindControl("tbIns");
                            TextBox txtSortOrder = (TextBox)editItem.FindControl("tbSortOrder");
 
                            UpdateVFIns(cpiid, txtInstr.Text, Convert.ToInt32(txtSortOrder.Text));
                            editItem.Edit = false;
                        }
                    }
 
                    if (e.CommandName == "CancelAll")
                    {
                        hdnCommandName.Value = "det3_cancelall";
                    }
 
                    if (e.CommandName == "Delete")
                    {
                        hdnCommandName.Value = "det3_delete";
 
                        GridTableView table = (GridTableView)e.Item.OwnerTableView;
                        foreach (GridDataItem childitem in table.Items)
                        {
                            if (childitem.Selected)
                            {
                                int cpid = Convert.ToInt32(childitem.GetDataKeyValue("cpi_id"));
                                string desc = childitem.Cells[2].Text;
                                DeleteVFIns(cpid, desc);
                            }
                        }
                        table.Rebind();
                    }
                }           
        }

I would really appreciate for any response.

Thanks!
Zel
Maria Ilieva
Telerik team
 answered on 08 Oct 2010
2 answers
80 views
Hello,

I have a simple RadGrid binded with a WCF Web Service like this:
<ClientSettings>
     <DataBinding Location="~/MyWCFWebService.svc" SelectMethod="GetListAndCount" SortParameterType="String" FilterParameterType="String"></DataBinding>
</ClientSettings>

1) I'm wondering how to set a default sort expression (client-side)?

2) Same question to set a default filter (client-side).

3) I noticed the sort behavior is different between server-side and client-side binding mode.
With a server side binding, when you sort a grid column the header back color is changing.
However with client side binding the header back color stays identical.
How is it possible to have same behavior in both case (header back color changing when the column is sorted)?

Thank you

Mike Taylor
Top achievements
Rank 1
 answered on 08 Oct 2010
1 answer
143 views
Hi,
 I have an object with hierarchy displayed below, and I need to bind to this using declarative binding in the ASPX page.

RootObject
   I_ StreetNames (collection)
          I_StreetID
  I_StreetName

Now I need to bind the DataTextField to StreetName and DataValueField to StreetID

Due to our architecture constraint I need to use object data source only. I would like to do a declarative binding.

I had tried the following options
ID="cboStreetName" DataSource='<%# Eval("StreetNames") %>' DataTextField="StreetName" DataValueField="StreetID" with the error
 Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control

DataSource='<%# DataBinder.Eval(Container,"StreetNames") %>' DataTextField="StreetName" DataValueField="StreetID"> with error
ASP.xxx_aspx' does not contain a property with the name 'StreetNames'

I am new to ASP.NET as well as Telerik Combobox.
I am working in ASP.NET 2.0 in Win XP enviroment.

Thanks in Advance
Murthy Meka


Developer
Top achievements
Rank 1
 answered on 08 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?