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

in RadGrid, is it possible to add another filter option next to the existing filters? I have a column with several categories, let's say countries. Here is a good example on your demo page. Problem is: My countries are sorted in Categories, e.g.
  • Africa
    • Egypt
    • South Africa
  • Europe
    • Denmark
    • France
    • Italy
  • etc

So I could not use a simple dropdown list. I hope it's possible to use RadTreeView with checkboxes?
Problem is: I don't want to replace the existing filter. It should still be possible just to enter e.g. 'Den' and select 'Contains' as a filter. Additionally it should be possible to click on another filter icon and then RadTreeView opens showing all available options? Would that work?
I've also seen that it's possible to filter with RadFilter. This might also be an option but currently I think it's not very self-explaining for unexperienced users so I would really prefer to have an additional filter option icon in the filter row.
Many thanks in advance!

Radoslav
Telerik team
 answered on 19 Mar 2012
2 answers
138 views

I have a grid named gvTabList which in inside the usercontrol . I load this usercontrol at runtime from Default.aspx when some required condition is met.

The usercontrol is loaded as shown. I don't have to load this usercontrol on page load.As you can see I am not loading my usercontrol in Page_Load event.

if(Condition1 is met)
{
   UserControl control = (UserControl)LoadControl("~/Controls/" + Usercontrolname + ".ascx");
}
There is no problem loading the usercontrol when the condition is met. But the problem is when i click the heading of any column, the sortorder does not change. I have my funtion to handle the CustomSorting which is given below.

<telerik:RadAjaxManager ID="radAjaxManagerTab" runat="server">
                               <AjaxSettings>
                                   <telerik:AjaxSetting AjaxControlID="gvTabList">
                                       <UpdatedControls>
                                           <telerik:AjaxUpdatedControl ControlID="gvTabList" LoadingPanelID="ajaxLoadingPanel"  />
                                                                            
                                       </UpdatedControls>
                                   </telerik:AjaxSetting>
                               </AjaxSettings>
                           </telerik:RadAjaxManager>
                            <telerik:RadAjaxLoadingPanel ID="ajaxLoadingPanel" runat="server" IsSticky="true"
                       Skin="Default" Style="position: absolute; z-index: 101; top: 0; left: 0;">
                       <img alt="Loading" src="../Images/Loading.gif" />
                   </telerik:RadAjaxLoadingPanel>
                           <telerik:RadGrid ID="gvTabList" runat="server" Skin="WebBlue" AllowFilteringByColumn="True"
                               AllowPaging="True" PageSize="5" AllowSorting="True"
                                OnNeedDataSource="gvTabList_NeedDataSource"
                                OnInit="gvTabList_Init"
                                AutoGenerateColumns="False" GridLines="None" OnSortCommand="gvTabList_SortCommand" EnableAJAX="True" >                             
                               <GroupingSettings CaseSensitive="false" />
                               <MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="false" AllowCustomSorting="true">
                                   <RowIndicatorColumn Visible="False">
                                       <HeaderStyle Width="20px"></HeaderStyle>
                                   </RowIndicatorColumn>
                                   <ExpandCollapseColumn Visible="False">
                                       <HeaderStyle Width="19px"></HeaderStyle>
                                   </ExpandCollapseColumn>
                                   <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                   <Columns>
                                       <telerik:GridBoundColumn AllowFiltering="False" DataField="ID" HeaderText="HEDIS #"
                                           UniqueName="HedisID">
                                           <HeaderStyle HorizontalAlign="Center" Width="140" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn AllowFiltering="False" DataField="HedisSubMeasure" HeaderText="HEDIS Domain"
                                           UniqueName="HedisDomain">
                                           <HeaderStyle HorizontalAlign="Center" Width="150" />
                                           <ItemStyle HorizontalAlign="Center" />
                                       </telerik:GridBoundColumn>
                                         
                                   </Columns>
                               </MasterTableView>
                                <PagerStyle Mode="NumericPages" />
                           </telerik:RadGrid>

I checked by debugging, but " e.OldSortOrder" always gives None.

protected void gvTabList_SortCommand(object source, GridSortCommandEventArgs e)
       {          
            GridSortExpression sortExpr = new GridSortExpression();          
           switch (e.OldSortOrder)           
           {
               case GridSortOrder.None:
                   sortExpr.FieldName = e.SortExpression;
                   sortExpr.SortOrder = GridSortOrder.Descending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);                   
                   break;
               case GridSortOrder.Ascending:
                   sortExpr.FieldName = "ID";
                   sortExpr.SortOrder = GridSortOrder.Ascending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                    
                   break;
               case GridSortOrder.Descending:
                   sortExpr.FieldName = e.SortExpression;
                   sortExpr.SortOrder = GridSortOrder.Ascending;
                   e.Item.OwnerTableView.SortExpressions.AddSortExpression(sortExpr);
                   
                   break;
           }
           e.Canceled = true;    
           gvTabList.Rebind();
 
       }


Is this problem related with dynamically loading the usercontrol . I have found many forums saying " UserControl must be loaded during Init method". But as you can see I need this usercontrol only if a condition is met, I dont need it always. so I am not loading it in Init method.
if any one has faced this problem, please send me the solution. It will be a great help.






Antonio Stoilkov
Telerik team
 answered on 19 Mar 2012
4 answers
235 views
Hi,
I'm using RadGrid with autogenerated columns. In some column I have DateTime value ( e.g. sql - select id, startDate, price from table) . How can I set the dateformat of this columns in grid which have these values?
Amit
Top achievements
Rank 1
 answered on 19 Mar 2012
6 answers
165 views
Hi,

I have a grid with  set of GridBoundColumn, GridNumericColumn, GridDateTimeColumn etc.,  and Column reorder option enabled. i made reordering through client side by using property called ReorderColumnsOnClient="true". While reordering any column, the issue i faced is after reordered a GridNumeric column where GridBoundColumn is actually placed and vice versa., then filtering a reodered column, it throws a Type cast error.
"Message: Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'System.Web.UI.WebControls.TextBox' to type 'Telerik.Web.UI.RadNumericTextBox'. "

if i try to reorder a DatePickerColumn with numeric column it throws an exception as like follows :
"Message: Sys.WebForms.PageRequestManagerServerErrorException: Unable to cast object of type 'Telerik.Web.UI.RadDatePicker' to type 'Telerik.Web.UI.RadNumericTextBox'"


Kindly suggest a solution for this problem.

thanks and regards
Venk@t




Venkat
Top achievements
Rank 1
 answered on 19 Mar 2012
3 answers
267 views
How can I make RadDatePicker default to today's date when opens it? My RadDatePicker is one of the column the grid, when I do filter, I like to open the raddatePicker with today's date highlighted.

I am using  2011 Q1.  Is the newest version already set today's date as default when open the calendar?

Thanks
Princy
Top achievements
Rank 2
 answered on 19 Mar 2012
2 answers
64 views
Hi, i want to is the "Add" command item to pop up a rad window. I was able to get it to work by create a javascript function and setting setting;


OnCommand="Command_Clicked"

How do i prevent the insert field from appearing on the grid?

Thanks.
Kim
Top achievements
Rank 1
 answered on 19 Mar 2012
7 answers
239 views
 
Hello,

  I am working on Radgrid in one of my web pages. I have 3 questions on this.

1)  I want to change the backcolor of the edited row and for that i have given the edititemstyle and still don't see the color.Am i doing something wrong here? Here is the code.
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"
                              OnDeleteCommand="RadGrid1_DeleteCommand" ShowStatusBar="True"
                               ShowFooter="True" Skin="Office2010Silver" Width="100%"
                              OnItemDataBound="RadGrid1_ItemDataBound" OnEditCommand="RadGrid1_EditCommand"
                              OnNeedDataSource="RadGrid1_NeedDataSource" 
                              OnUpdateCommand="RadGrid1_UpdateCommand" GridLines="None"
                              oninsertcommand="RadGrid1_InsertCommand" CellSpacing="0" Font-Bold="True"
                              ForeColor="Black">
                               <EditItemStyle  BackColor="DarkOrange"   BorderColor="#C00000" HorizontalAlign="Center" VerticalAlign="Middle" />
                              <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                             
                              </HeaderContextMenu>                              
                               <ItemStyle Font-Bold="True" />                                 
                              <MasterTableView AllowAutomaticDeletes="True" CommandItemDisplay="Top" DataKeyNames="ClientID" EditMode="EditForms" >


2) Suppose I have 4 columns in the grid and when i edit a row, i would like to see the half of the columns on the left and the other half on the right. Something like this..

Column1       Column3
Column2       Column4

 I don't want to have all the columns straight. It will take more height.


3) I have a template column in the grid and it should bind the gender . It may be M or F or null. What i have works only  if the grid is NOT in edit mode. Is there a property which will bind the gender and should not throw a error if the value is null?
<telerik:GridTemplateColumn HeaderText="Gender" UniqueName="MemGender">
                                          <EditItemTemplate>
                                              <ASP:RadioButtonList ID="rbtnMemGender" runat="server" CssClass="radiobutton" 
                                              RepeatDirection="Horizontal"  >
                                                  <ASP:ListItem Text="M" Value="M" />
                                                  <ASP:ListItem Text="F" Value="F" />                                                 
                                              </ASP:RadioButtonList>
                                          </EditItemTemplate>
                                          <ItemTemplate>
                                              <ASP:Label ID="lblMemGender" runat="server" Text='<%# Bind("Gender") %>' ToolTip="Gender">
                                              </ASP:Label>
                                          </ItemTemplate>
                                      </telerik:GridTemplateColumn>

 



Appreciate the help.
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2012
2 answers
114 views
Hi all,
I have a problem with my radGrid. My code below:
======ASPX code=====
<telerik:RadGrid ID="rgData" runat="server" AutoGenerateColumns="false"
                           onupdatecommand="rgData_UpdateCommand1">
            <MasterTableView DataKeyNames="ID" >
            <PagerStyle Mode="NextPrevAndNumeric" />
            <Columns>
                      <telerik:GridBoundColumn  DataField="Name"
                                                            UniqueName="clName"
                                                               HeaderText="Name" >
                      </telerik:GridBoundColumn>
            </Columns>
</telerik:RadGrid>
=====C# code========
protected void rgData_UpdateCommand1(object sender, GridCommandEventArgs e)
        {
            GridEditableItem item = (GridEditableItem)e.Item;
            string value = (item["clName"].Controls[0] as TextBox).Text;
        }
===================
When I debug, I only get value of column Name, not the value I set in edit mode.
this is my Grid:  http://i1068.photobucket.com/albums/u450/bl4ir121/Error_RadGrid.jpg
I try get Kevin value but I only get John value.
Please help me, It's very important.
Thank all.
Tan
Top achievements
Rank 1
 answered on 19 Mar 2012
1 answer
150 views
Hi,

Please let me know how to passPROJECT_ID value to my btnAddNew.  so when i click on my button, i will direct me to the new page with value of Project_ID.

Thanks so much in advance.

<
telerik:RadGrid ID="gvFSRMSearchResult" runat="server" 
    ShowStatusBar="true" 
    AutoGenerateColumns="False" 
    PageSize="5" 
    OnSortCommand="GVSortCommand" 
    OnPageIndexChanged="GVProject1PageIndexChanged" 
    OnPageSizeChanged="GVProjectPageSizeChanged"
    AllowSorting="True" 
    AllowMultiRowSelection="False"
    AllowPaging="True" 
    GridLines="Both"
    AllowMultiRowEdit="false"  
    Skin="Sunset"
    Width="100%" 
    AllowAutomaticInserts="True"
    OnDetailTableDataBind="gvFSRMSearchResult_DetailTableDataBind"
    AllowAutomaticDeletes="True" 
    AllowAutomaticUpdates="True"    
    >
  
    <PagerStyle Mode="NumericPages"></PagerStyle>
  
    <%--project_id is querystring passing to the child table--%>
    <MasterTableView DataKeyNames="PROJECT_ID" AutoGenerateColumns="false">
          
        <DetailTables>
            <telerik:GridTableView DataKeyNames="project_id" Name="PCRHistory" Width="100%" CommandItemDisplay="Bottom" >
  
                <Columns>
                    <telerik:GridHyperLinkColumn ItemStyle-ForeColor="Blue" HeaderText="Request Status" 
                        DataNavigateUrlFields="project_id"
                        DataNavigateUrlFormatString="ProjectCancel.aspx?ProjectNumber={0}" 
                        DataTextField="Status_Code">
                    </telerik:GridHyperLinkColumn>
                    <telerik:GridBoundColumn SortExpression="Reason" HeaderText="Reason"
                        HeaderButtonType="TextButton"
                        DataField="Reason_Description">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="REASON_OTHER_EXPLAIN" HeaderText="Other Reason"
                        HeaderButtonType="TextButton"
                        DataField="REASON_OTHER_EXPLAIN">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn SortExpression="Project_id" Visible="true"
                        HeaderButtonType="TextButton"
                        DataField="Project_id">
                    </telerik:GridBoundColumn>
                </Columns>
                <CommandItemTemplate>
                    <div style="padding: 5px 5px;">
                        <asp:ImageButton ID="btnAddNew" runat="server" OnClick="btnAddNew_Click" ImageUrl="~/Images/buttons/newrecord_icon.png" />
                    </div>
                </CommandItemTemplate>
            </telerik:GridTableView>
         </DetailTables>
  
        <Columns>
            <telerik:GridBoundColumn SortExpression="PROJECT_ID" HeaderText="PROJECT ID" HeaderButtonType="TextButton"
                DataField="PROJECT_ID">
            </telerik:GridBoundColumn>
  
            <telerik:GridBoundColumn DataField="PRJ_STATUS" Display="false" HeaderText="PRJ_STATUS">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="TITLE" SortExpression="title" HeaderText="TITLE">
            </telerik:GridBoundColumn>
        </Columns>
  
    </MasterTableView>
     
</telerik:RadGrid>
protected void btnAddNew_Click(object sender, EventArgs e)
       {
             Response.Redirect("PCRNew.aspx?projectId=project_id";
       }
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Mar 2012
1 answer
425 views
I want to edit a row in the grid by opening a popup.
I am able to open a editable popup window on click of edit button in the grid by calling a java script function in ItemDataBound event at server side.  When i open the popup using window.radopen(), i am able to pass grid row data as arguments of radopen(). But in the pop up, page_load is not getting called and hence i am not able to catch the query string values. As a result i am unable to edit the row.
Please advise. Find the code below.

aspx code
--------------
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ManageOverrides.aspx.cs"
    Inherits="AdminWebsite.ManageOverrides" MasterPageFile="~/Admin.Master" %>
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
 
 
 
     <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
     
        function ShowEditForm(EntityID, EntityType, MaintenanceLong, MaintenanceShort, InitialLong, InitialShort, DayTradeLong, DayTradeShort) {
         window.radopen("ManageOverridesEdit.aspx?EntityID=" + EntityID + "&EntityType=" + EntityType + "&MaintenanceLong=" + MaintenanceLong + "&MaintenanceShort=" + MaintenanceShort + "&InitialLong=" + InitialLong + "&InitialShort=" + InitialShort + "&DayTradeLong=" + DayTradeLong + "&DayTradeShort=" + DayTradeShort, "ManageOverridesEdit");
     
        }
       
               
    </script>
    </telerik:RadCodeBlock>
     <telerik:radwindowmanager id="RadWindowManager2" runat="server" enableshadow="true"
            skin="Office2007" initialbehavior="Close" behavior="Close,Move">
        <Windows>
             
                <telerik:RadWindow ID="ManageOverridesEdit1" runat="server" Title="Manage Overrides Edit"
                Skin="Office2007" Height="500px" Width="800px" Left="100px" ReloadOnShow="false"
                VisibleStatusbar="true" ShowContentDuringLoad="true" Modal="true" Behavior="Minimize,Maximize,Close,Move" />
              
            
        </Windows>
    </telerik:radwindowmanager>
<asp:Panel ID="pnlSecuritySearchResults" runat="server" Width="60%" Visible="false"
<telerik:RadGrid ID="rgSecuritySearchResults" runat="server" AutoGenerateColumns="False"
                            GridLines="None"  Skin="Office2007"  AllowPaging="True"  OnItemDataBound="rgSecuritySearchResults_ItemDataBound"
                            DataSourceID="SecurityOverridesDS" OnDeleteCommand="rgSecuritySearchResults_ItemCommand" >
                            <MasterTableView DataSourceID="SecurityOverridesDS" DataKeyNames="EntityID,EntityType,CUSIP">
                            <RowIndicatorColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                            <HeaderStyle Width="20px"></HeaderStyle>
                            </ExpandCollapseColumn>
                                <Columns
                                  <telerik:GridTemplateColumn DataField="Action" HeaderButtonType="TextButton" HeaderText="Action"
                                                UniqueName="Action" >
                                                <HeaderStyle HorizontalAlign="Center"  />
                                                <ItemStyle HorizontalAlign="Center" />
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="ImgDelete" ToolTip="Click here to Delete" CommandName="Delete"
                                                         runat="server" Text="Delete" ImageUrl="images/Delete.gif" OnClientClick="if (!confirm('Are You sure you want to delete the selected security override ?')) return false;" />
                                                    <asp:ImageButton ID="imgBtnEdit" ImageUrl="images/radgrid/Edit.gif" ToolTip="Click here to Edit" Text="Edit"
                                                        runat="server" CommandName="Edit" />                                                   
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>                                                                    
                                   <telerik:GridTemplateColumn HeaderText="Entity ID" UniqueName="EntityID"
                                        DataField="EntityID" SortExpression="EntityID">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblEntityID" Text='<%# DataBinder.Eval(Container.DataItem, "EntityID")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Entity Type" UniqueName="EntityType"
                                        DataField="EntityType" SortExpression="Symbol">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblEntityType" Text='<%# DataBinder.Eval(Container.DataItem, "EntityType")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridBoundColumn HeaderText="Symbol" UniqueName="Symbol"
                                        DataField="Symbol" SortExpression="Symbol">
                                    </telerik:GridBoundColumn>                                                               
                                    <telerik:GridBoundColumn HeaderText="Correspondent Code" UniqueName="CorrespondentCode"
                                        DataField="CorrespondentID" SortExpression="CorrespondentCode">                                                                   
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn HeaderText="Office Code" UniqueName="OfficeCode"
                                        DataField="OfficeID" SortExpression="OfficeCode">                                                                   
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn HeaderText="Rep ID" UniqueName="RepID"
                                        DataField="RepID" SortExpression="RepID">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn HeaderText="Account Number" UniqueName="AccountNumber"
                                        DataField="AccountNumber" SortExpression="AccountNumber">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridTemplateColumn HeaderText="Maintenance Long" UniqueName="MaintenanceLong"
                                        DataField="MaintenanceLong" SortExpression="MaintenanceLong">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblMaintenanceLong" Text='<%# DataBinder.Eval(Container.DataItem, "MaintenanceLong")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                     <telerik:GridTemplateColumn HeaderText="Maintenance Short" UniqueName="MaintenanceShort"
                                        DataField="MaintenanceShort" SortExpression="MaintenanceShort">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblMaintenanceShort" Text='<%# DataBinder.Eval(Container.DataItem, "MaintenanceShort")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Initial Long" UniqueName="InitialLong"
                                        DataField="InitialLong" SortExpression="InitialLong">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblInitialLong" Text='<%# DataBinder.Eval(Container.DataItem, "InitialLong")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                     <telerik:GridTemplateColumn HeaderText="Initial Short" UniqueName="InitialShort"
                                        DataField="InitialShort" SortExpression="InitialShort">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblInitialShort" Text='<%# DataBinder.Eval(Container.DataItem, "InitialShort")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn HeaderText="Day Trade Long" UniqueName="OldMaintenanceLong"
                                        DataField="OldMaintenanceLong" SortExpression="OldMaintenanceLong">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblDayTradeLong" Text='<%# DataBinder.Eval(Container.DataItem, "OldMaintenanceLong")%>'></asp:Label>
                                         </ItemTemplate>
                                    </telerik:GridTemplateColumn>
                                     <telerik:GridTemplateColumn HeaderText="Day Trade Short" UniqueName="OldMaintenanceShort"
                                        DataField="OldMaintenanceShort" SortExpression="OldMaintenanceShort">
                                        <ItemTemplate>
                                                    <asp:Label runat="server" ID="lblDayTradeShort" Text='<%# DataBinder.Eval(Container.DataItem, "OldMaintenanceShort")%>'></asp:Label>
                                         </ItemTemplate>
                                     </telerik:GridTemplateColumn>                                
                                      <telerik:GridBoundColumn HeaderText="Modified By" UniqueName="ModifiedBy"
                                        DataField="ModifiedBy" SortExpression="ModifiedBy">
                                       </telerik:GridBoundColumn>
                                         <telerik:GridBoundColumn HeaderText="Modified Date" UniqueName="ModifiedDate"
                                        DataField="ModifiedDate" SortExpression="ModifiedDate">
                                    </telerik:GridBoundColumn>                                                                 
                                </Columns>
                            </MasterTableView>
                            <ClientSettings EnableRowHoverStyle="true">
                                <Selecting AllowRowSelect="True" />
                            </ClientSettings>
                            <FilterMenu EnableTheming="True">
                                <CollapseAnimation Duration="200" Type="OutQuint" />
                            </FilterMenu>
                        </telerik:RadGrid>
                                    
                  </asp:Panel>                                
 
          
                
     
    <asp:ObjectDataSource ID="odsCorrespondentFirm" runat="server"
OldValuesParameterFormatString="original_{0}"
SelectMethod="RetrieveAllFirmsFromCorrespondents"
TypeName="AdminWebsite.CorrespondentDataSource" onselecting="odsCorrespondentFirm_Selecting">
</asp:ObjectDataSource>
 
<asp:ObjectDataSource ID="SecurityOverridesDS" runat="server"
    OldValuesParameterFormatString="original_{0}"
    onselecting="SecurityOverridesDS_Selecting"
    SelectMethod="RetrieveAllSecurityOverridessWithEqualFilter"
    TypeName="AdminWebsite.SecurityRequirementOverridesDataSource"
        DeleteMethod="DeleteSecurityRequirementOverridesByID"
        InsertMethod="CreateSecurityRequirementOverrides"
        UpdateMethod="UpdateSecurityRequirementOverridesByID">
        <DeleteParameters>
            <asp:Parameter Name="tokenId" Type="Object" />
            <asp:Parameter DbType="Guid" Name="callerId" />
            <asp:Parameter Name="entityID" Type="String" />
            <asp:Parameter Name="entityType" Type="String" />
            <asp:Parameter Name="cusip" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="tokenId" Type="Object" />
            <asp:Parameter DbType="Guid" Name="callerId" />
            <asp:Parameter Name="entityID" Type="String" />
            <asp:Parameter Name="entityType" Type="String" />
            <asp:Parameter Name="cusip" Type="String" />
            <asp:Parameter Name="maintenanceLong" Type="Decimal" />
            <asp:Parameter Name="maintenanceShort" Type="Decimal" />
            <asp:Parameter Name="initialLong" Type="Decimal" />
            <asp:Parameter Name="initialShort" Type="Decimal" />
            <asp:Parameter Name="description" Type="String" />
        </UpdateParameters>
        <SelectParameters>
            <asp:Parameter Name="tokenId" Type="Object" />
            <asp:Parameter DbType="Guid" Name="callerId" />  
            <asp:ControlParameter ControlID="txtSymbol" Name="Symbol" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter Name="firm" Type="String" ControlID="rcbFirm" PropertyName="SelectedValue" />       
            <asp:ControlParameter ControlID="rcbOverrideLevel" Name="overrideLevel"
                PropertyName="SelectedValue" Type="String" DefaultValue = "-1" />
        </SelectParameters>
         
    </asp:ObjectDataSource>
</asp:Content>

aspx.cs code
------------------

protected void rgSecuritySearchResults_ItemDataBound(object sender, GridItemEventArgs e)
        {
 
            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = (GridDataItem)e.Item;
 
                ImageButton imgBtnEdit = dataItem.FindControl("imgBtnEdit") as ImageButton;
 
 
                Label lblEntityID = dataItem.FindControl("lblEntityID") as Label;
                Label lblEntityType = dataItem.FindControl("lblEntityType") as Label;
                Label lblMaintenanceLong = dataItem.FindControl("lblMaintenanceLong") as Label;
                Label lblMaintenanceShort = dataItem.FindControl("lblMaintenanceShort") as Label;
                Label lblInitialLong = dataItem.FindControl("lblInitialLong") as Label;
                Label lblInitialShort = dataItem.FindControl("lblInitialShort") as Label;
                Label lblDayTradeLong = dataItem.FindControl("lblDayTradeLong") as Label;
                Label lblDayTradeShort = dataItem.FindControl("lblDayTradeShort") as Label;
 
 
                string strEntityID = lblEntityID.Text;
                string strEntityType = lblEntityType.Text;
                string strMaintenanceLong = lblMaintenanceLong.Text;
                string strMaintenanceShort = lblMaintenanceShort.Text;
                string strInitialLong = lblInitialLong.Text;
                string strInitialShort = lblInitialShort.Text;
                string strDayTradeLong = lblDayTradeLong.Text;
                string strDayTradeShort = lblDayTradeShort.Text;
 
 
                imgBtnEdit.Attributes.Add("onclick", "javascript:ShowEditForm('" + strEntityID + "' ,'" + strEntityType + "','" + strMaintenanceLong + "','" + strMaintenanceShort + "','" + strDayTradeLong + "','" + strDayTradeShort + "'); return false;");
 
            }
 
     


Page load event in popup window is not fired when window opens and hence am not able to capture query strings passed 
through window.radopen()to new popup window. I can see the query strings values in the status bar of pop up window.
But i cant capture the query string and hence cant edit  grid row
If i can fire the page load event in pop up, then problem is solved.
Please advise on this or any alternate approaches.
Jayesh Goyani
Top achievements
Rank 2
 answered on 18 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?