Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
78 views
How do you set a MaxLength of edit textboxes at runtime if you don't know the control name? All my columns are autogenerated based on the dataset coming back from a stored proc. 
Kate
Top achievements
Rank 1
 answered on 01 Aug 2014
2 answers
407 views
Good morning,
I have a Radgrid in my aspx.page with some columns:

<telerik:RadGrid ID="EmplReqGrid" runat="server" Skin="Office2010Blue"
GridLines="None" AllowPaging="true" AllowSorting="true"
onexcelmlexportrowcreated="EmplReqGrid_ExcelMLExportRowCreated"
onexcelmlexportstylescreated="EmplReqGrid_ExcelMLExportStylesCreated"
onitemcommand="EmplReqGrid_ItemCommand" onitemcreated="EmplReqGrid_ItemCreated"
onitemdatabound="EmplReqGrid_ItemDataBound"
onneeddatasource="EmplReqGrid_NeedDataSource"
onpageindexchanged="EmplReqGrid_PageIndexChanged"
onpagesizechanged="EmplReqGrid_PageSizeChanged"
onpdfexporting="EmplReqGrid_PdfExporting"
onsortcommand="EmplReqGrid_SortCommand" >
<ExportSettings FileName="EmplReqRpt" OpenInNewWindow="true" IgnorePaging="true" ExportOnlyData="true">
<Excel Format="ExcelML" FileExtension="xls"/>
<Pdf FontType="Subset" PaperSize="letter" />
</ExportSettings>
<MasterTableView AutoGenerateColumns="false" AllowMultiColumnSorting="true" >
<CommandItemSettings />
<Columns>

<telerik:GridBoundColumn HeaderText="Eis-Id" DataField="PRI" UniqueName="PRI" ReadOnly="True" SortExpression="PRI" HeaderButtonType="TextButton" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="NAME" DataField="NAME" UniqueName="NAME" Visible="false" >
</telerik:GridBoundColumn>
<telerik:GridBoundColumn HeaderText="ReqNo" DataField="TRKNO" UniqueName="TRKNO" ReadOnly="True" SortExpression="TRKNO" HeaderButtonType="TextButton" >
</telerik:GridBoundColumn>

I would like to hide column name "NAME" from radgrid when displaying on the screen and unhide when I click on export to excel button:

protected void ExporttoExcel_Click1(object sender, ImageClickEventArgs e)
{
try
{
if (!IsPostBack)
return;

RadGrid ReqInfoGrid = (RadGrid)EmpReqReport.FindItemByValue("EmployeeData").FindControl("EmplReqGrid");
ReqInfoGrid.DataSource = Session["dtGrid"];
ReqInfoGrid.DataBind();
ReqInfoGrid.MasterTableView.ExportToExcel();

Please help.
Thanks so much.


}
catch (Exception ex)
{
throw;
}
}
Vitaly
Top achievements
Rank 1
Iron
Iron
 answered on 01 Aug 2014
3 answers
111 views
Hello,
I've downloaded the telerik scheduler.
when I use the "RadSchedule Scenario Wizard"  to add Web Service with Customer Provider, everything works fine.
I would like to make a change to allow Multiple Resources be selected.

I can see the following code in MyDbSechedulerProvider.cs ... However I cannot select more than 1 teacher and 1 student per appointment


public override IEnumerable<Resource> GetResourcesByType(RadScheduler owner, string resourceType)
{
    switch (resourceType)
    {
        case "Teacher":
            return Teachers.Values;
 
        case "Student":
            return Students.Values;
 
        default:
            throw new InvalidOperationException("Unknown resource type: " + resourceType);
    }
}
 
public override IDictionary<ResourceType, IEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)
{
    var resCollection = new Dictionary<ResourceType, IEnumerable<Resource>>();
 
    resCollection.Add(new ResourceType("Teacher", false), Teachers.Values);
    resCollection.Add(new ResourceType("Student", true), Students.Values);
 
    return resCollection;
}
 
public override IEnumerable<ResourceType> GetResourceTypes(RadScheduler owner)
{
    var resourceTypes = new ResourceType[2];
    resourceTypes[0] = new ResourceType("Teacher", false);
    resourceTypes[1] = new ResourceType("Student", true);
 
    return resourceTypes;
}
Boyan Dimitrov
Telerik team
 answered on 01 Aug 2014
1 answer
62 views
Hey, so I am fairly new to JS and Kendo UI and was hoping someone could direct me in the right direction to achieve my goal.  Basically I am wanting to have a grid that allows me to expand each row to see further detail about the data in that row.  For example:

Month  MoneySpent  PointsAccrued
July     $5,000          396

I would like to be able to click on the data row July and it look like this:

Month         MoneySpent          PointsAccrued
July             $5,000                    400
    Food      $2,500                    200
    Bills        $2,500                    200

As you can see, it is a breakdown of the original data row.  Would I use hierarchical or aggregates to achieve this?  Or did I overlook another possible approach?  Thanks ahead for your help
Pavlina
Telerik team
 answered on 01 Aug 2014
1 answer
53 views
Hi ,

How do i hide no child records in my hierarchy grid, it should hide for those items that doesnt have child items.


Regards,
Khushboo
Shinu
Top achievements
Rank 2
 answered on 01 Aug 2014
11 answers
499 views
I have avoided your product for a long time and now I feal justified in that decisision. Unfortunatley I am now working for a shop that uses Telerik controls. Not only are they difficult to use but in a lot of cases they do not even have the normal ASP expected behaviour. I have lost two days trying to get the selected item value form a RadListBox inside a RadAjaxPanel code as below, simple really, the event "test" on the code behind fires but the sender has no selected value. I suspect it is more the AjaxPanel than the Listbox causing the problem.

When I use client side code it works fine, but thats not what I want, I just want to get the value selected when an item is selected.

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
         <telerik:RadListBox ID="lstTRBStandard" 
                                        DataTextField="SubjectAreaName"
                                        DataValueField="SubjectAreaId"
                                        Height="350px"
                                        Width="240px"
                                        runat="server"
                                        OnClientSelectedIndexChanged="test"
                                        AutoPostBack="true" >
                                    </telerik:RadListBox>
</telerik:RadAjaxPanel>

Can someone please show me how this can work.
Phanindra
Top achievements
Rank 1
 answered on 01 Aug 2014
4 answers
117 views
When uploading a file using AsyncUpload, the delete button correctly uses the string I set up for localization. However, after a postback, the same button does not get translated.
The code I'm using resembles this one below.

I found out that the method _marshalUploadedFiles â€‹inside RadAsyncUploadScripts.js uses a hard-coded string in English to generate the button. It does not want to use the localization.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server" />
        <telerik:RadAsyncUpload Localization-Remove="Supprimer" runat="server" ID="upload" PostbackTriggers="btn2"></telerik:RadAsyncUpload>
        <asp:Button runat="server" Text="Intermediate postback" ID="btn1" />
        <asp:Button runat="server" Text="Final postback" ID="btn2" />
    </form>
</body>
</html>
Nencho
Telerik team
 answered on 01 Aug 2014
6 answers
261 views
Hi,

I recently changed one of my Telerik web applications over to the "silk" theme, as it seems very well done indeed.

However, I have a minor problem. In my RadToolbar instances, it's very difficult to read the text of RadToolbarButtons when they are disabled. The disabled text color is simply too light.

I'm attaching a screenshot of my application toolbar so you can see what I mean. The "restore" and "edit" buttons are both disabled, and their captions are very difficult to read.

How can I change the text color for these disabled buttons?
Magdalena
Telerik team
 answered on 01 Aug 2014
1 answer
87 views
Hello, Telerik Team.
We ran into a weird problem. The scrolling function does not work properly in IE 11 (I think IT restricts the policy to IE 8 or under in the domain since I did not find any issue in my home laptop IE 11).

Here is the page code.
<telerik:RadGrid ID="RotateGrid" Width="950px" runat="server" GridLines="None"
                    AllowPaging="false" AllowSorting="false" PageSize="10" Visible="true"
                    Skin="Vista" HeaderStyle-Font-Bold="true" OnItemDataBound="RotateGrid_ItemDataBound">
                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="None" CurrentResetPageIndexAction="SetPageIndexToFirst"
                        Dir="LTR" Frame="Border" TableLayout="Fixed" HeaderStyle-Font-Bold="true">
                        <Columns>
                            <telerik:GridBoundColumn DataField="AcademicYear" HeaderText="Academic Year" Visible="True" HeaderStyle-Width="85px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Period" HeaderText="Period" Visible="True" HeaderStyle-Width="40px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="StartDate" HeaderText="Start" Visible="True" HeaderStyle-Width="70px" DataFormatString="{0:M/d/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="EndDate" HeaderText="End" Visible="True" HeaderStyle-Width="70px" DataFormatString="{0:M/d/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Preceptor" HeaderText="Preceptor" UniqueName="Preceptor" Visible="True" HeaderStyle-Width="188px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Preceptor" HeaderText="PreceptorHid" UniqueName="PreceptorHid" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rotation" HeaderText="Rotation" UniqueName="Rotation" Visible="True" HeaderStyle-Width="188px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Rotation" HeaderText="RotationHid" UniqueName="RotationHid" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Team" HeaderText="Team" Visible="True" HeaderStyle-Width="35px" Display="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="HoStatus" HeaderText="HO" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="AttStatus" HeaderText="Att" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="RotStatus" HeaderText="Rot" Visible="True" HeaderStyle-Width="32px">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="StudentYear" HeaderText="StudentYear" Display="false" HeaderStyle-Width="0px">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType">
                            </EditColumn>
                        </EditFormSettings>
                    </MasterTableView>
                    <ClientSettings>
                        <Scrolling AllowScroll="true" UseStaticHeaders="True" ScrollHeight="370px"></Scrolling>
                    </ClientSettings>
                </telerik:RadGrid>

Back-End C#:
protected void Page_Load(object sender, EventArgs e)
    {
        IsValidUser();
 
        using (var context = new CourseInformationDataContext())
        {
            var studentId = (string)Session["StudentID"];
            var classMemberList = from cm in context.Class_Members
                                  join sm in context.CO_StudentMappings on cm.ID equals sm.WesternU_Id
                                  where cm.ID == studentId
                                  select new
                                  {
                                      // use  ?? "null coalescing" operator to handle nulls
                                      Last = cm.Last ?? "",
                                      First = cm.First ?? "",
                                      Nickname = cm.Nickname ?? "",
                                      PhotoURL = cm.PhotoURL ?? "",
                                      StudentID = cm.ID ?? "",
                                      Class = cm.Class ?? "",
                                      MediTrekId = sm.MediTrek_Id ?? "",
                                  };
 
            foreach (var member in classMemberList)
            {
                Class.Text = member.Class;
                StudentId.Text = "WU ID: " + member.StudentID;
                MediTrekId.Text = "MediTrek ID: " + member.MediTrekId;
                MediTrekIdHid.Value = member.MediTrekId;
                LastNameLbl.Text = member.Last.ToString();
 
                // concatenate the names if nickname is present
                if (!string.IsNullOrEmpty(member.Nickname.ToString()))
                {
                    FirstNameLbl.Text = member.First.ToString() + "  (" + member.Nickname.ToString() + ")";
                }
                else
                {
                    FirstNameLbl.Text = member.First.ToString();
                }
 
                StudentImage.ImageUrl = AppSolution.ImageVal(Server, "~/Pics/" + member.PhotoURL.ToString());
 
                if (Session["Demonstration"] == "true")
                {
                    StudentImage.CssClass = "blurImage";
                    LastNameLbl.Text = DemoWordsWithGUID(LastNameLbl.Text.Length);
                    FirstNameLbl.Text = DemoWordsWithGUID(FirstNameLbl.Text.Length);
                    StudentId.Text = "WU ID: @123456789";
                    MediTrekId.Text = "MediTrek ID: 123456";
                    DemoModeCreator dmc = new DemoModeCreator();
                    StudentImage.ImageUrl = "~/Pics/" + dmc.DemoImage(member.PhotoURL.ToString());
                }
            }
 
            //Rotation Schedule Grid
            var rotateList = from mts in context.CO_MediTrekEvalStatus
                             join sm in context.CO_StudentMappings on mts.StudentMediTrekId equals sm.MediTrek_Id
                             where sm.WesternU_Id.Equals(studentId)
                             orderby mts.StartDate
                             select mts;
 
            RotateGrid.DataSource = rotateList;
            RotateGrid.DataBind();
        }
    }
 
    protected void RadComboBox1_ItemDataBound(object sender, RadComboBoxItemEventArgs e)
    {
        CO_MediTrekEvalDetail item = e.Item.DataItem as CO_MediTrekEvalDetail;
        e.Item.Text = item.FromDate.GetValueOrDefault().ToString("MM/dd/yyyy") + " - " + item.Preceptor + "@" + item.Rotation;
        e.Item.Value = item.CompositeKey;
    }
 
    protected void RotateGrid_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem item = (GridDataItem)e.Item;
            DateTime now = DateTime.Now;
            DateTime from = Convert.ToDateTime(item["StartDate"].Text);
            DateTime to = Convert.ToDateTime(item["EndDate"].Text);
            if (from == null || to == null)
                return;
 
            to = to.AddDays(1);
 
            if (now.Ticks >= from.Ticks && now.Ticks <= to.Ticks)
            {
                item.BackColor = System.Drawing.Color.LightGreen;
            }
 
            int len = 29;
            string tx1 = item["Preceptor"].Text;
            if (tx1.Length > len)
                item["Preceptor"].Text = "<div onmouseover=\"ShowLongString(this);\" onmouseout=\"ShowShortString(this);\"><span class=\"short\">" + tx1.Substring(0, len) + "...</span><span class=\"long\" style=\"display:none;\">" + tx1 + "</span></div>";
            string tx2 = item["Rotation"].Text;
            if (tx2.Length > len)
                item["Rotation"].Text = "<div onmouseover=\"ShowLongString(this);\" onmouseout=\"ShowShortString(this);\"><span class=\"short\">" + tx2.Substring(0, len) + "...</span><span class=\"long\" style=\"display:none;\">" + tx2 + "</span></div>";
 
            //DIV block for status
            AttachStatusDiv(ref item, "HoStatus");
            AttachStatusDiv(ref item, "AttStatus");
            AttachStatusDiv(ref item, "RotStatus");
        }
    }
 
    private void AttachStatusDiv(ref GridDataItem item, string columnName)
    {
        //string greenDiv = "<div class=\"rot-done\" title=\"done\"></div>";
        string pinkDiv = "<div class=\"rot-due\" title=\"due\"></div>";
        string hoStatus = item[columnName].Text.ToLower().Trim();
 
        string compositeKey = "";
        switch (columnName)
        {
            case "HoStatus":
                {
                    int sy = 0;
                    try
                    {
                        sy = int.Parse(item["StudentYear"].Text);
                    }
                    catch (Exception) { }
                    // For 4th year evalution, it has mid-term and final two evaluations.
                    if (sy == 4)
                        compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, "@Mid-Term" + item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["pes"]) + "|pes";
                    else
                        compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["pes"]) + "|pes";
                    break;
                }
            case "AttStatus":
                {
                    compositeKey = string.Join("@", MediTrekIdHid.Value, item["PreceptorHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["sep"] + "|sep");
                    break;
                }
            case "RotStatus":
                {
                    compositeKey = string.Join("@", MediTrekIdHid.Value, item["RotationHid"].Text, item["StartDate"].Text, item["Period"].Text, AppEnumeration.CO_MT_EVAL_TYPE["ses"] + "|ses");
                    break;
                }
            default:
                {
                    break;
                }
        }
        switch (hoStatus)
        {
            case "done":
                item[columnName].Controls.Add(GetDoneButton(compositeKey));
                //item[columnName].Text = greenDiv;
                break;
            case "due":
                item[columnName].Text = pinkDiv;
                break;
            default:
                break;
        }
    }
 
    private RadButton GetDoneButton(string compositeKey)
    {
        RadButton btn = new RadButton
                        {
                            Skin = "",
                            Width = new System.Web.UI.WebControls.Unit(12),
                            Height = new System.Web.UI.WebControls.Unit(16),
                            BackColor = System.Drawing.Color.LightGreen,
                            BorderWidth = new System.Web.UI.WebControls.Unit(1),
                            BorderColor = System.Drawing.Color.Black,
                            BorderStyle = System.Web.UI.WebControls.BorderStyle.Solid,
                            ToolTip = "Click to view the detail.",
                            CommandArgument = compositeKey,
                        };
        btn.Click += GetDetail;
 
        return btn;
    }
 
    protected void GetDetail(object sender, System.EventArgs e)
    {
        RadButton btn = sender as RadButton;
        string[] paras = btn.CommandArgument.Split('|');
        string compositeKey = paras[0];
        if (!string.IsNullOrEmpty(compositeKey))
        {
            RotationGridPanel.Visible = false;
            CompositeKeyHid.Value = compositeKey;
            using (var context = new CourseInformationDataContext())
            {
                var evaluationList = (from ev in context.CO_MediTrekEvalDetails
                                      where ev.CompositeKey.Equals(compositeKey)
                                      select ev).FirstOrDefault();
 
                if (evaluationList != null)
                {
                    List<EvaluationModel> list = new List<EvaluationModel>();
                    string title = "";
                    switch (paras[1])
                    {
                        case "pes":
                            {
                                int qc = 7;
                                string[] local = precptEvalsOfStuQuestions6;
                                if (int.Parse(evaluationList.StudentYear) > 2)
                                {
                                    qc = 10;
                                    local = precptEvalsOfStuQuestions9;
                                }
 
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = local[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Preceptor Evaluation of Student";
                                DescriptionLit.Text = "";
                                DescriptionLit.Visible = false;
                                if (int.Parse(evaluationList.StudentYear) == 4)
                                {
                                    FouthYearSwitch.Items[0].Selected = true;
                                    FouthYearSwitch.Visible = true;
                                }
                                else
                                    FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        case "sep":
                            {
                                int qc = 12;
                                string[] local = stuEvalsOfPrecptQuestion11;
                                if (int.Parse(evaluationList.StudentYear) > 2)
                                {
                                    qc = 15;
                                    local = stuEvalsOfPrecptQuestion14;
                                }
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = local[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Student Evaluation of Preceptor";
                                DescriptionLit.Text = "<div style=\"padding-bottom:5px;\"><i>NA = Unable to Assess; 1 = Strongly Disagree; 2 = Disagree; 3 = Agree; 4 = Strongly Agree</i></div>";
                                DescriptionLit.Visible = true;
                                FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        case "ses":
                            {
                                int qc = 14;
                                for (int i = 1; i < qc; i++)
                                {
                                    EvaluationModel model = new EvaluationModel
                                    {
                                        Item = stuEvalsOfSiteQuestions[i - 1],
                                        Result = evaluationList.GetType().GetProperty("Q" + i).GetValue(evaluationList) as string,
                                    };
                                    list.Add(model);
                                }
 
                                title = "Student Evaluation of Site";
                                DescriptionLit.Text = "<div style=\"padding-bottom:5px;\"><i>NA = Unable to Assess; 1 = Strongly Disagree; 2 = Disagree; 3 = Agree; 4 = Strongly Agree</i></div>";
                                DescriptionLit.Visible = true;
                                FouthYearSwitch.Visible = false;
 
                                break;
                            }
                        default: break;
                    }
                    // Mandatory and General Comments
                    EvaluationModel mc = new EvaluationModel
                    {
                        Item = this.mc,
                        Result = evaluationList.MandatoryComments,
                    };
                    list.Add(mc);
 
                    EvaluationModel gc = new EvaluationModel
                    {
                        Item = this.gc,
                        Result = evaluationList.GeneralComments,
                    };
                    list.Add(gc);
 
                    RotDetailGrid.Visible = true;
                    RotDetailGrid.DataSource = list;
                    RotDetailGrid.DataBind();
                    GridTitle.Text = "<b>Type</b>: " + title;
                    DateLit.Text = "<b>Time</b>: " + evaluationList.FromDate.GetValueOrDefault().ToString("MM/dd/yyyy") + " - " + evaluationList.ToDate.GetValueOrDefault().ToString("MM/dd/yyyy");
                    EvaluatorLit.Text = "<b>Preceptor</b>: " + evaluationList.Preceptor;
                    RotationLit.Text = "<b>Rotation</b>: " + evaluationList.Rotation;
                    ErrorLit.Visible = false;
                }
                else
                {
                    GridTitle.Text = "";
                    DateLit.Text = "";
                    EvaluatorLit.Text = "";
                    RotationLit.Text = "";
                    RotDetailGrid.Visible = false;
                    ErrorLit.Text = "<div style=\"padding-top:10px;font-size:12px;\"><img src=\"" + Page.ResolveUrl("~/Styles/Images/error.gif") + "\" alt=\"error\" style=\"vertical-align:middle;\"/> We cannot find the evaluation data for you. You may contact <a href=\"mailto:app@westernu.edu?subject=CO MediTrek Data Issue\">app@westernu.edu</a> to check the detail for you.</div>";
                    ErrorLit.Visible = true;
                    if (compositeKey.IndexOf("Mid-Term") != -1)
                    {
                        FouthYearSwitch.ClearSelection();
                        FouthYearSwitch.Visible = true;
                    }
                    else
                        FouthYearSwitch.Visible = false;
                }
            }
 
            RotDetailPanel.Visible = true;
        }
    }

Pavlina
Telerik team
 answered on 01 Aug 2014
2 answers
7.0K+ views
Hi i need to display the count of rows of the grid in the top of my page. I used the follg code. but it shows the count of that page alone. i want all the rows irrespective of the pages. and i also need to display the pages co9unt. pls help me
  protected void gridViewPograms_ItemDataBound(object sender, GridItemEventArgs e)
        {
            int i = gridViewPograms.Items.Count;
            labelCount.Text = i.ToString();
        }

Thanks,
Jeevitha
Eyup
Telerik team
 answered on 01 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?