Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
156 views
All, I am using the RadWindow to provide a popup selection for my users.  I have the popup working great, and I can refresh the parent page just fine.  The one thing I've noticed is that any textboxes on the parent page will lose any data that is in them when I refresh.  Shouldn't the normal page lifecycle occur after I run a 

.BrowserWindow.location.reload();

from Javascript to refresh the parent page?  I tried wrapping the entire page in an RadAjaxPanel, but I have the same problem.

Any ideas?

Sean Eby
Top achievements
Rank 1
 answered on 29 Apr 2008
1 answer
91 views
Adding a hyperlink with a title that can be identified as a url (i.e. starts with for example "www." or "http://") causes the title to be replaced with the href attribute when switching between source view and design view or when checking in the page.
Do anyone know why this is happening and is there some way to turn off this behavior? This only seems to apply to IE browsers.
I know that this usually isn’t a problem because if the title is a url then it should point to the same thing as the href but we have some redirection logic that in this case is bypassed.

Let me pull an example just to make things really clear:
1. Switch to source view and add a new hyperlink:
<a href="http://XX.XX.XX.XX/">www.yyyyy.com</a>
2. Switch back to design view.
3. You will see the hyperlink with the title www.yyyyy.com 
which is ok. But if you now switch back to source mode you will see that the title has been replaced with the href attribute and looks like this: 
<a href="http://XX.XX.XX.XX/">http://XX.XX.XX.XX/</a>
Lini
Telerik team
 answered on 29 Apr 2008
4 answers
307 views

The code below is not working for some reason. The intent is if a user clicks the main menu check the value in the cb dropdown and hide/show a menu item. But the menu item is not hiding and displaying like I expect. Any ideas?

///////////////////////////////////////////////////

<

telerik:RadMenu ID="menuSettings" runat="server" OnClientItemClicking

=MenuItemClicking>

////////////////////////////////////////////////

function MenuItemClicking()

{

debugger;

var cb= $find("<%=cb.ClientID%>");

if (cb._selectedIndex==0)

ItemVisibility(

"ShowHideEmptyBeds",false);

else

 ItemVisibility("ShowHideEmptyBeds",true);

}

function

ItemVisibility(menuText,visibility)

{

var menu = $find("<%= menuSettings.ClientID %>");

var menuItem = menu.findItemByText(menuText);

if(menuItem && (menuItem.get_visible()!=visibility))

{

menuItem.set_visible(visibility);

}

}

T. Tsonev
Telerik team
 answered on 29 Apr 2008
1 answer
130 views
Hi,

We have recently upgraded from 2007.3.1218.20 to 2008.1.415.35 of the RadChart.  In the previous version when a EmptySeriesMessage of a PlotArea was shown it also showed the default Plot Area Border.  In the current version that plot area border just disappears (though it does show up when there is data in the graph).  Is there still a way to do this I am not seeing?

Thank you,

Colin Thompkins
Giuseppe
Telerik team
 answered on 29 Apr 2008
8 answers
811 views
I'm trying to determine weather to show or hide the checkbox in a GridCheckBoxColumn inside the grid's ItemDataBound event.  I thought this would be a simple task.

Inside my ItemDataBound method:

if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;

                if (dataItem["ItemTypeName"].Text.Equals("Sponsorship"))
                {
                    CheckBox cb = (CheckBox)dataItem["column"].Controls[0];
                    //cb.Enabled = false;
                    cb.Visible = false;
                    //cb.Checked = true;
                    lbCancelEntireOrder.Visible = false;
                }
            }

the lbCancelEntireOrder.Visible line works - so I know the problem is not in the ItemDataBound itself.  Am I getting the CheckBox out of the column properly?

Thanks
DJ
Top achievements
Rank 1
 answered on 29 Apr 2008
1 answer
105 views
I have a vb.net page with 2 grids where a user can drag a record from one grid to another. I would like to know how I get access to the value of the cells which have been selected and are being dragged by the user (draggeditems) I would like to take the datakey value from this row and then carry out the relevant database updates needed on the rowdrop event.

I have it all working when values are hard coded I just need to know how to access the dragged row cell values.

Thanks in advance for any assistance.

Yavor
Telerik team
 answered on 29 Apr 2008
6 answers
368 views

I have a usercontrol with the following hierarchy

Parent.master -> CreatePeople.master -> Details.aspx -> Details.ascx

In CreatePeople.master there is a RadWindowManager.

If in Details.ascx I add a button and put code in the OnClientClick event to open a radconfirm window it works fine.

However if I add another button and in its OnClick event use the InjectScript method to run the radconfirm window it fails with a javascript error 'undefined is null or not an object'. If I debug the javascript with firefox the code seems to be having trouble finding the window manager.

I've isolated this in a mini project which just contains the files mentioned. No Ajax managers or anything like that.

Any ideas?

Code Behind:

protected void button1_Click(object sender, EventArgs e)
{
InjectScript.Text =
"<script>confirmSaveDuplicatePerson()</script>";
}

Details.ascx

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function confirmSaveDuplicatePerson()
{
radconfirm('
Are you sure?',confirmSaveCallback,330,100,null,'Duplicate');
}

function confirmSaveCallback(arg)
{
radalert(arg);
}
</script>
</
telerik:RadCodeBlock>
<asp:Label ID="InjectScript" runat="server"></asp:Label>
<
asp:Button ID="button1" runat="server" Text="click me" OnClick="button1_Click" />
<
asp:Button ID="buttonClient" runat="server" Text="Client click" OnClientClick="confirmSaveDuplicatePerson(); return false;" />




 

 

Bobby Davis
Top achievements
Rank 1
 answered on 29 Apr 2008
5 answers
163 views
Hi,

I have a RadGrid which has several columns visible:

Name, Date Added, Comment

When they go into Edit Mode, I dont want Name to be in the form as I need to capture the users logon ID from the HTTPContext and automatically store this in the underlying table rather then the name.

In other words:

In the COMMENTS table I am storing the USER_ID.

In the recordset coming back, I am joining COMMENTS to USERS table to present the Name in the RadGrid.

When they go into Edit Mode....I dont want Name to be editable, because I actually want to capture the users logon ID and pass this in.

I am using an ObjectDataSource and my Insert is failing because a method with a signature which includes a "NAME" parameter cant be found:

In My ObjectDataSource

Public Sub AddComment( _

ByVal DASHBOARD_PAGE_ID As Long, _

ByVal LOGON_ID As String, _

ByVal DATE_ADDED As String, _

ByVal COMMENTARY As String, _

ByVal LIVE As Boolean, _

ByVal PROMOTED As Boolean, _

ByVal RESPONSIBLE_PERSON As String, _

ByVal OUTCOME As String)

' Create Connection

Dim con As New SqlConnection(_conString)

'Create Command

Dim cmdText As String = "SP_CLIN_DASHBOARD_ADD_COMMENT" ' This requires a parameter of DashboardPage_ID

Dim cmd As New SqlCommand(cmdText, con)

cmd.CommandType = CommandType.StoredProcedure

cmd.Parameters.AddWithValue(

"@DASHBOARD_PAGE_ID", DASHBOARD_PAGE_ID)

cmd.Parameters.AddWithValue(

"@LOGON_ID", LOGON_ID)

cmd.Parameters.AddWithValue(

"@DATE_ADDED", DATE_ADDED)

cmd.Parameters.AddWithValue(

"@COMMENTARY", COMMENTARY)

cmd.Parameters.AddWithValue(

"@LIVE", LIVE)

cmd.Parameters.AddWithValue(

"@PROMOTED", PROMOTED)

cmd.Parameters.AddWithValue(

"@RESPONSIBLE_PERSON", RESPONSIBLE_PERSON)

cmd.Parameters.AddWithValue(

"@OUTCOME", OUTCOME)

cmd.ExecuteNonQuery()

End Sub



Where I am capturing the LOGON_ID and passing it in:

Protected Sub srcComments_Inserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs) Handles srcComments.Inserting

e.InputParameters.Item(

"DASHBOARD_PAGE_ID") = Session("DASHBOARD_PAGE_ID")

e.InputParameters.Item(

"LOGON_ID") = HttpContext.Current.User

e.InputParameters.Item(

"DATE_ADDED") = Now()

End Sub



Thanks



Stephen
Top achievements
Rank 1
 answered on 29 Apr 2008
1 answer
173 views
Dear Telerik Support,

Is there a way to pull up a RadWindow from a desktop shortcut in a way that hides the parent window and also does not require you to click on a button from the parent window in order to pull up the RadWindow?

Here is a visual of what I am asking:

Click Here

Please advise,

Woody

Georgi Tunev
Telerik team
 answered on 29 Apr 2008
3 answers
172 views
The second page on my grid display jusy 1 row..

below a simpe code to reproduct my problem:

aspx:
<telerik:RadGrid ID="RadGrid1" runat="server"  
                 AllowPaging="true"  
                 AllowCustomPaging="true"  
                 PageSize="30"> 
</telerik:RadGrid> 


vb:
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
        Dim startRowIndex As Integer = (RadGrid1.CurrentPageIndex * RadGrid1.PageSize) + 1 
        Dim maximumRows As Integer = RadGrid1.PageSize 
        Dim dt As New System.Data.DataTable 
        dt.Columns.Add(New System.Data.DataColumn("a")) 
        dt.Columns.Add(New System.Data.DataColumn("b")) 
        Dim r As System.Data.DataRow 
        For i As Integer = startRowIndex To startRowIndex + maximumRows 
            r = dt.NewRow() 
            r("a") = "a" + CStr(i) 
            r("b") = "b" + CStr(i) 
            dt.Rows.Add(r) 
        Next 
        RadGrid1.DataSource = dt 
        RadGrid1.VirtualItemCount = 100000 
    End Sub 

Am I doing anything wrong?
Yavor
Telerik team
 answered on 29 Apr 2008
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?