Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
Is it possible to capture the resources' selectedindexchanged event in the advanced insert form (i don't have a custom insert form)?. I have two resources and I want the 2nd resource's values to change when the 1st resource's selected index is changed.Please help.
Peter
Telerik team
 answered on 29 Dec 2008
1 answer
99 views
In the old RadControls (2008 Q1).   I had code to add ajax settings from within a usercontrol to the ajaxmanager on the containing page. (Senario is I have a set of dynamically created controls for different cultures, and one field for each culture does apostback to check the value is unique in database).

When I upgraded to AJAX controls (2008 Q3), this no longer works as it used to, it does the Ajax Postback and displays the loading bar as expected, but after the ajax call has finished the field disappears, any reason why?


This is where the AjaxSetting is added in the Page_Load of my User Control, If i comment this out the ajax of the outer containing panel handles the ajax call and everything is fine, but this is added in the page not the user control?

 

 

 

Dim oAjaxManager As Telerik.Web.UI.RadAjaxManager

 

oAjaxManager = RadAjaxManager.GetCurrent(Page)

 

 

Dim oAjaxLoadingBar As Telerik.Web.UI.RadAjaxLoadingPanel

 

oAjaxLoadingBar = Page.FindControl(

"AjaxLoadingBar")

 


If Not IsNothing(oFriendlyURL) And Not IsNothing(oFriendlyURLError) Then  
     oAjaxManager.AjaxSettings.AddAjaxSetting(oFriendlyURL, oFriendlyURL, Nothing)  
     oAjaxManager.AjaxSettings.AddAjaxSetting(oFriendlyURL, oFriendlyURLError, oAjaxLoadingBar)  
End If 


 

Maria Ilieva
Telerik team
 answered on 29 Dec 2008
1 answer
43 views
I'm working with gantt chart. With a column which display during time of a working . I want to write time start at button of this column and time to stop at top of this column. But i don't know to how to do this ? Can't you give me a solution for this problem ?
Thanks!
Giuseppe
Telerik team
 answered on 29 Dec 2008
1 answer
67 views
Our application which supports both IE 6 and IE 7 is experiencing some problems with IE 6...

Please see this video ( http://uk.youtube.com/watch?v=x_jaqKbSwLA ) of the behaviour experienced. If you pay particular attention to the bottom right of the screen. to the circular icons appearing on our page. these icons are wrapped in a div tag which is set to float:right, position:absolute; you'll notice that when we resize the window the icons jump all over the place,

This seems to be a problem with the RadSplitter as when we extracted out the HTML being used within this radpane we arent experiencing this problem. the same goes for running the whole thing in IE7, we arent seeing this problem.

Any help would be most appreciate, i can provide you with sample code if required.
Cheers
Svetlina Anati
Telerik team
 answered on 29 Dec 2008
3 answers
130 views

I think this behavior is a bug. Try to do the same to replicate it. 

<telerik:RadGrid ID="RadGrid1" runat="server" 
            onneeddatasource="RadGrid1_NeedDataSource"   
        Skin="Office2007" AllowFilteringByColumn="True" AllowPaging="True"   
        AllowCustomPaging="True" VirtualItemCount="10000" 
        AllowSorting="True" GridLines="None" oncolumncreated="RadGrid1_ColumnCreated"   
        ShowFooter="True" onsortcommand="RadGrid1_SortCommand"   
        onitemdatabound="RadGrid1_ItemDataBound"   
        onitemcommand="RadGrid1_ItemCommand"  EnableLinqExpressions="false">  
          
<HeaderContextMenu Skin="Office2007" EnableTheming="True">  
<ExpandAnimation Type="None" Duration="0" /> 
<CollapseAnimation Type="None" Duration="0" /> 
</HeaderContextMenu> 
 
        <PagerStyle Mode="NextPrevNumericAndAdvanced" /> 
 
<MasterTableView EnableHeaderContextMenu="true" AllowMultiColumnSorting="True" AllowCustomSorting="true" ClientDataKeyNames="n_id,n_code_name,n_nug_typ_id" > 
<RowIndicatorColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn> 
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
</MasterTableView> 
 
        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowRowsDragDrop="true" EnableRowHoverStyle="true" > 
            <Selecting AllowRowSelect="True" /><ClientEvents OnRowDblClick="RowDblClick" /> 
            <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
            <Resizing AllowRowResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="True"></Resizing> 
        </ClientSettings> 
 
<FilterMenu Skin="Office2007" EnableTheming="True">  
<ExpandAnimation Type="None" Duration="0" /> 
<CollapseAnimation Type="None" Duration="0" /> 
</FilterMenu> 
    </telerik:RadGrid> 
      
 

My dataset has 15 columns. Only the first 4 columns are displayed. The rest are available through client side header menu. (New feature of you 3q 2008 grid). The fourth column (last visible) has a name n_date_created. When I click the img of calendar (filter row), nothing happens. But this happens only when my datasource is implicitly sorted by this column! When this column is not participate in multicolumn sorting, calendar popups.

My code (only interesting parts) :

During NeedDataSource this code does nothing interesting from your point of view:
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)  
        {  
            int dbAttributesCount, i, j;  
            DataTable dtMetadata;  
 
            // získání dat  
            this.ReadQueryAndRun();  
 
            dbAttributesCount = this.dsTranslatedAttributes.Tables[0].Rows.Count;  
            dtMetadata = this.dsTranslatedAttributes.Tables[0];  
            DataColumn dataColumn;  
 
            i = 0;  
            while (i < this.dsData.Tables[0].Columns.Count)  
            {  
                dataColumn = this.dsData.Tables[0].Columns[i];  
 
                for (j = 0; j < dbAttributesCount; j++)  
                {  
                    if (dataColumn.ColumnName == (string)dtMetadata.Rows[j]["code_name"])  
                        break;  
                }  
 
                if ((j == dbAttributesCount) && (this.dsData.Tables[0].Columns[i].ColumnName != "renderStatus"))  
                    this.dsData.Tables[0].Columns.Remove(dataColumn);  
                else  
                    i++;  
            }  
 
            thisthis.RadGrid1.DataSource = this.dsData.Tables[0];  
        } 

I am hiding some columns and not displaying another columns according to the definition from elsewhere during columCreated event:
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)  
        {  
            // zkusí se dohledat pÅ™ekládaná popiska sloupce  
              
            DataRow[] foundRows;  
            XmlNode xnColumn;  
 
            string columnUniqueName;  
 
            columnUniqueName = e.Column.UniqueName;  
 
            if (columnUniqueName != "ExpandColumn")  
            {  
                // nastavení pÅ™ekládaného záhlaví sloupce  
                if (this.dsTranslatedAttributes != null)  
                {  
                    foundRows = this.dsTranslatedAttributes.Tables[0].Select("code_name = '" + columnUniqueName + "'");  
                    if (foundRows.Length > 0)  
                    {  
                        e.Column.HeaderText = (string)foundRows[0]["name"];  
                    }  
 
                    // skrytí sloupce, který není tÅ™eba ukazovat  
                    if (columnUniqueName == "renderStatus")  
                        e.Column.Visible = false;  
 
                    // nastavení viditelnosti jednotlivých sloupců dle definice v dotazu  
                    e.Column.Display = false;  
 
                    if (columnUniqueName != null && columnUniqueName != "")  
                    {  
                        xnColumn = this.xdQuery.SelectSingleNode("//list/grid[@type='nuggets']/columns/col[@name='" + columnUniqueName + "']");  
                        if (xnColumn != null)  
                        {  
                            // nastavení viditelnosti jednotlivých sloupců dle definice v dotazu  
                            if (xnColumn.Attributes["state"] != null && xnColumn.Attributes["state"].Value == "1")  
                                e.Column.Display = true;  
                            else  
                                e.Column.Display = false;  
                        }  
                    }  
                }  
            }  
        } 

I am replacing some columns of some rows when the user has not enough rights during ItemDataBound event:

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
        {  
            GridDataItem dataItem;  
            long nuggetId;  
            string attCodeName;  
              
            if (this.gnl.containsNuggetsWithAPActivated)  
            {  
                if (e.Item is GridDataItem)  
                {  
                    dataItem = (GridDataItem)e.Item;  
                    nuggetId = long.Parse(dataItem["n_id"].Text);  
 
                      
 
                    this.gnl.alNuggetsWithAPActivated.Contains(nuggetId.ToString());  
                    {  
                        // vÅ¡echna metadata musí být dohledána v dsCheckedAttributes, jinak je nutné je vyeliminovat  
 
                        int attributeCount = this.dsTranslatedAttributes.Tables[0].Rows.Count;  
                        for (int i = 0; i < attributeCount; i++)  
                        {  
 
                            // nÄ›které atributy jsou viditelné vždy  
                            attCodeName = (string)this.dsTranslatedAttributes.Tables[0].Rows[i]["code_name"];  
                            if (attCodeName != "n_id" && attCodeName != "n_nug_typ_id" && attCodeName != "renderStatus")   
                            {  
                                if (!(this.dsCheckedAttributes.Tables[0].Select("id = " + nuggetId.ToString() + " and code_name='" + attCodeName + "'").Length > 0))  
                                {  
                                    if (dataItem[attCodeName] != null)  
                                        dataItem[attCodeName].Text = "~RR~";  
                                }  
                            }  
 
                        }  
                    }  
                }  
            }  
        } 

When the grid is loaded for the first time, I do this (In my case, I am sorting by the n_date_created column): Little triangle appears in the right column of the grid (calendar column):
if (gnp.sortedColumn != null)  
                    {  
                        se = new GridSortExpression();  
                        se.FieldName = gnp.sortedColumn;  
                        if (gnp.sortedOrder == "asc")  
                            se.SortOrder = GridSortOrder.Ascending;  
                        else  
                            se.SortOrder = GridSortOrder.Descending;  
                        this.RadGrid1.MasterTableView.SortExpressions.Add(se);  
                    } 
Calendar filter column will NOT popup!!!!!!!!!!!!!!!!!!!!!!!!!!!!

HELP!

Thank you very much.

TOm
Rosen
Telerik team
 answered on 29 Dec 2008
1 answer
103 views
Hi,

I want to align all of the the toolbars on the editor towards the center. How can I do that?

I have a call out for the background color change here:

<script type="text/javascript">  
   function OnClientLoad(editor, args)  
   {  
      var style = editor.get_contentArea().style;  
      style.backgroundImage = "none";  
      style.backgroundColor = "white";  
   }  
    </script>  

Or do I make the change in the toolsfile.xml?

Thanks, Cam
Tervel
Telerik team
 answered on 29 Dec 2008
2 answers
144 views
Hi there -

I have a RADGrid in which I use GridTemplateColumns.  In one of these templates I have an EditItemTemplate that contains a RadComboBox, and RequiredFieldValidator and and ValidatorCalloutExetension.  The validator and callout work as expected when the grid is in edit mode until I add a RadAjaxManager to the page. 

With the RadAjaxManager the validator by itself works correctly, however, when I add the ValidatorCalloutExtension back in I start receiving a JavaScript error: Sys.ArgumentUndefinedException: Value cannot be undefined. Parameter name: id

The problem seems to lie with the ValidatorCalloutExtension and the RadAjaxManager - is this anyone else is aware of, is there a "trick" I've missed anywhere? 

I will try and put together a simplified code example to add to the post.

Many thanks,
Simon

Simon
Top achievements
Rank 1
 answered on 29 Dec 2008
9 answers
405 views
We've recently upgraded our RadEditor For SharePoint 2007 (Lite Version) from 4.3.1.0 to 4.5.4.0.  Everything went well for the most part except for the styles from within the rich text editor.  The editor is not displaying our custom CSS.

I did some tinkering and got it to work with Firefox and IE7.  However I was unsuccessful in correcting this issue in IE6.  Could you recommend a solution?

Here's an example of some of our CSS from the EditorContentArea.css:

(inserted at the bottom of file)
------

body {
    font: 10pt tahoma, arial, sans-serif;
    line-height: 14pt;
}


/* heading styles */
h1 {
    font: 20pt georgia, serif;
    margin: 10px 0 20px;
    padding: 0;
    letter-spacing: -1px;
    white-space: nowrap;
}

h2 {
    font: bold 12pt tahoma, arial, sans-serif;
    margin: 30px 0 0;
    padding-bottom: 3px;
    border-bottom: solid 1px #cacaca;
}
Stanimir
Telerik team
 answered on 29 Dec 2008
5 answers
159 views
We recently migrated our MOSS 2007 site to a new server. We had been using RadEditor Lite successfully on the site and it was being extensively in Wikis (lists). We installed the RadEditor on the new server as well.

Since moving our site to the new server the RadEditor has stopped working in the Wikis - both old and newly created ones. We have activated it to operate as the default editor in lists but it seems that the default is still the standard MOSS editor. I've checked the forum and help files and it was mentioned that you should look for the radeditorlist.ascx in the ControlTemplates folder. It's there.

Does anyone have any ideas? It seems to be the same installation on the new server but it isn't working.

Thanks,
Sam Gliksman
sgliksman@faculty.ncjhs.org
Stanimir
Telerik team
 answered on 29 Dec 2008
1 answer
126 views
I have a page with 2 grids on it.When you select a row on the first grid, a second grid related to the row is created. I use javascript to select the row and then call the radajaxmanager to rebind the second grid. I also have an insert button on the first grid. I have the radajaxmanager updating both grids. When I have the ajaxmanager updating both grids, the selected row does not remain highlighted. If I remove from the ajax manager, then after inserting a new record in the first grid, it does not rebind to show the new record. Here is my code:

function rowSelected(sender, eventArgs) { 
            var dataItem = $get(eventArgs.get_id()); 
            var grid = sender; 
            var MasterTable = grid.get_masterTableView(); 
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; 
            var id = MasterTable.getCellByColumnUniqueName(row, "package_id").innerHTML; 
            var description = MasterTable.getCellByColumnUniqueName(row, "descriptions").innerHTML; 
 
 
            var packageIDtxtbox = document.getElementById("packageID"); 
            packageIDtxtbox.value = id; 
 
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("PackageContents"); 
        } 
         
        function EditPackageContents() { 
            var packageIDtxtbox = document.getElementById("packageID"); 
            if (packageIDtxtbox != null) { 
                var pID = packageIDtxtbox.value; 
                var oWnd = window.radopen("entitlements.aspx?pID=" + pID +"&price=Y", "entitlements"); 
                oWnd.add_close(OnClientCloseEditContents); 
                var oArg = new Object(); 
 
                 
 
                //set the arguments that will be needed on the way back so they are not undefined 
                oWnd.argument = oArg; 
                return false; 
            } 
            return false; 
        } 
        function OnClientCloseEditContents(oWnd) { 
            // rebind the buildPackageGrid 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("PackageContents"); 
            } 
        function GetRadWindow() { 
             var oWindow = null; 
             if (window.radWindow) oWindow = window.radWindow; 
             else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
             return oWindow; 
         } 
 
 
         function ShowInsertForm() { 
 
             var oWnd = window.radopen("editPackageForm.aspx", "packageDialog"); 
             oWnd.setSize(800, 300); 
             oWnd.center(); 
 
             //set a function to be called when RadWindow is closed 
             oWnd.add_close(OnClientCloseEdit); 
             var oArg = new Object(); 
 
             oArg.packageID = -99; 
 
             //set the arguments that will be needed on the way back so they are not undefined 
             oWnd.argument = oArg; 
             return false; 
         } 
         function ShowEditForm(id, rowIndex) { 
             var grid = $find("<%= packageGrid.ClientID %>"); 
 
             var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); 
             grid.get_masterTableView().selectItem(rowControl, true); 
 
             var oWnd = window.radopen("editPackageForm.aspx?packageID=" + id, "packageDialog"); 
             oWnd.setSize(800, 300); 
             oWnd.center(); 
              
             oWnd.add_close(OnClientCloseEdit); 
             var oArg = new Object(); 
 
             oArg.packageID = id; 
 
             //set the arguments that will be needed on the way back so they are not undefined 
             oWnd.argument = oArg; 
             return false; 
         } 
         
         function OnClientCloseEdit(oWnd) { 
             //get the transferred arguments 
             var packageID = oWnd.argument.packageID; 
             if (packageID != -99) { 
                 // rebind grid 
                 var txtBoxPackageID = document.getElementById("packageID"); 
                 txtBoxPackageID.value = packageID; 
                 $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("PackageEdit"); 
             } 
 
 
         } 
             
 </script> 
    
   </telerik:RadScriptBlock>     
  
  
     <div> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"  
            onajaxrequest="RadAjaxManager1_AjaxRequest"  
            DefaultLoadingPanelID="RadAjaxLoadingPanel1"> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> 
                        <UpdatedControls> 
                            <telerik:AjaxUpdatedControl ControlID="packageGrid" /> 
                            <telerik:AjaxUpdatedControl ControlID="outdatedPackageGrid" /> 
                            <telerik:AjaxUpdatedControl ControlID="buildPackageGrid" /> 
                        </UpdatedControls> 
                 </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="packageID"> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="mainSplitter"> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="mainSplitter" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
               
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" Width="75px" Transparency="10"> 
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
        </telerik:RadAjaxLoadingPanel> 
   
        
        <telerik:RadSplitter ID= "mainSplitter" runat="server" Orientation="Vertical"  ResizeMode="AdjacentPane" width="100%"  
                VisibleDuringInit="false" Height="100%" ResizeWithParentPane="true"> 
         <telerik:RadPane id="leftPane" runat="server"    width="22"   minwidth="22" Scrolling="none"> 
           <telerik:RadSlidingZone id="SlidingZone1" runat="server"   clicktoopen="true"  DockedPaneId="sPackages" ExpandedPaneId="sPackages" > 
            <telerik:RadSlidingPane id="sPackages" title="Packages" runat="server" width="215"   Scrolling="Both" EnableResize="false" > 
              <telerik:RadGrid ID="packageGrid" runat="server"  Width="200px"  OnItemDataBound="RadGrid1_ItemDataBound" 
                    DataSourceID="SqlDataSourcePackages" AutoGenerateColumns="False"  OnItemCreated="packagesGrid_ItemCreated" 
                    GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" > 
                  <GroupingSettings CaseSensitive="false" /> 
                  <ClientSettings> 
                   <Selecting AllowRowSelect="true"  EnableDragToSelectRows="true" /> 
                   <ClientEvents  OnRowSelected="rowSelected" /> 
                  </ClientSettings>    
                
                   
                  <HeaderContextMenu EnableTheming="True"> 
                      <CollapseAnimation Duration="200" Type="OutQuint" /> 
                  </HeaderContextMenu> 
                  <MasterTableView CommandItemDisplay="Top" DataKeyNames="package_id" PageSize="25"> 
                      <RowIndicatorColumn> 
                          <HeaderStyle Width="20px" /> 
                      </RowIndicatorColumn> 
                      <ExpandCollapseColumn> 
                          <HeaderStyle Width="20px" /> 
                      </ExpandCollapseColumn> 
                      <CommandItemTemplate > 
                        <div style="padding:10px 5px;"> 
                         <asp:LinkButton  runat="server" id="addButton" OnClientClick="return ShowInsertForm(); return false;" > 
                         <img style="border:0px;vertical-align:middle;" alt="" src="Images/AddRecord.gif" />Add new package</asp:LinkButton> 
                 
                           &nbsp;&nbsp;&nbsp;&nbsp; 
                                            
                       </div> 
                      </CommandItemTemplate> 
                      <CommandItemSettings AddNewRecordText="Add new package"  /> 
                      <Columns> 
                      <telerik:GridTemplateColumn AllowFiltering="false" > 
           <HeaderStyle Width="20px" /> 
            <ItemTemplate> 
              <asp:imagebutton ID="EditPackageLink" runat="server" Text="Edit Package" src="Images/Edit.gif" ToolTip="Edit"></asp:imagebutton> 
            </ItemTemplate> 
           </telerik:GridTemplateColumn> 
                          <telerik:GridBoundColumn DataField="package_id" Display="false"  
                              UniqueName="package_id"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridTemplateColumn UniqueName="packageName" HeaderText="Package Name" > 
                           <ItemTemplate> 
                            <asp:Label ID="package_name" runat="server" Text='<%#Eval("package_name") %>'></asp:Label> 
                            <telerik:RadToolTip runat="server" ID="RadToolTip2" TargetControlID="package_name"  
                                Skin="Web20" ShowDelay="1000" AutoCloseDelay="200000" Font-Names="arial"  
                                Font-Size="XX-Large" BorderStyle="Inset" HideDelay="100000" ManualClose="False"  
                                Position="BottomRight" Sticky="True" Width="300"><asp:Label runat="server" ID="Label111"  Font-Bold="true" TabIndex="2" Text='<%#Eval("descriptions") %>' ></asp:Label><br/>  
                            </telerik:RadToolTip> 
                           </ItemTemplate> 
                          </telerik:GridTemplateColumn> 
                           
                          <telerik:GridBoundColumn DataField="descriptions" Display="false"  
                              UniqueName="descriptions"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridBoundColumn DataField="do_not_delete" Display="false"  
                              UniqueName="do_not_delete"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridDateTimeColumn DataField="start_date" Display="false" UniqueName="start_date"></telerik:GridDateTimeColumn> 
                          <telerik:GridDateTimeColumn DataField="end_date"  Display="false" UniqueName="end_date"></telerik:GridDateTimeColumn> 
                          <telerik:GridBoundColumn DataField="active" Display="false" UniqueName="active"></telerik:GridBoundColumn> 
                          <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  
                              ConfirmDialogType="RadWindow" ConfirmText="Delete this package?"  
                              ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteCol"> 
                          </telerik:GridButtonColumn> 
                      </Columns> 
                  </MasterTableView> 
                  <FilterMenu EnableTheming="True"> 
                      <CollapseAnimation Duration="200" Type="OutQuint" /> 
                  </FilterMenu> 
              </telerik:RadGrid> 
              <br /><br /> 
              <asp:Label runat="server" Text="Show outdated packages" AssociatedControlID="outdatedCB" ></asp:Label><asp:CheckBox runat="server" ID="outdatedCB" OnCheckedChanged="outdatedChanged" AutoPostBack="true" /> 
              <telerik:RadGrid ID="outdatedPackageGrid" runat="server"  Width="200px"  OnItemDataBound="RadGrid1_ItemDataBound" 
                    DataSourceID="SqlDataSourceOutdatedPackages" AutoGenerateColumns="False"  OnItemCreated="packagesGrid_ItemCreated" 
                    GridLines="None" AllowFilteringByColumn="True" AllowPaging="True" Visible="false" > 
                  <GroupingSettings CaseSensitive="false" /> 
                  <ClientSettings> 
                   <Selecting AllowRowSelect="true"  EnableDragToSelectRows="true" /> 
                   <ClientEvents  OnRowSelected="rowSelectedOutdated" /> 
                  </ClientSettings> 
                
                   
                  <HeaderContextMenu EnableTheming="True"> 
                      <CollapseAnimation Duration="200" Type="OutQuint" /> 
                  </HeaderContextMenu> 
                  <MasterTableView CommandItemDisplay="Top" DataKeyNames="package_id"> 
                      <RowIndicatorColumn> 
                          <HeaderStyle Width="20px" /> 
                      </RowIndicatorColumn> 
                      <ExpandCollapseColumn> 
                          <HeaderStyle Width="20px" /> 
                      </ExpandCollapseColumn> 
                      <CommandItemTemplate > 
                        <div style="padding:10px 5px;"> 
                        Outdated Packages 
                 
                           &nbsp;&nbsp;&nbsp;&nbsp; 
                                            
                       </div> 
                      </CommandItemTemplate> 
                      <CommandItemSettings AddNewRecordText="Add new package"  /> 
                      <Columns> 
                      <telerik:GridTemplateColumn AllowFiltering="false" > 
           <HeaderStyle Width="20px" /> 
            <ItemTemplate> 
              <asp:imagebutton ID="EditPackageLink" runat="server" Text="Edit Package" src="Images/Edit.gif" ToolTip="Edit"></asp:imagebutton> 
            </ItemTemplate> 
           </telerik:GridTemplateColumn> 
                          <telerik:GridBoundColumn DataField="package_id" Display="false"  
                              UniqueName="package_id"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridTemplateColumn UniqueName="packageName" HeaderText="Package Name" > 
                           <ItemTemplate> 
                            <asp:Label runat="server" ID="package_name" Text='<%#Eval("package_name") %>'></asp:Label> 
                            <telerik:RadToolTip runat="server" ID="RadToolTip2" TargetControlID="package_name"  
                                Skin="Web20" ShowDelay="1000" AutoCloseDelay="200000" Font-Names="arial"  
                                Font-Size="XX-Large" BorderStyle="Inset" HideDelay="100000" ManualClose="False"  
                                Position="BottomRight" Sticky="True" Width="300"><asp:Label runat="server" ID="Label111"  Font-Bold="true" TabIndex="2" Text='<%#Eval("descriptions") %>' ></asp:Label><br/>  
                            </telerik:RadToolTip> 
                           </ItemTemplate> 
                          </telerik:GridTemplateColumn> 
                           
                          <telerik:GridBoundColumn DataField="descriptions" Display="false"  
                              UniqueName="descriptions"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridBoundColumn DataField="do_not_delete" Display="false"  
                              UniqueName="do_not_delete"> 
                          </telerik:GridBoundColumn> 
                          <telerik:GridDateTimeColumn DataField="start_date" Display="false" UniqueName="start_date"></telerik:GridDateTimeColumn> 
                          <telerik:GridDateTimeColumn DataField="end_date"  Display="false" UniqueName="end_date"></telerik:GridDateTimeColumn> 
                          <telerik:GridBoundColumn DataField="active" Display="false" UniqueName="active"></telerik:GridBoundColumn> 
                          <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  
                              ConfirmDialogType="RadWindow" ConfirmText="Delete this package?"  
                              ConfirmTitle="Delete" Text="Delete" UniqueName="DeleteCol"> 
                          </telerik:GridButtonColumn> 
                      </Columns> 
                  </MasterTableView> 
                  <FilterMenu EnableTheming="True"> 
                      <CollapseAnimation Duration="200" Type="OutQuint" /> 
                  </FilterMenu> 
              </telerik:RadGrid> 
               
               
            </telerik:RadSlidingPane> 
           </telerik:RadSlidingZone> 
          </telerik:RadPane> 
          <telerik:RadSplitBar id="Radsplitbar3" runat="server" collapsemode="Forward"   /> 
          <telerik:RadPane id="contentPane" runat="server"  Scrolling="Y"    >  
           <telerik:RadAjaxPanel ID="Panel1" runat="server" BackColor="White">  
           <div id="PackageForm" runat="server" > 
             
           <table runat="server" id="totalBar" > 
            <tr> 
            <td  colspan="3"> 
                 
                <table cellpadding="0" cellspacing="0" class="style15" > 
                    <tr> 
                        <td> 
                            &nbsp;</td><td> 
                            &nbsp;</td><td> 
                            &nbsp;</td><td> 
                            &nbsp;</td><td> 
                            &nbsp;</td><td> 
                            &nbsp;</td></tr></table></td></tr><tr> 
                         
                    <td class="style13"> 
                        &nbsp;</td><td class="style14"> 
                    </td> 
                    <td class="style13"> 
                    </td> 
                         
                    </tr> 
                    <tr> 
                        <td class="style2"> 
                            </td> 
                        <td class="style3" colspan="2"> 
                            <telerik:RadGrid ID="buildPackageGrid" runat="server" visible="false" 
                                AllowFilteringByColumn="True" AllowPaging="True"  
                                DataSourceID="SqlDataSourceselectPackage" GridLines="None"  OnDataBound="buildPackageGrid_dataBound" 
                                OnItemDataBound="build_ItemDataBound" OnPreRender="buildPackageGrid_preRender"  
                                Width="633px"> 
                                <HeaderContextMenu EnableTheming="True"> 
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </HeaderContextMenu> 
                                <GroupingSettings CaseSensitive="false" /> 
                                <MasterTableView runat="server" AutoGenerateColumns="False" CommandItemDisplay="Top" 
                                    DataKeyNames="mid_id,mid_type_id" PageSize="12"> 
                                    <GroupByExpressions> 
                                        <telerik:GridGroupByExpression> 
                                            <GroupByFields> 
                                                <telerik:GridGroupByField FieldName="mid_type_name" SortOrder="Descending" /> 
                                            </GroupByFields> 
                                            <SelectFields> 
                                                <telerik:GridGroupByField FieldAlias="mid_type_name" FieldName="mid_type_name"  
                                                    HeaderText="Mid type" /> 
                                            </SelectFields> 
                                        </telerik:GridGroupByExpression> 
                                    </GroupByExpressions> 
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </RowIndicatorColumn> 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px" /> 
                                    </ExpandCollapseColumn> 
                                    <CommandItemTemplate > 
                        <div style="padding:10px 5px;"> 
                         <asp:LinkButton  runat="server" id="editButton" OnClientClick="return EditPackageContents(); return false;" > 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <img style="border:0px;vertical-align:middle;" alt="" src="Images/Edit.gif" />Edit package contents</asp:LinkButton>&nbsp;&nbsp;&nbsp;&nbsp; 
                                            
                       </div> 
                      </CommandItemTemplate> 
                      <CommandItemSettings AddNewRecordText="Edit package contents"  /> 
                                    <Columns> 
                                        <telerik:GridBoundColumn DataField="mid_id" Display="false" UniqueName="mid_id"> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="mid_type_id" Display="false"  
                                            UniqueName="mid_type_id"> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="mid_name" HeaderText="Package Contents"  
                                            UniqueName="mid_name"> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridBoundColumn DataField="package_name" Display="false"  
                                            HeaderText="Package Name" SortExpression="package_name"  
                                            UniqueName="package_name"> 
                                        </telerik:GridBoundColumn> 
                                        <custom:MyCustomFilteringColumnMidTypes DataField="mid_type_name" HeaderText="Mid Types"> 
                                         <headerstyle width="100px" /> 
                                            <itemtemplate> 
                                                <%# Eval("mid_type_name")%> 
                                            </itemtemplate> 
                                         </custom:MyCustomFilteringColumnMidTypes> 
                                        <telerik:GridBoundColumn DataField="mid_type_name" HeaderText="Mid type"  
                                            SortExpression="mid_type_name" UniqueName="mid_type_name"> 
                                        </telerik:GridBoundColumn> 
                                        <telerik:GridNumericColumn DataField="price" UniqueName="price"  ></telerik:GridNumericColumn> 
                                        <telerik:GridNumericColumn DataField="asking_price" UniqueName="asking_price"  ></telerik:GridNumericColumn> 
                                    </Columns> 
                                    <PagerStyle Mode="NextPrevAndNumeric" /> 
                                </MasterTableView> 
                                <FilterMenu EnableTheming="True"> 
                                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                </FilterMenu> 
                            </telerik:RadGrid> 
                        </td> 
                        <td> 
                            &nbsp;</td></tr><tr> 
                        <td class="style2"> 
                            &nbsp;</td><td class="style3"> 
                            &nbsp;</td><td class="style1"> 
                            &nbsp;</td></tr></table></div></telerik:RadAjaxPanel></telerik:RadPane></telerik:RadSplitter><asp:TextBox ID="packageID" runat="server" Visible="true" Width="0" Height="0" 
             style="border: 0px solid #b0c4de;background-color:#b0c4de;"></asp:TextBox><asp:TextBox ID="packageName" runat="server" Visible="true" Width="0" Height="0" 
             style="border: 0px solid #b0c4de;background-color:#b0c4de;"></asp:TextBox><telerik:RadNumericTextBox ID="totalPackagePrice" runat="server" Value="0"  ></telerik:RadNumericTextBox> 
       <telerik:RadNumericTextBox ID="totalOurCost" runat="server" Value="0"  ></telerik:RadNumericTextBox> 
         <asp:SqlDataSource ID="SqlDataSourcePackages" runat="server"  
            ConnectionString="<%$ ConnectionStrings:CC2ConnectionString2 %>"  
             
              
              
             SelectCommand="SELECT package_id, package_name, package_cd, mid_id, descriptions, last_changed_by, date_created, date_last_changed, do_not_delete, start_date, end_date, active FROM PACKAGES WHERE (end_date IS NULL) OR (end_date &gt;= GETDATE())"></asp:SqlDataSource>     
         <asp:SqlDataSource ID="SqlDataSourceOutdatedPackages" runat="server"  
            ConnectionString="<%$ ConnectionStrings:CC2ConnectionString2 %>"  


 protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) 
        { 
            if ("PackageEdit" == e.Argument) 
            { 
                packageGrid.Rebind(); 
                if (outdatedPackageGrid.Visible == true) 
                    outdatedPackageGrid.Rebind(); 
            } 
            else if ("PackageContents" == e.Argument) 
            { 
                buildPackageGrid.Visible = true; 
                buildPackageGrid.Rebind(); 
            } 
        } 

Yavor
Telerik team
 answered on 29 Dec 2008
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?