Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
286 views
am i using a old version or something???

the ddl version says: 2009.3.1103.20

I get unknown server tag trying to use the async upload control

<%@ Register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %>

<telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" OnClientFileUploaded="fileUploaded"></telerik:RadAsyncUpload>

gives unknown server tag error

thanks for any help

Jessica Spaulding
Top achievements
Rank 1
 answered on 05 Apr 2010
2 answers
103 views
Hello,telerik.
When clicking the appointment on scheduler, how customize the form that shows only the subject , start date and finish date etc without adding and updating?

Ramie C
Top achievements
Rank 1
 answered on 05 Apr 2010
6 answers
133 views
Hi,

I have set a timer to fire every 3 seconds. In the timer's function call I am doing a .Rebind()

This causes the grid to disappear and reappear. 

I don't really want to re-render the whole grid - Ideally I would like to just update a couple of cells in the grid.

Is this possible?

thx
Martin Smith
Top achievements
Rank 1
 answered on 05 Apr 2010
3 answers
213 views
I've noticed that when you have DecoratedControls="CheckBoxes,RadioButtons" that the FormDecorater adds the class to the html element and causes my label tags to use the line-height property set by the FormDecorator css class. I know I could overwrite this by setting by explicitly setting the line-height of my label elements in css, but I thought that the FormDecorator would only add the classes to the control they are decoarting, rather than adding it in the html tag forcing any elements below it to follow it styles.

I also understand that the reason it's done this way is to simplify the decoration, but I think it would make more sense to add a class name to the checkbox or radiobutton labels, so that they are the only ones that are controlled by the FormDecorator, instead of other label elements which have nothing to do with the decorated controls.

I hope you could add something like that in your future update of the FormDecorator control.
Tsvetie
Telerik team
 answered on 05 Apr 2010
2 answers
592 views
Hello,

I have looked at several threads here on how to change row color but none seems to fit my requirement. I have a Rad grid that has GridEditCommandColumn and which has the ability to Update the records. My questions is how do I change the color of a row after a successful update. I am using Rad grid Item Command event to update my records:

Here is my code

ASPX:

<telerik:RadGrid runat="server" ID="rgGridResults" GridLines="None" Skin="BallState"
                AllowSorting="true" AllowPaging="true" AllowFilteringByColumn="true" AutoGenerateColumns="false"
                ShowGroupPanel="false" ShowFooter="true"
                OnNeedDataSource="rgGridResults_NeedDataSource"
                OnItemDataBound="rgGridResults_ItemDataBound"
                OnItemCommand="rgGridResults_ItemCommand">
                <ValidationSettings EnableValidation="true" ValidationGroup="vgGrid" />
                <MasterTableView EditMode="InPlace" DataKeyNames="donorid">
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="LinkButton" EditText="Edit" UpdateText="Update"
                            CancelText="Cancel" />
                        <telerik:GridBoundColumn HeaderText="Donor Name" DataField="name" SortExpression="name"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Donor ID" DataField="donorid" SortExpression="donorid"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Spouse ID" DataField="relttnid" SortExpression="relttnid"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Gift ID" DataField="giftid" SortExpression="giftid"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Pledge ID" DataField="pledgeid" SortExpression="pledgeid"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Credit Date" DataField="credtdat" SortExpression="credtdat"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Type" DataField="trantype" SortExpression="trantype"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Legal Amount" DataField="legal_credit" SortExpression="legal_credit"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Soft Credit Amount" DataField="legal_credit"
                            SortExpression="legal_credit" ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Soft Credit Amount" DataField="soft_credit"
                            SortExpression="soft_credit" ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Fund" DataField="fundnum" SortExpression="fundnum"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="Fund Name" DataField="fundname" SortExpression="fundname"
                            ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="System Review Code" DataField="needs_review_code"
                            SortExpression="needs_review_code" ReadOnly="true" />
                        <telerik:GridBoundColumn HeaderText="System Review Comment" DataField="needs_review_comment"
                            SortExpression="needs_review_comment" ReadOnly="true" />
                       
                        <telerik:GridTemplateColumn HeaderText="Encumbered Amount" DataField="match_eligible_amount"
                            SortExpression="match_eligible_amount" ReadOnly="true">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblEncumberedAmount" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridTemplateColumn HeaderText="Disbursed Amount" DataField="disburse_amount"
                            SortExpression="disburse_amount" ReadOnly="true">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblDisbursedAmount" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderText="Disbursed Date" DataField="disburse_date" SortExpression="disburse_date"
                            ReadOnly="true" />
                        <telerik:GridTemplateColumn HeaderText="Household Max" DataField="household_maximum_amt"
                            SortExpression="household_maximum_amt">
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblHouseholdMax" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>

C# code:

protected void rgGridResults_ItemCommand(object sender, GridCommandEventArgs e)
        {
            GridDataItem gdiItem = e.Item as GridDataItem;

            if (gdiItem != null)
            {
                if (e.Item.IsInEditMode)
                {
                    switch (e.CommandName)
                    {
                        case "Update":
                            Page.Validate("vgGrid");

                            if (Page.IsValid)
                            {                                
                                int intDonorID;

                                if (int.TryParse(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["donorid"].ToString(), out intDonorID))
                                {
                                    e.Item.CssClass = "RowColor";
                                   /* Data.Registered.Update(intGradID, intConfYear, tbxBadgeName.Text, rbtnlNotAttendingBsu.SelectedValue, rbtnlRsvp.SelectedValue,
                                                           rbtnlOffCampus.SelectedValue, rbtnlTeaching.SelectedValue, rbtnlResearch.SelectedValue, rbtnlLab.SelectedValue,
                                                           rbtnlOther.SelectedValue);

                                    //Call this method to update the total after the update is sucessfully completed.
                                    GetGridTotals();
                                    rgRegistered.Rebind();*/
                                }
                            }
                            else
                            {
                                rgGridResults.Controls.Add(new LiteralControl(string.Format("<span class=\"ErrorText\">There was an error updating the record.</span>")));
                            }
                            break;
                    }
                }
            }
        }

Kindly let me know a work around for this..

Thanks..
thecruciable
Top achievements
Rank 1
 answered on 05 Apr 2010
4 answers
135 views
I'm having a problem with PDF exporting from RadGrid.
Basically the programmatic styles I apply to the columns and cells are not getting applied if I export using Internet Explorer. Firefox and Chrome work fine. I'm utterly at a loss as to how this happens, here is the style-specific code I use:

protected void btnExport_Click(object sender, EventArgs e) 
    { 
        isExport = true; 
        List_SelectedIndexChanged(new object(), new EventArgs()); //this applies a filter expression based on front end controls 
        ApplyColumnSettings(); 
        
        G1.ExportSettings.ExportOnlyData = true; 
        G1.ExportSettings.OpenInNewWindow = true; 
        G1.ExportSettings.FileName = "FileName"; 
        G1.ExportSettings.Pdf.Title = "Title"; 
        G1.ExportSettings.Pdf.Author = "Author"; 
        expanded = new bool[G1.Items.Count];             
        foreach (GridDataItem i in G1.Items) 
        { 
            if (i.Expanded) 
                expanded[i.ItemIndex] = true; 
            else 
                expanded[i.ItemIndex] = false; 
        } 
        G1.MasterTableView.ExportToPdf(); 
    } 
protected void ApplyColumnSettings() 
    { 
        foreach (GridColumn col in G1.MasterTableView.Columns) 
        {           
            switch (col.UniqueName) 
            { 
                case "exCol": col.Visible = false; break; 
                case "ExpandColumn": col.Visible = false; break; 
                case "ItemNumber": col.Visible = false; break; 
                case "ItemNumberLink": col.Visible = true; col.HeaderStyle.Width = Unit.Pixel(37);break; 
                case "COURSE_ID": col.HeaderStyle.Width = Unit.Pixel(130); break; 
                case "COURSE_TITLE": col.HeaderStyle.Width = Unit.Pixel(255); break; 
                case "INSTR_NAME": col.HeaderStyle.Width = Unit.Pixel(80); break; 
                case "day_CD": col.HeaderStyle.Width = Unit.Pixel(100); break; 
                case "time": col.HeaderStyle.Width = Unit.Pixel(120); break; 
                case "room_loc": col.HeaderStyle.Width = Unit.Pixel(130); break; 
                case "BRANCH": col.HeaderStyle.Width = Unit.Pixel(100); break; 
                case "type": col.HeaderStyle.Width = Unit.Pixel(70); break; 
                case "SeatsLeft": col.HeaderStyle.Width = Unit.Pixel(70); break; 
                case "cr": col.HeaderStyle.Width = Unit.Pixel(50); break; 
                 
            }                 
        } 
    } 
 
    protected void G1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (isExport)         
            ApplyPDFStyles(e.Item);         
    } 
 
protected void ApplyPDFStyles(GridItem item) 
    { 
        if (item is GridHeaderItem)                         
            item.Style["background-color"] = "#EEEEEE";         
        foreach (TableCell cell in item.Cells)         
            cell.Style["text-align"] = "left"; 
         
    } 
 


I've attached a picture showing how the header styles come out (the data fallows the same patterns), notice how the far right column gets chomped off all together...

Any ideas?
Adam
Top achievements
Rank 1
 answered on 05 Apr 2010
2 answers
511 views
Hello, I have recently migrated a scorecard system from the RadControls_Q1_2007_SP2 to RadControls_for_ASP.NET_AJAX_2009_3_1208_dev. One of the features that seemed to be inherently built in was a consistent format in the excel output. A large chunk of the data is in percent form. It displays fine in the grid, but when I am exporting it, it returns to a standard decimal format. The data stays correct, but I cannot get the percent format in the export. Here is the aspx for the column that is calculated from the data source.

                <telerik:GridBoundColumn Visible="False" DataField="AvgQA_Export" HeaderText="Avg. QA" UniqueName="colAvgQA_Export"> 
                    <HeaderStyle BackColor="#FFCC00" CssClass="rgYellow" HorizontalAlign="Center" /> 
                    <ItemStyle HorizontalAlign="Right" /> 
                </telerik:GridBoundColumn> 

Here is the codebehind  to generate the value of the field:

 Protected Sub rgScorecard_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles rgScorecard.ItemDataBound 
   If TypeOf e.Item Is GridDataItem Then 
                Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) 
  ' QA 
                ' -------------------------------------------- 
                If dataItem("colQAScore").Text = 0 Or dataItem("colQANumEvals").Text = 0 Then 
                    dataItem("colAvgQA").Text = "<a href='#' class='info'><span class='info'>" & dataItem("colSupName").Text & "<br>'Avg. QA'<br>GOAL: " & FormatPercent(m.goal("AvgQA"), 3) & "<hr>Total QA Score: " & dataItem("colQAScore").Text & "<br># QAs: " & dataItem("colQANumEvals").Text & "<hr>" & dataItem("colQAScore").Text & "/" & dataItem("colQANumEvals").Text & "</span>" & FormatPercent(0, 3) & "</a>" 
                    dataItem("colAvgQA_Export").Text = FormatPercent(0, 3) 
                Else 
                    dataItem("colAvgQA").Text = "<a href='#' class='info'><span class='info'>" & dataItem("colSupName").Text & "<br>'Avg. QA'<br>GOAL: " & FormatPercent(m.goal("AvgQA"), 3) & "<hr>Total QA Score: " & dataItem("colQAScore").Text & "<br># QAs: " & dataItem("colQANumEvals").Text & "<hr>" & dataItem("colQAScore").Text & "/" & dataItem("colQANumEvals").Text & "</span>" & FormatPercent(Double.Parse(dataItem("colQAScore").Text) / Integer.Parse(dataItem("colQANumEvals").Text) / 100, 3) & "</a>" 
                    dataItem("colAvgQA_Export").Text = FormatPercent(Double.Parse(dataItem("colQAScore").Text) / Integer.Parse(dataItem("colQANumEvals").Text) / 100, 3) 
                End If 
As you can see, we have a column with a span that creates a popup, and then a column appended with "_Export" That holds just the data.

We adjust the visibility on export as follows:

 Protected Sub btExcel_Click(ByVal sender As Object, ByVal e As EventArgs) Handles DateControl.Export 
 
        rgscorecard.Rebind  
        rgScorecard.Columns.FindByUniqueNameSafe("colAvgQA").Visible = False 
        rgScorecard.Columns.FindByUniqueNameSafe("colAvgQA_Export").Visible = True 
        rgScorecard.ExportSettings.OpenInNewWindow = True 
        rgScorecard.ExportSettings.ExportOnlyData = False 
        rgScorecard.ExportSettings.FileName = "Sups_Tiers_Scorecard_" & DateControl.SCFrom & "_thru_" & DateControl.SCTo 
        rgScorecard.MasterTableView.ExportToExcel() 
End Sub 

I've tried modifying the ExportOnlyData field, and adding the following as well, nothing seems to work to get the percent formatted. Any help would be greatly appreciated.

 
    Private Sub rgScorecard_ExcelExportCellFormatting(ByVal source As Object, ByVal e As Telerik.Web.UI.ExcelExportCellFormattingEventArgs) Handles rgScorecard.ExcelExportCellFormatting 
        If TypeOf e.FormattedColumn Is GridBoundColumn Then 
            Dim column As GridBoundColumn = CType(e.FormattedColumn, GridBoundColumn) 
            If column.HeaderText.Contains("%") Then 'ALL REQUIRED COLUMNS CONTAIN THE PERCENT SIGN IN THE HEADER 
                column.DataFormatString = "{0:D4}" 
            End If 
        End If 
    End Sub 




JSaultz
Top achievements
Rank 1
 answered on 05 Apr 2010
10 answers
190 views
    <asp:Panel ID="Panel1" runat="server" Width="800px" ScrollBars="Auto">  
        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"   
            AutoGenerateColumns="False" Skin="Office2007"   
            onneeddatasource="RadGrid1_NeedDataSource">  
            <MasterTableView DataKeyNames="PaymentFrequencyID" EditMode="InPlace" Width="2000px">  
                <Columns> 
                    <telerik:GridTemplateColumn DataField="Disabled" DataType="System.Boolean"   
                        HeaderText="Disabled"   
                        UniqueName="Disabled">  
                        <ItemTemplate> 
                            <asp:CheckBox ID="chkDisabled" runat="server" Checked='<%# Bind( "Disabled" ) %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <Resizing AllowColumnResize="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
        <asp:Button ID="Button1" runat="server" Text="Button" /> 
    </asp:Panel> 
 
Here is simple page
and below is the code
    class TestDIVBorder  
    {  
        public int PaymentFrequencyID { get; set; }  
        public bool Disabled { get; set; }  
    }  
 
    public partial class WebForm1 : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
        }  
 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
        {  
            var list = new List<TestDIVBorder>();  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 1, Disabled = true });  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 2, Disabled = true });  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 3, Disabled = true });  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 4, Disabled = true });  
            list.Add(new TestDIVBorder() { PaymentFrequencyID = 5, Disabled = true });  
 
            RadGrid1.DataSource = list;  
        }  
    }  
 

Below you can see 2 images when scroll in different positions and you may see the line. How can I fix it?
I see it this way only in IE8.
James Faw
Top achievements
Rank 1
 answered on 05 Apr 2010
0 answers
129 views
I went a different route on this one, and did a complete custom script that allows me to do a multiple upload without using the demo script, though I did use some of the code from it to complete the task.

I will make a demo later on on doing a custom Multi-Upload with Thumbnail creation for others to learn by.

Thank you for a awesome component set, works like a charm.
Wayne
Wayne Barron
Top achievements
Rank 1
 asked on 05 Apr 2010
1 answer
74 views
Hi ,
    I want to import a different css file for IE7 which i am able to achieve using the following.
 
  <!--[if gte IE 7]> 
  <style type="text/css">@import '/SharedResources/Css/actionheader_ie.css';</style> 
<![endif]-->


But, the above line disables Ajax. (It says RadAjaxManager is NULL) Any idea what could be the reason for this?
and also is there any other way to include different css file which will not disable Ajax?

Waiting for your reply.

Thank You.
Dimo
Telerik team
 answered on 05 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?