Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
95 views
how can i save a unicode character in its original form in the ms sql(for eg. malayalam letters should be save in db as malayalam not english form)
Marin Bratanov
Telerik team
 answered on 23 May 2012
1 answer
202 views

Hi

I am using telrik radopen function to open the popups. I have a situation in which child popup opens from parent popup which opens from grandparent .aspx page.

Grandparent (.aspx page) -> popup (parent) -> popup(child)

I want to close the parent popup and child popup on click of a button on child popup. I tried using 

GetRadWindow().BrowserWindow.BrowserWindow.Close() // this one and variations of this errored !

GetRadWindow().BrowserWindow.close(); // this did not errored but didn't close parent window
GetRadWindow().Close(); // this closes only child window - when invoked from button click on child window

I read the question Is it possible to close parent window from child (Javascript)?

If in case it is not possible to close the parent popup from child popup is there a workaround so that I can simulate the behavior of 'submit button click' on child control can close child and parent popup and refresh the grid on the grandparent .aspx page?

May be redirect can help. In that case how do I do that?
Any suggestions.

Thanks
Kuldip

Marin Bratanov
Telerik team
 answered on 23 May 2012
1 answer
134 views
I'm sure this is a really obvious and quick fix, but I have a page whereby a user clicks in a button in the middle of the page (in this case, a button inside a radgrid). That button fires the tooltip, but it renders the tooltip at the top of the window, so the user has to scroll all the way to the top of the window. The tooltip doesnt scroll with the browser. Any thoughts? Here's how I have the tooltip configured:

<telerik:RadToolTip ID="UserEdit" runat="server" Skin="Office2010Black"
        ManualClose="True"  Position="Center" RelativeTo="BrowserWindow"
        ShowCallout="False" Modal="True">
Hello!
</telerik:RadToolTip>
Marin Bratanov
Telerik team
 answered on 23 May 2012
3 answers
87 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
99 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
108 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
100 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
86 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
177 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
193 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
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?