Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
113 views
Part of our business procedures for the day is having our users "sign in" to a location on a daily basis, as part of a People Directory application. This usually happens as the user logs into their account, but we also provide functionality for users to set their locations in advance.

Our current process of doing this is using a big SQL script that maps out the days of the month into a DataList and then lists the statuses for the user when they logged in, and allows them to edit cells to submit new ones and sign in advance.

We're in the process of re-doing this webapp and integrating it into SharePoint. My question is, what would be the best Telerik control to use for this? It seems like the RadCalendar wouldn't let me edit cells to let users add descriptions to them, and RadScheduler is way too advanced for what we need (a simple status tied to the entire day). I really don't want to go the GridView route because I'm afraid of that massive script that populates the old one.

Does anyone have any suggestions? Thanks in advance.
Marin
Telerik team
 answered on 23 May 2012
10 answers
114 views
Hi All

I have a problem where the Rad page no sits below the LH menu, and I have a gap between the tab bar and the start of the RadPage. This has only happend since upgrading to the 2010.1.411.35 build.

If you look at Capture2.png this style seems to be new and its the content: ""; that is causing the problem. If I disable the style using IE Dev toolbar the Rad page sits properly under the tab bar.

Andy Ideas
Andy Green
Top achievements
Rank 2
 answered on 23 May 2012
4 answers
143 views
I have a unique situation. I am trying to get a field to subtract from a total based on a column in the grid and an overall total.

I am able to get this to work when the grid is first created...

here is my code:

The grid is created from a child class that is a property of the parent class using the OnNeedDataSource method. The Total amount is in the parent class.

public
 void grdSiteFunding_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    SiteFundingCalculation sfc = new SiteFundingCalculation(2010);
    if (TotAmnt <= 0)
    {
        TotAmnt = sfc.CalculateNetFunds();
        TotLeft = TotAmnt;
    }
    if (TotLeft <= 0)
    {
        TotLeft = TotAmnt;
    }
     
    //Bind the grid to the child class.
    grdSiteFunding.DataSource = sfc.FundingDetails.ToList();           
}


So after getting the total I am doing my calculation after the grid is bound using data in a column of the child class.
protected decimal TotAmnt = 0;
protected decimal TotLeft = 0;

public
void grdSiteFunding_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem dItem = (GridDataItem)e.Item;
            decimal oFunds = 0;
            decimal cFunds = 0;
            oFunds = decimal.Parse(dItem["OverriddenFunding"].Text.Replace("$", "").Trim());
            cFunds = decimal.Parse(dItem["CalculatedFunding"].Text.Replace("$", "").Trim());
            decimal retVal = 0;
            if (oFunds > 0)
            {
                if (oFunds <= TotLeft)
                {
                    retVal = TotLeft - oFunds;
                    TotLeft -= oFunds;
                }                       
                else
                {
                   retVal = TotLeft;
                    if (TotLeft != 0)                       
                        TotLeft -= TotLeft;
                }
            }
            else if (TotLeft >= cFunds)
            {
                if (cFunds <= TotLeft)
                {
                    retVal = TotLeft - cFunds;
                    TotLeft -= cFunds;
                }                       
                else
                {
                    retVal = TotLeft;
                    if (TotLeft != 0)
                        TotLeft -= TotLeft;
                }
            }               
            else
            {
                retVal = TotLeft;
                if (TotLeft != 0)
                    TotLeft -= TotLeft;
            }
 
            dItem["RemainingFunds"].Text = retVal.ToString("C");             
        }
    }

So basically it shows the funding being deducted from the total amount for every row in the grid until the total amount left is 0.
This works great when the grid first loads, but if I hit the refresh button on the grid or try to export this to pdf, the calculation disappears.

Of course I have Ajax in the page for updating the grid etc. So I turn it off when I export to pdf like I'm supposed to, but the data still doesn't show.

The rest of the bound data does show up on refresh and on export, just this column doesn't get updated. I have stepped through the code and it the data gets created on refresh or export, but still doesn't show up when the page is rendered or exported.

Any ideas or help would be appreciated. Let me know if you need any more info.

Thanks,

Dustin
Dustin Dodson
Top achievements
Rank 1
 answered on 23 May 2012
2 answers
132 views
I'm trying to create a RadCalendar where everyday has both the number of the date, plus a label or a textbox, depending on whether or not the user has logged in that day. The issue I'm having, is that I'd like to style the date cells by using a DayTemplate, but I need access to the controls inside.

To make matters more difficult, I'm using .NET 3.5 (for Sharepoint), and I don't think there is a "Static" option for IDs. Currently, my gameplan is to design the cell in the DayTemplate, and then have the  OnDayRender event take the controls inside the template and modify them. Is this the correct approach? Each control gets prefixed when a DayTemplate is applied, so it makes grabbing them extremely tough.

Aside from OnDayRender (or making 7 special days that repeat weekly), is there a way to set up a generic template for each cell, one that I can programmatically get access to?
Eric
Top achievements
Rank 1
 answered on 23 May 2012
1 answer
109 views
Hi,
      Can you please provide me a method to make the alternating row color of a particular column to blue color. Im using skin. How can I accomplish it in code behind.
Savyo
Jayesh Goyani
Top achievements
Rank 2
 answered on 23 May 2012
1 answer
192 views
I followed your great documentation on Export RadGrid content to Excel/Word/CSV/PDF with Ajax enabled . It works flawlessly - the export itself.

My javascript code is very close to the example code provided:
function requestStart(sender, args) {
    if (args.get_eventTarget().indexOf("lnkExportExcel") >= 0)
        args.set_enableAjax(false);
}


But after exporting the AJAX remains disabled. How do I re-enable AJAX after the RadGrid has been exported? Do i need to refresh the whole page or is there something like "radGrid.Re-EnableAJAX()" via Javascript?

When I load my UserControl in a regular web application AJAX works after clicking the Excel Button, however when using the userControl in SharePoint (on an Application page) Ajax doesn't work anymore, though it looks like a Postback.

So basically I have an application page, loading a user control which contains a RadGrid with Excel Export. When clicking the Excel button, AJAX is disabled just fine, but afterwards all other AJAX features (e.g. Grid filtering) don't work anymore.

PS: (I also posted this here)
Dennis
Top achievements
Rank 1
 answered on 23 May 2012
1 answer
224 views
Hello,

I am using RadTreeView in my ASP.Net WebPart however while access the same control from client side I am getting null for $find().

I am loading the RadTreeView from class which inherits the ASP.Net WebPart class as follows:
protected override void CreateChildControls()
        {
RadTreeView treeview = new RadTreeView() { ID = "RadTreeView", Width = new System.Web.UI.WebControls.Unit(285),
           Height = new System.Web.UI.WebControls.Unit(290),
           CheckBoxes = true
                                                                        };
                    treeview.Nodes.Add(new RadTreeNode("Test"));
                    Controls.Add(treeview);
base.CreateChildControls();           
        }

I am trying to use get the same control from client side from javascript file as follows:
function pageLoad() {
checkMain();
}
function checkMain() {
var tree = $find("<%= RadTreeView1.ClientID %>");
alert(tree);
}


I am getting tree as null, I have went throught all the documentation provided however not sure what missing.

The control render in page as below:
<div style="overflow:auto;height:290px;width:285px;" class="RadTreeView RadTreeView_Default" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView">
                        <ul class="rtUL rtLines">
                            <li class="rtLI rtFirst rtLast"><div class="rtTop">
                                <span class="rtSp"></span><input type="checkbox" class="rtChk"><span class="rtIn">Test</span>
                            </div></li>
                        </ul><input type="hidden" name="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" id="ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}">
                    </div>

Please let me know your thoughts.

Shinu
Top achievements
Rank 2
 answered on 23 May 2012
4 answers
499 views
I have three rad radio button in a group, i need to be able to validate that one of the group has been selected before i allow the user to move on. Trying to use the requiredfieldvalidator or comparevalidator, but they throw an error saying that the rad button isn't valid control to validate. Does anyone have a work around for this?
Princy
Top achievements
Rank 2
 answered on 23 May 2012
3 answers
271 views
Here is my resulting chart:
http://s15.postimage.org/7y165x8xn/mychart.jpg

The issue that I have is I need the legend to reflect the same color that is in the pie chart, or it will be really hard to know what number goes with each piece of the pie.  I also would love to remove Quantity from the list. 

here is my C#
string[] ParamArgs = { "IdParam|" + HttpContext.Current.Session["Id"], "INParam|" + HttpContext.Current.Session["Current"] };
        ColorPieChart = StoreProcedureDTTable("ColorPieChart_By_Specific", ParamArgs, "ColorPieChart_By_Specific");
        ColorPieChart.ChartTitle.TextBlock.Text = "Quantity by Color";
        ColorPieChart.Legend.Appearance.Position.AlignedPosition = Telerik.Charting.Styles.AlignedPositions.TopRight;
        ColorPieChart.DataSource = ColorPieChart;
        ColorPieChart.PlotArea.XAxis.AxisLabel.Visible = true;
        ColorPieChart.PlotArea.YAxis.AxisLabel.Visible = true;
        
        foreach (DataRow dtRow in ColorPieChart.Rows)
        {
            LabelItem item = new LabelItem();
            item.Name = dtRow["Color"].ToString();
            item.TextBlock.Text = dtRow["Color"].ToString();
            ColorPieChart.Legend.Items.Add(item);

        }
        ColorPieChart.AutoLayout = true;
        ColorPieChart.DataBind();

Here is my aspx:
<telerik:RadChart ID="ColorPieChart" runat="server"
                            ChartImageFormat="Jpeg" DefaultType="Pie" Height="400px" Skin="WebBlue"
                            Width="465px" Appearance-LegendDisplayMode="ItemLabels">
                            <Appearance>
                                <FillStyle MainColor="249, 250, 251">
                                </FillStyle>
                                <Border Color="160, 170, 182" />
                            </Appearance>
                            <Legend>
                                <Appearance Dimensions-Margins="17.6%, 3%, 1px, 1px"
                                    Dimensions-Paddings="2px, 8px, 6px, 3px"
                                    Position-AlignedPosition="BottomRight">
                                    <ItemTextAppearance TextProperties-Color="102, 102, 102">
                                    </ItemTextAppearance>
                                    <ItemMarkerAppearance Figure="Triangle">
                                    </ItemMarkerAppearance>
                                    <FillStyle MainColor="216, 222, 227">
                                    </FillStyle>
                                    <Border Color="160, 170, 182" />
                                </Appearance>
                            </Legend>
                            <PlotArea>
                                <EmptySeriesMessage Visible="True">
                                    <Appearance Visible="True">
                                    </Appearance>
                                </EmptySeriesMessage>
                                <XAxis>
                                    <Appearance Color="160, 160, 160">
                                        <MajorGridLines Color="227, 227, 227" Width="0" />
                                        <TextAppearance TextProperties-Color="140, 140, 140">
                                        </TextAppearance>
                                    </Appearance>
                                    <AxisLabel>
                                        <TextBlock>
                                            <Appearance TextProperties-Color="140, 140, 140">
                                            </Appearance>
                                        </TextBlock>
                                    </AxisLabel>
                                </XAxis>
                                <YAxis>
                                    <Appearance Color="160, 160, 160">
                                        <MajorGridLines Color="227, 227, 227" />
                                        <MinorGridLines Color="227, 227, 227" />
                                    </Appearance>
                                    <AxisLabel>
                                        <TextBlock>
                                            <Appearance TextProperties-Color="140, 140, 140">
                                            </Appearance>
                                        </TextBlock>
                                    </AxisLabel>
                                </YAxis>
                                <Appearance>
                                    <FillStyle FillType="Solid" MainColor="">
                                    </FillStyle>
                                </Appearance>
                            </PlotArea>
                            <ChartTitle>
                                <Appearance>
                                    <FillStyle MainColor="">
                                    </FillStyle>
                                </Appearance>
                                <TextBlock Text="Chart by Color Quantity">
                                    <Appearance TextProperties-Color="102, 102, 102"
                                        TextProperties-Font="Arial, 14pt">
                                    </Appearance>
                                </TextBlock>
                            </ChartTitle>
                    </telerik:RadChart>


Any help is appreciated!
Petar Marchev
Telerik team
 answered on 23 May 2012
4 answers
275 views
The date entered into the RadDatePicker in format of 04/14/2012 and when you click on the go button the displayed date changes to 2012-04-14- it then goes back to 04/14/2012.  This causes a flicker issue in the field on the go click.  Is there a setting to stop this from happening?
<CommandItemTemplate>
    <table cellspacing="5px" cellpadding="0" style="width: 100%;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;">
    <tr><td style="width:250px;text-align: left; padding-left: 1px;" nowrap="nowrap">
            <table cellspacing="0" cellpadding="0" border="0" style="width: 250px;height: 25px;margin: 0px;padding: 0px;border-bottom: 1px solid #cccccc;background-color: #ffffff;">
                <tr>
                    <td style="width:100px;text-align: right; padding-left: 1px;" nowrap>
                        <telerik:RadDatePicker ID="RadDatePicker1" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100">
                            <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook"></Calendar>
                            <DateInput DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False"></DateInput>
                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                        </telerik:RadDatePicker>
                    </td><td style="width:20px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">
                        <asp:Image ID="Image1" runat="server" Height="1" Width="1" ImageUrl="images/shim.gif" />
                        <asp:Label ID="Label1" runat="server" Text="to" CssClass="LabelStyle"></asp:Label>
                        <asp:Image ID="Image4" runat="server" Height="1" Width="5" ImageUrl="images/shim.gif" />
                    </td><td style="width:100px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">
                        <telerik:RadDatePicker ID="RadDatePicker2" Runat="server" Skin="Outlook" AutoPostBack="False" Width="100">
                              <Calendar ID="Calendar1" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" Skin="Outlook" runat="Server"></Calendar>
                              <DateInput ID="DateInput1" DisplayDateFormat="M/d/yyyy" DateFormat="M/d/yyyy" AutoPostBack="False"  runat="Server"></DateInput>
                              <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                        </telerik:RadDatePicker>  
                   </td><td style="width:30px;text-align:left;vertical-align:middle;padding-left:1px;" nowrap="nowrap">                                                                                              
                        <asp:Button ID="cmdSearch" runat="server" Text="Go" CssClass="ButtonStyle" CommandName="Refresh" />         
                   </td>
                </tr>
            </table>
        </td><td style="width:50%;text-align: center">
            <asp:Label ID="LabelDate" runat="server" Text="" CssClass="LabelStyle"></asp:Label>
        </td><td style="width:20%;text-align: right">
            <asp:Image ID="Image2" runat="server" Height="1" Width="20" ImageUrl="images/shim.gif" />
        </td></tr>
    </table>
</CommandItemTemplate>

Eyup
Telerik team
 answered on 23 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?