Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Hi,

I have a grid has <EditFormSettings EditFormType="Template" .
I have a linkbutton draft column in the grid and showing edit form once click on draft link button.

But its binding last row values always .I have written the code in the itemdatabound event.

for example I have 2 records in the grid and If i click on 1st record then it's always showing 2nd row in the edit form popup that mean my code calling twice at this scenario.

itemdatabound calling for every record and showing last record values in the popup.

this is my code :

If System.Web.HttpContext.Current.Session("state") IsNot Nothing Then
            If System.Web.HttpContext.Current.Session("state").ToString = "SaveAsDraft" Then
                If TypeOf e.Item Is GridDataItem Then
                    Dim item As GridDataItem = TryCast(e.Item, GridDataItem)
                    ViewState("EmailIdValue") = item("id").Text
                End If
                If TypeOf e.Item Is GridEditFormItem And e.Item.IsInEditMode Then
                    If e.Item.OwnerTableView.IsItemInserted Then
                        Dim record As New DataTable
                        If ViewState("EmailIdValue") <> "" Then
                            record = GetDataTable("select * from t_EmailFiling where id='" & ViewState("EmailIdValue") & "'")
                        End If
                        If record.Rows.Count > 0 Then
                            Dim insertItem As GridEditFormInsertItem = DirectCast(e.Item, GridEditFormInsertItem)
                            CType(insertItem.FindControl("Recipient"), RadTextBox).Text = record.Rows(0)("Recipient").ToString()
                            CType(insertItem.FindControl("RecipientCC"), RadTextBox).Text = record.Rows(0)("RecipientCC").ToString()
                            CType(insertItem.FindControl("RecipientBCC"), RadTextBox).Text = record.Rows(0)("RecipientBCC").ToString()
                            CType(insertItem.FindControl("Subject"), RadTextBox).Text = record.Rows(0)("Subject").ToString()
                            CType(insertItem.FindControl("Message"), RadEditor).Content = record.Rows(0)("Message").ToString()
                        End If
                    End If
                End If
            End If
            End If
 

I would like to show in the editform that exact row what i have clicked in the grid. Please help me on this..

Thanks in advance ..
Shinu
Top achievements
Rank 2
 answered on 07 Mar 2013
1 answer
79 views
I'm trying to use an ObjectDataSource bound to a RadGrid to perform automatic Select, Insert, Update and Delete.  The OnSelecting method of the ODS refers to a method that is a member of MyClass, and returns a List<MyClass>.  The OnUpdating method is also a member of that class and is annotated with [DataObjectMethod(DataObjectMethodType.Update, true)]

        [DataObjectMethod(DataObjectMethodType.Update, true)]
        public void updateMyClass(MyClass myClassToUpdate, string UserId)
        {
            BusinessLayer.updateClass(myClassToUpdate, UserId);
        }

The exception I'm getting indicates that the method should list the individual fields of the class. That's not how I'm used to doing this and some of my classes I'll be using have a large number of fields.  Is there a setting for RadGrid or something else I'm missing that would allow me to pass the class in directly?

Steve
Steven
Top achievements
Rank 1
 answered on 07 Mar 2013
2 answers
63 views
Hello!

I am in a tricky situation , some one please help!

I have a Rad Window which has content(images and video) and I have a link, when clicked opens dnnModal,

When the link is clicked, and if I decide not to do anything(close the modal), I can avoid refresh of the parent Radwindow by setting the showreturn(5th argument) of dnnModal value to false.

Now if I decide to do something, example change some text on dnnModal window and close, how can I reload/refresh my parent window(RadWindow) to load the updated content.

Any help is greatly appreciated!

Thanks in advance,
Sakshi
Sakshi
Top achievements
Rank 1
 answered on 06 Mar 2013
2 answers
297 views
I would like the async upload to automatically postback after I select a file.

Is that possible?
Gerry
Top achievements
Rank 1
 answered on 06 Mar 2013
1 answer
53 views
Hi there,

We are using the editor to save HTML content to a database.

For some reason, the editor sometimes adds a HTML body tag to the content.

For example, the body tag was added to a simple HTML list we had:

<body class="RadEditorOverrides" contenteditable="true">
        <ul>
            <ul>
                <ul>
                    <p>&nbsp;</p>
                </ul>
            </ul>
        </ul>
    </body>

The content filter I have set is: 

ContentFilters="RemoveScripts,FixUlBoldItalic,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent,ConvertCharactersToEntities,FixEnclosingP"

Would anyone be able to offer some advice on how this problem can be resolved?

 

 

Rumen
Telerik team
 answered on 06 Mar 2013
3 answers
304 views
Is there a way to hide the tooltip when you click on something else on the page?  I saw thread with suggestions to add an onclick event to the form or the body, but then the tooltip goes away even if you click on the tooltip itself.

Thanks,
Rimma
Marin Bratanov
Telerik team
 answered on 06 Mar 2013
3 answers
368 views
I am utilizing DataGroupColumn to dynamically create multiple series groupings based on my data. My line charts display properly, but  I can't figure out how to hide the Value labels for all the series.
I see references to using
            -  Series[0].Appearance.ShowLabels = false.  But, since there are no explicit series created, this doesn't work. 

I've attached an image to demonstrate the issue.
thanks for the help.


Also, I just tried the following in the ItemDatBound event, and it does not seem to affect the display at all (IE: the labels still show up)

            foreach (ChartSeries s in myChart.Series) {
                s.Appearance.ShowLabels = false;
                s.DefaultLabelValue = "";
}
Ves
Telerik team
 answered on 06 Mar 2013
5 answers
591 views
Hi,

I have two issues with rad window:

1. Is it possible to prevent rad window from being dragged outside of the screen boundaries?I tried using
KeepInScreenBounds property, but it didn't help.

Here is my code example, and screen shot is attached:

 

<telerik:RadWindowManager ID="rwm" runat="server" ShowContentDuringLoad="false" Behaviors="Close,Move"

VisibleStatusbar="false" Skin="Gray" Modal="true" KeepInScreenBounds = "true">

<Windows>

 

<telerik:RadWindow ID="rwAuditCredentials" runat="server" NavigateUrl="~/Pages/Audits/AuditCredentials.aspx"

Title="Audit Credentials" Height="230px" Width="360px" KeepInScreenBounds="true">

</telerik:RadWindow>

</Windows>

 

</telerik:RadWindowManager>

2. How can I prevent from radwindow from being opened outside of the screen bounderies?
I got my radwindow opened when the title bar is outside the screen bounderies (as it looks in my print screen) and I couldn't drag it or close it.

Thanks!
Marin Bratanov
Telerik team
 answered on 06 Mar 2013
1 answer
102 views
hi,
 i use the autosieze mode, this is my code:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function openRadWindow(email) {
var oWnd = radopen("appuntamento.aspx?email=" + email, "RadWindowAppuntamento");
}
</script>
</telerik:RadCodeBlock>
<telerik:RadWindowManager ID="RadWindow_Conferma" runat="server" Modal="True" Skin="Office2010Silver">
<Windows>
<telerik:RadWindow ID="RadWindowAppuntamento" runat="server" Style="z-index: 8000"
ShowContentDuringLoad="false" Behaviors="None" AutoSize="true"
Modal="True" Behavior="None" Font-Names="Verdana" Font-Size="Small" ReloadOnShow="True"
IconUrl="/image/iconlogo.png" Width="200px" Height="100px"
VisibleStatusbar="False" Skin="Office2010Silver" NavigateUrl="appuntamento.aspx"
EnableViewState="False" InitialBehaviors="Close">
</telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

and i call radwindow from code behind:

Private Sub Btn3_Click(sender As Object, e As System.EventArgs) Handles Btn3.Click
    ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", "openRadWindow('" & contenitoredati.Value & "');", True)
End Sub

now when i call the radwindow, the result is wrong, please see the image posted...

How can do it?

Marin Bratanov
Telerik team
 answered on 06 Mar 2013
1 answer
217 views
Hi, all.

I have a RadWindowManager sitting in my default.aspx page ("wndMgrDefault").  I'm trying to add a RadWindow to it from Javascript via a WebMethod (using the OnClientClicked property of a RadButton that's also on the same page), but I can't seen to find the wndMgrDefault control when I'm inside the method itself.

Javascript:
function ViewRating(sender, args) {
    PageMethods.set_path('default.aspx');
    PageMethods.OpenRating();
}


VB:
<System.Web.Services.WebMethod()> _
Public Shared Sub OpenRating()
    Dim currPg As Page = DirectCast(HttpContext.Current.Handler, Page)
    Dim mgr As RadWindowManager = DirectCast(currPg.FindControl("wndMgrDefault"), RadWindowManager)
    Dim wndRatings As New RadWindow
    Dim ht As Integer = CInt(HttpContext.Current.Session("WND_HT").ToString)
    Dim wd As Integer = CInt(HttpContext.Current.Session("WND_WD").ToString)
 
    With wndRatings
        ...
    End With
 
    mgr.Windows.Add(wndRatings)
End Sub

For some reason, the mgr variable is coming back as Nothing. If I make the routine a normal server-side method, I can add the window using "wndMgrDefault.Windows.Add(wndRatings)" with no problem, but I didn't want to re-render the entire page every time someone clicks this button.  Is there anything I'm missing by trying to add a RadWindow to the window manager doing it this way?
Marin Bratanov
Telerik team
 answered on 06 Mar 2013
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?