Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
192 views
I need to set up a RadGrid to search a large customer database. Once I have found a particular customer I need to select that RadGrid Row and set the different column values of the Row as Session Variables to be available on another page (this is shopping cart application on the Admin part of the site where Admins can add an order for the customer). I've browsed through a bunch of the documentation but haven't been able to figure out how to do this. Any suggestions?

Rick
Yavor
Telerik team
 answered on 23 Mar 2010
9 answers
199 views
I just upgraded my Rad Controls for ASPNet AJAX to Q3 2008 and during testing I noticed a weird bug.  If I move the scroll bar on the rad editor control after pressing the save button, which saves to a sql database,  I get the following error: "Line 7567  Error: Could not complete the operation due to error 800a025e".  I debuged the error and it was thrown out of the ScriptResource.axd file.  Even though the page errors, the rad editor data is still saved to the database.

Below is my ASPX Code

 

<

asp:UpdatePanel  

runat="server" UpdateMode="Conditional" ID="UpdatePanelED">

 

 

 

<contenttemplate>

 

 

 

<telerik:RadEditor id="RadEditorED" Width="100%" Runat="server" Skin="Outlook">

 

 <Content>

 

 

</Content>

 

 

 

</telerik:RadEditor>

 

 

 

<BR />

 

 

 

<CENTER><asp:Button id="btnSaveED" onclick="btnSaveED_Click" runat="Server" CssClass="Normal" Text="Save Extended Detail"></asp:Button></CENTER>

 

 

 

</contenttemplate>

 

 

 

<Triggers><asp:AsyncPostBackTrigger ControlID="lstReportsED"></asp:AsyncPostBackTrigger></Triggers>

 

 

 

</asp:UpdatePanel>

 

 

 

 

 


Bloew is my C# save button code.

protected

void btnSaveED_Click(object sender, EventArgs e)

{

 

ICAdminWebService_V2_2_Long.updateExtendedDetail(Convert.ToInt32(lstReportsED.SelectedValue), RadEditorED.Content);

 

 

 }

 

 

Rumen
Telerik team
 answered on 23 Mar 2010
3 answers
113 views
I am using a RadInputManager to validate the input of a textbox. If a user types in invalid characters into that textbox it shows the warning message. If they leave it that way and hit the save button when they go back to that textbox the original value has been cleared. Is there any way to not clear out the original value when they hit save?
Yavor
Telerik team
 answered on 23 Mar 2010
1 answer
199 views
I have a radgrid from which i insert/edit records via a usercontrol.

In my code behind, i want to call RadAlert when my textbox is empty.
I have read alot of examples and non of them suites my problem.
Here is the code 

.ASPX(page)
<%@ Page Language="C#" MasterPageFile="~/Resources/MasterPages/Parameters.Master" AutoEventWireup="true" CodeFile="Intake.aspx.cs" Inherits="WebForms_Intake" Title="Intake" %>
<%@ Register assembly="RadGrid.Net2" namespace="Telerik.WebControls" tagprefix="rad" %>


<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server" >
    <h2>Intake</h2>    
    <rad:RadGrid ID="IntakeGrid" runat="server" OnNeedDataSource="IntakeRadGrid_NeedDataSource" 
    OnDeleteCommand="IntakeRadGrid_DeleteCommand"  AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" 
         EnableAJAX="True" GridLines="None" 
        RadControlsDir="~/Resources/RadControls/" Skin="Web20" 
        SkinsPath="~/Resources/RadControls/Grid/Skins" Width="750px">
        <MasterTableView AllowMultiColumnSorting="True" DataKeyNames="Id" 
             CommandItemDisplay="Top">
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <rad:GridEditCommandColumn ButtonType="ImageButton" 
                    EditImageUrl="~/Resources/Buttons/EditButton.jpg" >
                </rad:GridEditCommandColumn>
                <rad:GridBoundColumn DataField="Id" HeaderText="ID" 
                    SortExpression="Id" UniqueName="Id">
                </rad:GridBoundColumn>
                <rad:GridBoundColumn DataField="IntakeName" HeaderText="Intake" 
                    SortExpression="IntakeName" UniqueName="Intake">
                </rad:GridBoundColumn>
                <rad:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" 
                    ImageUrl="~/Resources/Buttons/DeleteButton.jpg"  Text="Delete" UniqueName="column">
                </rad:GridButtonColumn>
                
            </Columns>

                    <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/Parameters/EditIntake.ascx" >
                        <EditColumn UniqueName="EditIntakeGrid" >
                        </EditColumn>
                    </EditFormSettings>
        </MasterTableView>
    </rad:RadGrid>
    
       

</asp:Content>
.ASPX.CS
using System;
using System.Collections;
using System.Configuration;
using System.Data;
 
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.WebControls;
using ARIMS.BusinessLogic;

    public partial class WebForms_Intake : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindRecords();

            }
        }


        protected void BindRecords()
        {
            IntakeGrid.DataSource = (object)ParameterManager.IntakeCollection();
            IntakeGrid.DataBind();


        }

        protected void IntakeRadGrid_NeedDataSource(object source, Telerik.WebControls.GridNeedDataSourceEventArgs e)
        {
            IntakeGrid.DataSource = (object)ParameterManager.IntakeCollection();

        }

        protected void IntakeRadGrid_DeleteCommand(object source, Telerik.WebControls.GridCommandEventArgs e)
        {
            //Get the GridDataItem of the RadGrid     
            GridDataItem item = (GridDataItem)e.Item;
            //Get the primary key value using the DataKeyValue.     
            int IntakeID = Convert.ToInt32(item.OwnerTableView.DataKeyValues[item.ItemIndex]["Id"].ToString());
            try
            {

                ParameterManager.IntakeDelete(IntakeID);
            }
            catch (Exception ex)
            {
                IntakeGrid.Controls.Add(new LiteralControl("Unable to Delete Record. Reason: " + ex.Message));
                e.Canceled = true;
            }

        }



    }
.ASCX
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditIntake.ascx.cs"
    Inherits="WebForms_EditIntake" %>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<table>
    <tr>
        <td>
            <asp:Label ID="lblIntake" runat="server">Intake:</asp:Label>
        </td>
        <td>
            <rad:RadTextBox ID="IntakeTextBox" Text='<%# Eval("IntakeName") %>' runat="server"
                Skin="Web20" SkinsPath="~/Resources/RadControls/Input/Skins">
            </rad:RadTextBox>
            <asp:RequiredFieldValidator ID="RequiredIntakeTextBox" ValidationGroup="validD" runat="server" ErrorMessage="<br>* Required"
                                    ControlToValidate="IntakeTextBox"></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
        <td>
            <asp:ImageButton ID="LinkInsert" ValidationGroup="validD" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                ImageUrl="~/Resources/Buttons/SaveButton.jpg" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                OnClick="IntakeInsert" Visible='<%# (Container is GridEditFormInsertItem) ? true : false %>' />
            <asp:ImageButton ID="LinkUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                ImageUrl="~/Resources/Buttons/SaveButton.jpg" runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                OnClick="IntakeUpdate" Visible='<%# (Container is GridEditFormInsertItem) ? false : true %>' />
            <asp:ImageButton ID="LinkButtonCancel" ImageUrl="~/Resources/Buttons/CancelButton.jpg"
                runat="server" Text="Cancel" CausesValidation="false" CommandName="Cancel" />
        </td>
    </tr>
    <tr>
        <td>
            <rad:RadTextBox ID="IDTextBox" Text='<%# Eval("Id") %>' runat="server" Skin="Web20"
                Visible="false" SkinsPath="~/Resources/RadControls/Input/Skins">
            </rad:RadTextBox>
        </td>
    </tr>
</table>

.ASCX.CS
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Telerik.QuickStart;
using Telerik.WebControls;
using ARIMS.BusinessLogic;


public partial class WebForms_EditIntake : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void IntakeInsert(object sender, EventArgs e)
    {
        ParameterManager.IntakeInsert(IntakeTextBox.Text);
    }

    protected void IntakeUpdate(object sender, EventArgs e)
    {
        ParameterManager.IntakeUpdate(Convert.ToInt32(IDTextBox.Text), IntakeTextBox.Text);
    }
}

Now, What i want to do is within Protected void IntakeUpdate(object sender, EventArg e) method.

I want to write something like

If(IntakeTextBox.Text==String.Empty)
{
RadAjaxManager1.ResponseScripts.Add(@"radalert('You can't update empty fields <b>Prometheus</b>!', 330, 210);");
}
else
{
//Update the records
}

I need to return an alert.
But when i click the button, nothing happens.

Please, I desperately need your help.

thanks.
Princy
Top achievements
Rank 2
 answered on 23 Mar 2010
1 answer
138 views
how can i user one control with radmenu, but i donot want to radmenu wrap, i hope control follow radmenu

i mean radmenu with other control in a line , not in two line

thinks!!!

<a href="HomePage.aspx"><img src="images/LOGO.png" alt=""/></a> 

<telerik:RadMenu ID="RadMenu1" runat="server">                                               
                        <Items>                                                        
                            <telerik:RadMenuItem runat="server" Target="content" Text="專利評估資訊"><Items>
                            <telerik:RadMenuItem runat="server" Text="查詢專利評估資訊" 
                                                   NavigateUrl="~/QueryAppItemList.aspx"         Visible="False"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="案清單" NavigateUrl="~/AppList.aspx"></telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="件清單" NavigateUrl="~/AppItemList.aspx"></telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>
                   
                        <telerik:RadMenuItem runat="server" Text="專家資訊" Visible="False">
                            <Items>
                                <telerik:RadMenuItem runat="server" Text="查詢專家資訊" NavigateUrl="QueryExpert.aspx">
                                </telerik:RadMenuItem>
                                <telerik:RadMenuItem runat="server" Text="專家清單" NavigateUrl="ExpertList.aspx">
                                </telerik:RadMenuItem>
                            </Items>
                        </telerik:RadMenuItem>
                        </Items>                       
                        <CollapseAnimation Duration="200" Type="OutQuint" />
                    </telerik:RadMenu> 
                        
Yana
Telerik team
 answered on 23 Mar 2010
1 answer
69 views
Hello,
i have a problem with the radgrid and frozen columns.
sometimes the horizontal scrollbar disapears.

i can reproduce this problem on your "Grid / Frozen Columns" demo
(http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/frozencolumns/defaultcs.aspx)

1. open IE 8.0.6001.18702 (not maximized)
2. open the demo page
3. scroll to the right side of the grid
4. minimize the browser to the taskbar
5. open the browser again and the scrollbar is gone

i can't reproduce this problem with firefox
----------------------------------------------------------------------------------
but with firefox 3.6 i have found an other problem

1. open firefox (not maximized)
2. open the demo page
3. scroll to the right side of the grid
4. maximize firefox and the scrollbar is gone

i need the frozencolumns very urgent but i can't use this function until 
this problem is solved. 

Pavlina
Telerik team
 answered on 23 Mar 2010
1 answer
190 views
I don't think there is any way of doing this but I figured I would ask in case someone out there is a genius. I have multiple recurring appointments created and I am trying to find a way to sum up or count the total hours I have scheduled. For example, an appointment is setup for Monday 8-5, which is 9 hours. If the appointment reoccurs every Monday for a year, how many hours do I have scheduled? I know I can take 9 x 52, but that isn't exactly exact. Besides if I have a time frame 1/1 to 4/1 and/or multiple records for Monday.
I need a way, more or less, of showing the client how many hours they have scheduled in a given time period.

Anyone have any suggestions?
Peter
Telerik team
 answered on 23 Mar 2010
10 answers
304 views
Hi ,
In our application we are giving provision to user  Filter grid data  and Edit functionality but edit is not working correctly after applying the filters , grid set first row in edit instead of first row of filter data items. 
if any one implemented  like this ,  please let know me approach you followed . 

Koteswararao    
chinna
Top achievements
Rank 1
 answered on 23 Mar 2010
2 answers
130 views
Hi there,

I have a radgrid which is created dynamically in C#. Now I want to add a new dynamic row which should be different in every row. I have managed adding a new link coloumn, however it seems same in every row.

Here is the code;

        public void Gridi_Getir() 
        { 
            DataSet musteriDataSet = new DataSet(); 
            musteriDataSet = bllMusteri.MusteriGetir(); 
            DataView musteriDataView = musteriDataSet.Tables["Musteriler"].DefaultView; 
            RadGrid1.DataSource = musteriDataView; 
             
            for (int i = 0; i < musteriDataView.Count; i++) 
            { 
                dtoMusteri musteri = new dtoMusteri(); 
                musteri.MusteriID = Convert.ToInt32(musteriDataView[i].Row.ItemArray[0]);  
                HesapKartlariniGetir(musteri, i); 
            } 
 
            RadGrid1.DataBind(); 
        } 
 
        public void HesapKartlariniGetir(dtoMusteri musteri, int k) 
        { 
            ArrayList hesapKartlari = bllMusteriHesapKarti.MusteriIDyeGoreMusteriHesapKartiGetir(musteri.MusteriID); 
 
            for (int i = 0; i < hesapKartlari.Count; i++) 
            { 
                //TableCell cell = new TableCell(); 
 
                //cell.Text = ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiAdi; 
 
                GridHyperLinkColumn column = new GridHyperLinkColumn(); 
                //column.InitializeCell(cell, i, RadGrid1.Items[k]); 
                column.ItemStyle.Font.Name = "Tahoma"
                column.Text = ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiAdi; 
                column.NavigateUrl = "MusteriHesapKartiDetay.aspx?MusteriHesapKartID=" + ((CoalSoft.DTO.dtoMusteriHesapKarti)(hesapKartlari[i])).MusteriHesapKartiID; 
 
                RadGrid1.Columns.Insert(i + 4, column); 
            } 
        } 

Thanks.
Veli
Telerik team
 answered on 23 Mar 2010
4 answers
228 views
Hi,
    Basically i want to fire the following server side code 
GridFilteringItem filterItem = (GridFilteringItem)((RadComboBox)o).NamingContainer;filterItem.FireCommandEvent("Filter", new Pair("Contains", this.UniqueName));

form client side when we press the enter key at the input box having the autocomplete enable in the grid.


Thanks in advance,
Sanjeev
Sanjeev
Top achievements
Rank 1
 answered on 23 Mar 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?