Click here to Skip to main content
15,905,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public int getStatusCount(string status)
    {
        int count = 0;

        foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
        {

            string id = item[status].Text; //get the pid here

            if (id == "s")
            {
                count = count + 1;
            }

        }

        return count;

    }


 int test = RadGrid1.MasterTableView.Items.Count;


public double getpercent(int submitted,int total)

    {
        double percent = Math.Round((double)(submitted * 100) / total, 1);

        return percent;
    }
Posted

<radG:RadGrid ID="RadGrid2" runat="server" AllowSorting="True" AutoGenerateColumns="false">
<MasterTableView>
<Columns>
<radG:GridTemplateColumn UniqueName="TemplateColumn">
<HeaderTemplate>
<table id="Table1" cellspacing="1" cellpadding="1" width="300" border="1">
<tr>
<td align="center">
<b>Address</b>
</td>
</tr>
<tr>
<td>
<b>City</b>
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table id="Table2" cellspacing="1" cellpadding="1" width="300" border="1">
<tr>
<td>
<asp:Label ID="Label2" runat="server" Text='<%# getStatusCount("s") %>'></asp:Label>
</td>
<td>
<asp:Label ID="Label1" runat="server" Text='<%# getpercent(getStatusCount("s"),RadGrid1.MasterTableView.Items.Count) %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</radG:GridTemplateColumn>
</Columns>
</MasterTableView>
</radG:RadGrid>
 
Share this answer
 
CSS
Difference between AllowUnsafeUpdates and RunWithElevated previledges.
What is content type.
What is content type hub/ can content types be managed through central admin site.
Powershell command to install solution.
What is sandbox solution? Can a visual webpart be deployed as sandbox solution.
Difference between LINQ and CAML.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900