Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
125 views

Hi All,

i have used RadMenu for open the Popup(Radpoup). i am using OnClientItemClicked event to open the RadWindow. This is working fine. Now i have added one Button called "Export to Excel" for exporting the data in Excel. This also woking fine. My issue is After the export, f i clicked the radmenu, the radwindow not working. but the event OnClientItemClicked fired correctly.

<asp:UpdatePanel ID="testPanel" runat="server">     
<contenttemplate>    
    
<radM:RadMenu ID="mnuImport" Width="90%" runat="server" Skin="Default2006" OnClientItemClicked="ImportPopup" CausesValidation="false">     
 <DefaultGroupSettings Height="160" Width="70" />                                                                              <Items>    
    <radM:RadMenuItem Text="Red" Value="Red">     
        <Items>    
            <radM:RadMenuItem Text="Red" Value="Red"></radM:RadMenuItem>    
            <radM:RadMenuItem Text="Blue" Value="Blue"></radM:RadMenuItem>    
            <radM:RadMenuItem Text="Yellow" Value="Yellow"></radM:RadMenuItem>    
            <radM:RadMenuItem Text="Orange" Value="Orange"></radM:RadMenuItem>    
        </Items>    
    </radM:RadMenuItem>                                                                        
   </Items>    
</radM:RadMenu>    
    
    
<asp:Button ID="btnExport" runat="server" Text="Export to Excel" CssClass="searchbutton" CausesValidation="false"/>       
    
</contenttemplate>    
<triggers>    
    <asp:PostBackTrigger ControlID="btnExport" /> <!-- if i comment this line, the Popup is working fine. but the export is not working -->       
</triggers>    
</asp:UpdatePanel>    
    
<div>    
  <radwindow:RadWindowManager ID="RadWindowManager1" runat="server" Skin="Vista" Behavior="Close, Move"    
      Height="300px" Width="500px" Modal="true">     
      <Windows>    
           <radwindow:RadWindow ID="radImport" runat="server" Title="Import" ReloadOnShow="true"      
                  Height="300px" Width="500px"  VisibleTitlebar="true" Skin="Vista"/>                                                  
           </Windows>    
  </radwindow:RadWindowManager>    
</div>    
    
    
    
function ImportPopup(sender, eventArgs)     
{     
             
        var selectedImportType = eventArgs.Item.Value;             
        window.radopen("../DocMgt/ImportPopup.aspx?ImportType=" + selectedImportType, 'radImport');     
        return false;     
}    
 

this is working fine if we never click export button. once we clicked the export button the events are fired correctly, but the rad window is not opened.

Let me know if any solutions.

Thanks in Advance,
Anand
Anand
Top achievements
Rank 1
 asked on 08 Jul 2010
1 answer
192 views
Hi all,

I have one RadToolBarButton: Show/Hide Filter. When I click the button, I want the Filter disappear or appear. I tried from client side, call RadGrid.MasterViewPage.showFilter/hideFilter(The method name maybe incorrect.). but it has a "flicker": at first it will show up the filter, but then it will disappear. So this make the page a little "flicker".
I tried from server side, when click the show/hide button, trigger the server side button click event. And change the property AllowFilteringByColumn to true or false. But this does not work for the frist and second click. And the RadGrid refreshed but the filter won't appear if I click Show Filter or Hide Fiter. The thrid click will work. I assuming that the RadGrid does not refresh correct. So I call the RadGrid.Rebind() method. But this time, another issue occur,
1) The filter disappear when the page load first.
2) click Show Filter, the filter will appear.
3) input some expression and the result get filtered, which is correct.
4) click Hide Filter, the filter disappear.
5) click the show filter again, The full list is displayed, but the previous filter expression is still in the textbox, which mean the expression does not be applied.

I thought it was because of the ViewState of the RadGrid, but when I disable the ViewState for the RadGrid, I encountered some other issues, which made me believe that the viewState could not be disabled.

How I can get rid of this? Does anyone has a solution for this?
Thanks in advance. Need urgent answer.
zxp
Top achievements
Rank 1
 answered on 08 Jul 2010
2 answers
87 views
Hi

Please treat this as very Urgent:

We've the telerik Grid (with 20 columns) with Grouping and static headers.
When we try to scroll horizontally the header column and row data is not aligned.

Pls Help.

Thanks,

Gopi
Gopinath
Top achievements
Rank 1
 answered on 08 Jul 2010
0 answers
119 views
Hello,

I have the following panelbar structure:

  • Header1
  1. Item1
  2. Item2
  3. Item3
  • Header2
  1. Item1
  2. Item2
  • Header3

The panel bar is set to FullExpandedItem. Now if Item2 is too long (listbox for example) the whole Childgroup of header1 has scroll bar.
What I need is Item1 to always be there and only scroll Item2 and Item3 in the same container.

Can this be done ? Some kind of "Static" item like static headers in the grid.


Roland
Roland
Top achievements
Rank 1
 asked on 07 Jul 2010
2 answers
138 views
I was having some trouble with the RadChart inside a RadAjaxPanel.
When I was using a button to trigger an ajaxRequest on the RadAjaxPanel, it worked once, then the $find(<%= RadAjaxPanel1.ClientID %>) is null. I tested this without the chart just to see the baseline, and it still failed to be capable of doing ajaxRequest more than once.

I hope I didn't miss something where this isn't capable of being called multiple times, or else this is a waste of a big post. :)

I've worked up a very simple version setup that reproduces the issue, so hopefully a solution can be found, or I get to find another charting tool...

Now; how to recreate the issue:
First, My Setup
Visual Studio 2010 Professional
Telerik 2010.1.519.40
FireFox 3.66
Firebug 1.54
Windows 7 Enterprise
Second, The Steps
Open Visual Studio
File>New>Project
.NET Framework 4
ASP.NET Web Application [Visual C#]
Open Default.aspx
Replace the contents of BodyContent with
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    </telerik:RadScriptManager> 
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"
        <script type="text/javascript"
            //Adding a var here so the ClientID is accessible to the button 
            var panel = '<%= RadAjaxPanel1.ClientID %>'
        </script> 
    </telerik:RadScriptBlock> 
    <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="$find(panel).ajaxRequest('testing'); return false;" /> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"  
        onajaxrequest="RadAjaxPanel1_AjaxRequest"
        <asp:Label ID="Label1" Text="text" runat="server" /> 
    </telerik:RadAjaxPanel> 
At the top add
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
Add Reference to the Telerik.Web.UI.dll
Register the RadScriptManager in web.config [using the lovely automated method attached to the RadScriptManager]
Open Default.aspx.cs
Add after the Page_Load function
        protected void RadAjaxPanel1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) 
        { 
            Label1.Text += e.Argument; 
        } 
Build the project
Browse Default.aspx in FireFox [I use CTRL+F5 and have FF as my default browser]
Activate and Refresh the page for FireBug
Go to Console in FireBug
Enter the line $find(panel).ajaxRequest("test1"); [Note that 'panel' is the variable we put the RadAjaxPanel1.ClientID into]
The result will be a Post entry at the top of the console pane.
At this point the label will now have 'test1' appended, making the full text 'texttest1'
Returning to the Console in FireBug
Enter the line $find(panel).ajaxRequest("test2");
Here is where we get the error - It says that $find(panel) is null. The behavior I'm expecting is for another Post to occur and the label text be updated to be 'texttest1test2'.
It might be something to do with javascript and panel may have been reset.
To test this, we use the Console and enter
panel
We get the result - "MainContent_RadAjaxPanel1" so we know that it hasn't been blanked.
We can also use the Console with the line
document.getElementById(panel); and we see that it does still exist on the page.
At this point, to test a little further, I installed FireQuery 0.7 [allows FireBug to add jQuery to a page to make it nice and simple to do things from the Console] and decided to see what would occur when I enter
$('#' + panel); and the result is a jQuerified div. I can do hide()/show() and it responds.
I have checked the value of panel in the HTML in Firebug after the page loads, before any post backs and from the Console using panel
var panel = 'MainContent_RadAjaxPanel1'; 
"MainContent_RadAjaxPanel1"
and then again after causing an ajaxRequest from the Console; and they remain the same.
That's what I have for this so far. I hope I'm not missing something simple and stupid, as I'm wont to do that. I got it as simple as I could and still have the problem.
Since I'm working on a project where users can select what data to display... I kinda need to be able to trigger multiple postbacks. This hiccup has me stumped and prevents me from moving forward with the RadChart. Hopefully we'll have a quick solution and I'm an idiot, but... umm... Yea, until then - Helpz!
Thank you

P.S. I've attached a picture showing the error output in FireBug.
Baatezu
Top achievements
Rank 2
 answered on 07 Jul 2010
2 answers
184 views
Hi,

I am using inline editing in radgrid. Once the rows or columns are updated i am still getting that rows or columns in edit mode. How to resolve this issue.

Another issue is Pageindexchaned event. when i click on the next page button i am not getting anything(when viewstate is false).  But when viewstate is set to true. Its working fine. Is there anyway to solve this issue.  When I am trying to use onneeddatasource event I am unable update the columns or rows. so i cant use onneeddatasource.



Please help me. Here is my code.

protected void Page_Load(object sender, EventArgs e) 
    { 
        try 
        { 
            if (!IsPostBack) 
            { 
                Session["SearchRes"] = null; 
                if (Session["TaskName"] != null) 
                    lblTskName.Text = Session["TaskName"].ToString(); 
                Session["FilColms"] = null; 
                Session["SortExp"] = null; 
                Session["FilExp"] = null; 
                Session["ViewAll"] = null; 
                BindGrid(); 
            } 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
        } 
    } 
 
    private void BindGrid() 
    { 
        try 
        { 
            DataSet dsResult = new DataSet(); 
 
            clsSearch_BL clsObj = new clsSearch_BL(); 
            clsObj.TaskID = (string)Session["TaskID"]; 
            clsObj.CustName = (string)Session["CustName"]; 
            clsObj.MarketName = (string)Session["MarketName"]; 
            clsObj.HeadendName = (string)Session["HeadendName"]; 
            clsObj.SiteName = (string)Session["SiteName"]; 
            clsObj.TaskStatus = (string)Session["TaskStatus"]; 
            clsObj.OrdType = (string)Session["OrdType"]; 
            clsObj.OrdStatus = (string)Session["OrdStatus"]; 
            clsObj.ProName = (string)Session["ProName"]; 
            clsObj.LOC = (string)Session["LOC"]; 
            clsObj.QuoteID = (string)Session["QuoteID"]; 
            clsObj.CMNumber = (string)Session["CMNumber"]; 
 
            if (Session["SearchRes"] == null) 
            { 
                dsResult = clsObj.getSearchResults_BL(clsObj); 
                Session["SearchRes"] = dsResult; 
            } 
            else 
                dsResult = (DataSet)Session["SearchRes"]; 
 
            DataView dataView = dsResult.Tables[0].DefaultView; 
            rg200.DataSource = dsResult
            rg200.DataBind(); 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
        } 
    } 
 
    protected void rg200_PreRender(object sender, EventArgs e) 
    { 
        rg200.MasterTableView.GetColumnSafe("RowIndicator").Display = false
 
        if (rg200.EditIndexes.Count > 0 || rg200.MasterTableView.IsItemInserted) 
        { 
            GridColumn col1 = rg200.MasterTableView.GetColumn("EditCommandColumn") as GridColumn; 
            col1.Visible = true
        } 
        else 
        { 
            GridColumn col2 = rg200.MasterTableView.GetColumn("EditCommandColumn") as GridColumn; 
            col2.Visible = false
        }  
 
    } 
 
    protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e) 
    { 
        int radGridClickedRowIndex; 
 
        radGridClickedRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]); 
 
        switch (e.Item.Text) 
        { 
            case "Edit Task": 
                rg200.Items[radGridClickedRowIndex].Edit = true
                BindGrid(); 
               // rg200.Rebind(); 
                break; 
            case "Complete Task": 
                //rg200.MasterTableView.PerformDelete(rg200.Items[radGridClickedRowIndex]); 
                break; 
        } 
    } 
 
    protected void rg200_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridPagerItem) 
        { 
            RadComboBox combo = (e.Item as GridPagerItem).FindControl("PageSizeComboBox") as RadComboBox; 
 
            // The number of items shown when all is selected  
            int allRowsCount = int.MaxValue; 
 
            // Remove duplicates  
            RadComboBoxItem duplicate = combo.Items.FindItemByValue(allRowsCount.ToString()); 
            if (duplicate != null) 
            { 
                duplicate.Remove(); 
            } 
 
            // Create a new item for showing all  
            RadComboBoxItem item = new RadComboBoxItem("All", allRowsCount.ToString()); 
            item.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID); 
            combo.Items.Add(item); 
 
            // Set the current pagesize as the selected value  
            combo.Items.FindItemByValue(rg200.PageSize.ToString()).Selected = true
        } 
    } 
 
    protected void rg200_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
    { 
 
        if (Session["TaskID"] != null) 
        { 
            string strTaskID = (string)Session["TaskID"]; 
            if (strTaskID != string.Empty) 
            { 
                clsTaskUpdates_BL objBL = new clsTaskUpdates_BL(); 
 
                GridEditableItem eeditedItem = e.Item as GridEditableItem; 
                //Get the primary key value using the DataKeyValue.       
                string OrdID = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["orderId"].ToString(); 
                //Access the textbox from the edit form template and store the values in string variables. 
 
                string ClarifyAccountNbr = ((GridTextBoxColumnEditor)editedItem.EditManager.GetColumnEditor("Clarify Account Nbr")).TextBoxControl.Text; 
 
                string SiteID = ((GridTextBoxColumnEditor)editedItem.EditManager.GetColumnEditor("Site ID")).TextBoxControl.Text; 
 
                string QuoteID = ((GridTextBoxColumnEditor)editedItem.EditManager.GetColumnEditor("Quote ID")).TextBoxControl.Text; 
 
                CheckBox chkEDP = ((GridCheckBoxColumnEditor)editedItem.EditManager.GetColumnEditor("EDP Created?")).CheckBoxControl; 
 
                //string ClarifyAccountNbr = (editedItem["Clarify Account Nbr"].Controls[0] as TextBox).Text; 
                //string SiteID = (editedItem["Site ID"].Controls[0] as TextBox).Text; 
                //string QuoteID = (editedItem["Quote ID"].Controls[0] as TextBox).Text; 
                //CheckBox chkEDP = (editedItem["EDP Created?"].Controls[0] as CheckBox); 
                try 
                { 
                    objBL.setTask200_Bl(OrdID, ClarifyAccountNbr, SiteID, QuoteID, chkEDP.Checked); 
                    Session["SearchRes"] = null; 
                    
                    BindGrid(); 
 
                } 
                catch (Exception ex) 
                { 
                    rg200.Controls.Add(new LiteralControl("Unable to update Employee. Reason: " + ex.Message)); 
                    e.Canceled = true
                } 
            } 
        } 
    } 
 
    protected void rg200_PageIndexChanged(object source, GridPageChangedEventArgs e) 
    { 
        try 
        { 
            rg200.CurrentPageIndex = e.NewPageIndex; 
            BindGrid(); 
        } 
        catch (Exception ex) 
        { 
            throw ex; 
        } 
    } 


                    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
                    </telerik:RadScriptManager> 
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                        <ClientEvents OnRequestStart="onRequestStart" /> 
                        <AjaxSettings> 
                            <telerik:AjaxSetting AjaxControlID="rg200"
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="rg200" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                    <telerik:AjaxUpdatedControl ControlID="RadMenu1" /> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                            <telerik:AjaxSetting AjaxControlID="RadMenu1"
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="rg200" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                    <telerik:AjaxUpdatedControl ControlID="RadMenu1" /> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                        </AjaxSettings> 
                    </telerik:RadAjaxManager> 
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
                    </telerik:RadAjaxLoadingPanel> 
                    <input type="hidden" id="radGridClickedRowIndex" name="radGridClickedRowIndex" /> 
                    <telerik:RadGrid ID="rg200" runat="server" AutoGenerateColumns="False" PageSize="30" 
                        Height="550px" Width="100%" AllowPaging="True" AllowSorting="True" AllowMultiRowSelection="True" 
                        EnableHeaderContextMenu="True" GridLines="None" EnableHeaderContextFilterMenu="True" 
                        AllowMultiRowEdit="true" AllowFilteringByColumn="True" OnPreRender="rg200_PreRender" 
                        OnItemCreated="rg200_ItemCreated" EnableViewState="True" OnUpdateCommand="rg200_UpdateCommand" 
                        AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true" 
                        OnPageIndexChanged="rg200_PageIndexChanged" OnCancelCommand="rg200_CancelCommand"
                        <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                            HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" /> 
                        <ExportSettings IgnorePaging="true" ExportOnlyData="true"
                            <Pdf AllowModify="false" AllowPrinting="true" PageBottomMargin="" PageFooterMargin="" 
                                PageHeaderMargin="" PageHeight="11in" PageLeftMargin="" PageRightMargin="" PageTopMargin="" 
                                PageWidth="14in" /> 
                        </ExportSettings> 
                        <MasterTableView GridLines="None" DataKeyNames="orderId" CommandItemDisplay="Top" 
                            EditMode="InPlace"
                            <CommandItemSettings AddNewRecordText="Add New" ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                                ShowExportToCsvButton="true" ShowExportToPdfButton="true" /> 
                            <Columns> 
                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="3%" 
                                    ItemStyle-Width="3%"
                                    <HeaderStyle Width="3%"></HeaderStyle> 
                                    <ItemStyle Width="3%"></ItemStyle> 
                                </telerik:GridClientSelectColumn> 
                                <telerik:GridBoundColumn UniqueName="sId" HeaderText="sId" DataField="sId" ReadOnly="true" 
                                    Visible="false"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="orderId" HeaderText="orderId" Visible="false" 
                                    DataField="orderId"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Customer Name" HeaderText="Customer Name" DataField="Customer Name" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Market Name" HeaderText="Market Name" DataField="Market Name" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="LOB" HeaderText="LOB" DataField="LOB" ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Headend Name" HeaderText="Headend Name" DataField="Headend Name" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Project Name" HeaderText="Project Name" DataField="Project Name" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Site Name" HeaderText="Site Name" DataField="Site Name" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Task Status" HeaderText="Task Status" DataField="Task Status" 
                                    ReadOnly="true"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Clarify Account Nbr" HeaderText="Clarify Account Nbr" 
                                    DataField="Clarify Account Nbr"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Site ID" HeaderText="Site ID" DataField="Site ID"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Quote ID" HeaderText="Quote ID" DataField="Quote ID"
                                </telerik:GridBoundColumn> 
                                <telerik:GridCheckBoxColumn UniqueName="EDP Created?" HeaderText="EDP Created?" DataField="EDP Created?"
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" Visible="false"
                                </telerik:GridEditCommandColumn> 
                            </Columns> 
                        </MasterTableView> 
                        <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="false" AllowDragToGroup="false" 
                            AllowColumnsReorder="True"
                            <Scrolling AllowScroll="true" EnableVirtualScrollPaging="false" UseStaticHeaders="true" /> 
                            <Selecting AllowRowSelect="True"></Selecting> 
                            <Resizing AllowRowResize="true" AllowColumnResize="True" EnableRealTimeResize="True" 
                                ResizeGridOnColumnResize="False"></Resizing> 
                            <ClientEvents OnRowContextMenu="RowContextMenu" OnRowDblClick="RowDblClick"></ClientEvents> 
                        </ClientSettings> 
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle> 
                    </telerik:RadGrid> 

Babu Puchakayala
Top achievements
Rank 1
 answered on 07 Jul 2010
4 answers
284 views
Dear Telerik team,

I am migrating gridview to radgrid. I am working on updating my radgrid rows where I am getting some issues.

I updating Clarify Account Nbr, site id, Quote ID columns in "Inplace" editmode. Lets say before update my values are 200, 300, 400 for columns  Clarify Account Nbr, site id, Quote ID. When i click edit button and change the values to 111, 222, 333. when I am debugging my code and trying to see the textbox.text values  It is showing the old values(200, 300, 400) not the new values (111, 222, 333). ( I hope you guys are understand my problem). Where I am doing wrong. Please help me.
I saw this link but no use.

http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-vs-gridview.aspx

In the below code if you see

string ClarifyAccountNbr = (editedItem["Clarify Account Nbr"].Controls[0] as TextBox).Text;
        string SiteID = (editedItem["Site ID"].Controls[0] as TextBox).Text;
        string QuoteID = (editedItem["Quote ID"].Controls[0] as TextBox).Text;

when i am debugging and pointing to ClarifyAccountNbr, SiteID, QuoteID I am getting older values not new values.( before updating)

Here is my code

<table style="width: 98%">  
            <tr> 
                <td colspan="2">  
                    <asp:Label runat="server" Font-Bold="true" Font-Size="14pt" ID="lblTskName"></asp:Label> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="2">  
                    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
                    </telerik:RadScriptManager> 
                    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
                        <ClientEvents OnRequestStart="onRequestStart" /> 
                        <AjaxSettings> 
                            <telerik:AjaxSetting AjaxControlID="rg200">  
                                <UpdatedControls> 
                                    <telerik:AjaxUpdatedControl ControlID="rg200" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                                </UpdatedControls> 
                            </telerik:AjaxSetting> 
                        </AjaxSettings> 
                    </telerik:RadAjaxManager> 
                    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">  
                    </telerik:RadAjaxLoadingPanel> 
                    <telerik:RadGrid ID="rg200" runat="server" AutoGenerateColumns="False" PageSize="30" 
                        Height="550px" OnNeedDataSource="rg200_NeedDataSource" Width="100%" AllowPaging="True" 
                        AllowSorting="True" AllowMultiRowSelection="True" EnableHeaderContextMenu="True" 
                        GridLines="None" EnableHeaderContextFilterMenu="True" AllowMultiRowEdit="True" 
                        AllowFilteringByColumn="True" OnPreRender="rg200_PreRender" OnItemCreated="rg200_ItemCreated" 
                        EnableViewState="False" OnUpdateCommand="rg200_UpdateCommand">  
                        <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" 
                            HorizontalAlign="Center" BorderColor="White" BorderWidth="1px" /> 
                        <ExportSettings IgnorePaging="true" ExportOnlyData="true">  
                            <Pdf AllowModify="false" AllowPrinting="true" PageBottomMargin="" PageFooterMargin="" 
                                PageHeaderMargin="" PageHeight="11in" PageLeftMargin="" PageRightMargin="" PageTopMargin="" 
                                PageWidth="14in" /> 
                        </ExportSettings> 
                        <MasterTableView GridLines="None" DataKeyNames="orderId" CommandItemDisplay="Top" 
                            EditMode="InPlace">  
                            <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" 
                                ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> 
                            <Columns> 
                                <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn" HeaderStyle-Width="3%" 
                                    ItemStyle-Width="3%">  
                                    <HeaderStyle Width="3%"></HeaderStyle> 
                                    <ItemStyle Width="3%"></ItemStyle> 
                                </telerik:GridClientSelectColumn> 
                                <telerik:GridBoundColumn UniqueName="sId" HeaderText="sId" DataField="sId" Visible="false">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="orderId" HeaderText="orderId" DataField="orderId">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Customer Name" HeaderText="Customer Name" DataField="Customer Name" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Market Name" HeaderText="Market Name" DataField="Market Name" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="LOB" HeaderText="LOB" DataField="LOB" ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Headend Name" HeaderText="Headend Name" DataField="Headend Name" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Project Name" HeaderText="Project Name" DataField="Project Name" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Site Name" HeaderText="Site Name" DataField="Site Name" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Task Status" HeaderText="Task Status" DataField="Task Status" 
                                    ReadOnly="true">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Clarify Account Nbr" HeaderText="Clarify Account Nbr" 
                                    DataField="Clarify Account Nbr">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Site ID" HeaderText="Site ID" DataField="Site ID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn UniqueName="Quote ID" HeaderText="Quote ID" DataField="Quote ID">  
                                </telerik:GridBoundColumn> 
                                <telerik:GridCheckBoxColumn UniqueName="EDP Created?" HeaderText="EDP Created?" DataField="EDP Created?">  
                                </telerik:GridCheckBoxColumn> 
                                <telerik:GridEditCommandColumn UniqueName="ECC200">  
                                </telerik:GridEditCommandColumn> 
                            </Columns> 
                            <PagerStyle AlwaysVisible="True"></PagerStyle> 
                        </MasterTableView> 
                        <ClientSettings EnableRowHoverStyle="true" ReorderColumnsOnClient="false" AllowDragToGroup="false" 
                            AllowColumnsReorder="True">  
                            <Scrolling AllowScroll="true" EnableVirtualScrollPaging="false" UseStaticHeaders="true" /> 
                            <Selecting AllowRowSelect="True"></Selecting> 
                            <Resizing AllowRowResize="true" AllowColumnResize="True" EnableRealTimeResize="True" 
                                ResizeGridOnColumnResize="False"></Resizing> 
                        </ClientSettings> 
                        <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true"></PagerStyle> 
                    </telerik:RadGrid> 
                </td> 
            </tr> 
            <tr> 
                <td colspan="2">  
                    &nbsp;  
                </td> 
            </tr> 
        </table> 

.cs file

public partial class Tak200 : System.Web.UI.Page  
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        try  
        {  
            if (!IsPostBack)  
            {  
                Session["SearchRes"] = null;  
                if (Session["TaskName"] != null)  
                    lblTskName.Text = Session["TaskName"].ToString();  
                Session["FilColms"] = null;  
                Session["SortExp"] = null;  
                Session["FilExp"] = null;  
                Session["ViewAll"] = null;  
                BindGrid();  
            }  
        }  
        catch (Exception ex)  
        {  
            throw ex;  
        }  
    }  
 
    private void BindGrid()  
    {  
        try  
        {  
            DataSet dsResult = new DataSet();  
 
            clsSearch_BL clsObj = new clsSearch_BL();  
            clsObj.TaskID = (string)Session["TaskID"];  
            clsObj.CustName = (string)Session["CustName"];  
            clsObj.MarketName = (string)Session["MarketName"];  
            clsObj.HeadendName = (string)Session["HeadendName"];  
            clsObj.SiteName = (string)Session["SiteName"];  
            clsObj.TaskStatus = (string)Session["TaskStatus"];  
            clsObj.OrdType = (string)Session["OrdType"];  
            clsObj.OrdStatus = (string)Session["OrdStatus"];  
            clsObj.ProName = (string)Session["ProName"];  
            clsObj.LOC = (string)Session["LOC"];  
            clsObj.QuoteID = (string)Session["QuoteID"];  
            clsObj.CMNumber = (string)Session["CMNumber"];  
 
            if (Session["SearchRes"] == null)  
            {  
                dsResult = clsObj.getSearchResults_BL(clsObj);  
                Session["SearchRes"] = dsResult;  
            }  
            else  
                dsResult = (DataSet)Session["SearchRes"];  
 
            DataView dataView = dsResult.Tables[0].DefaultView;  
            rg200.DataSource = dsResult;  
            //rg200.DataBind();  
        }  
        catch (Exception ex)  
        {  
            throw ex;  
        }  
    }  
 
    protected void rg200_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        BindGrid();  
    }  
 
    protected void rg200_PreRender(object sender, EventArgs e)  
    {  
        rg200.MasterTableView.GetColumnSafe("RowIndicator").Display = false;  
 
    }  
 
    protected void rg200_ItemCreated(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridPagerItem)  
        {  
            RadComboBox combo = (e.Item as GridPagerItem).FindControl("PageSizeComboBox") as RadComboBox;  
 
            // The number of items shown when all is selected   
            int allRowsCount = int.MaxValue;  
 
            // Remove duplicates   
            RadComboBoxItem duplicate = combo.Items.FindItemByValue(allRowsCount.ToString());  
            if (duplicate != null)  
            {  
                duplicate.Remove();  
            }  
 
            // Create a new item for showing all   
            RadComboBoxItem item = new RadComboBoxItem("All", allRowsCount.ToString());  
            item.Attributes.Add("ownerTableViewId", e.Item.OwnerTableView.ClientID);  
            combo.Items.Add(item);  
 
            // Set the current pagesize as the selected value   
            combo.Items.FindItemByValue(rg200.PageSize.ToString()).Selected = true;  
        }  
    }  
 
    protected void rg200_UpdateCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)  
    {  
        int intTskID = Convert.ToInt16(Session["TaskID"]);  
 
        GridEditableItem eeditedItem = e.Item as GridEditableItem;  
        //Get the primary key value using the DataKeyValue.        
        string Id = editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["orderId"].ToString();  
        //Access the textbox from the edit form template and store the values in string variables.  
        string ClarifyAccountNbr = (editedItem["Clarify Account Nbr"].Controls[0] as TextBox).Text;  
        string SiteID = (editedItem["Site ID"].Controls[0] as TextBox).Text;  
        string QuoteID = (editedItem["Quote ID"].Controls[0] as TextBox).Text;  
        CheckBox chkEDP = (editedItem["EDP Created?"].Controls[0] as CheckBox);  
      }  
Raj
Top achievements
Rank 1
 answered on 07 Jul 2010
2 answers
201 views

Hello,

I have a page with a RadMenu on it.  Some of the menu items are getting created in the markup, and some are created in code-behind
inside Page_Load().  Most of the menu items work fine.  One of the menu items, however, does not.  When I click on it, it performs
a postback, and some time after Page_Load() is executed, I get the following error:

[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +7471479
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
   System.Convert.ToInt32(String value) +63
   Telerik.Web.UI.HierarchicalControlItemContainer.FindItemByHierarchicalIndex(String hierarchicalIndex) +213
   Telerik.Web.UI.RadMenu.RaisePostBackEvent(String nodeIndex) +44
   Telerik.Web.UI.RadMenu.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String nodeIndex) +39
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 
In debug mode, I have examined the contents of the menu within Page_Load() at the postback, and the menu items look correct to me.
Can anyone tell me what I am doing wrong here?

The following is the code for the menu creation in the aspx file and also the code-behind:

 
aspx:

 

 

 

 

<telerik:RadMenu ID="menuActions" runat="server" Font-Names="Arial" Skin="Windows7">  
    <Items> 
        <telerik:RadMenuItem Value="delete" NavigateUrl="javascript:Delete();" Text="Delete" Enabled="false" /> 
        <telerik:RadMenuItem Value="save" NavigateUrl="javascript:Save();" Text="Save" Enabled="false" /> 
    </Items> 
</telerik:RadMenu> 
 


code-behind:

                RadMenuItem effectiveDateItem = new RadMenuItem(  
                    "Current",  
                    string.Format("javascript:__doPostBack('{0}','{1}');"base.ActionMenu.UniqueID, WebUtils.ActionsMenuTags.ChangeListEffectiveDate));  
                    effectiveDateItem.Value = WebUtils.ActionsMenuTags.ChangeListEffectiveDate;  
                    effectiveDateItem.ImageUrl = ResolveUrl(WebUtils.ImageUrls.EditDate);  
                  
                RadMenuItem clearEffectiveDateItem = new RadMenuItem("Clear",  
                    string.Format("javascript:__doPostBack('{0}','{1}');"base.ActionMenu.UniqueID, WebUtils.ActionsMenuTags.ClearListEffectiveDate));  
                clearEffectiveDateItem.Value = WebUtils.ActionsMenuTags.ClearListEffectiveDate;  
 
                effectiveDateItem.Items.Add(clearEffectiveDateItem);  
                base.ActionMenu.Items.Add(effectiveDateItem);  
 

Thanks for any help.

James
Top achievements
Rank 1
 answered on 07 Jul 2010
1 answer
70 views
Hi,
    How can i change texts ('Track Changes' to 'New Note') and ('Initial Content'-'Old Note') in track changes dialog.

    Thanks.

Rumen
Telerik team
 answered on 07 Jul 2010
1 answer
96 views
Hello,

I have large page where radwindow opens upon the click on the control with in the page. The radwindow is set to autosize and heirarchial grid is loaded in window. As a result the grid autosizes. All is well but the on different button click on main page the rad windows moves around the page while resizing. The end user did not like it. They want window to be docked at the top of browser and and any resize done (only vertically) should expand from the top and window will remain docked at the top. That way it will give better user experience.

Is that possible?

I first tried owind.center() but it didnot work well as even with center the window was jumping around. When i set left coordinate 100 and top 0 it opens up file from the top if i set autosize = false.
Fiko
Telerik team
 answered on 07 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?