Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
57 views
I have a radgrid with a column for comments.  Its purpose is for the user to explain why they made a change to that particular item. To enable that I have made it a template column and in the EditItemTemplate, I've added a required field validator.  So far so good.  However, the requirement means that EVERY time a change is made, a new comment is required.  As it is, when the user clicks the edit button, the text from the previous comment is shown in the textbox.  If the user clicks update, the required field validator sees that text and validates the field. 
That code looks like this

 

<telerik:GridTemplateColumn DataField="Comments" AllowFiltering="false" FilterControlAltText="Filter Comments column" HeaderText="Comments" SortExpression="Comments" UniqueName="Comments">

 

<EditItemTemplate>

 

<asp:TextBox ID="txtComments" runat="server" Text='<%# Bind("Comments")%>' TextMode="MultiLine"></asp:TextBox>

 

<asp:RequiredFieldValidator ID="rfvComments" ControlToValidate="txtComments" Display="Dynamic" runat="server" ErrorMessage="Please enter a reason for changing this budget item."></asp:RequiredFieldValidator>

 

</EditItemTemplate>

 

<ItemTemplate>

 

<asp:Label ID="CommentsLabel" runat="server" Text='<%# Eval("Comments") %>'></asp:Label>

 

</ItemTemplate>

 

</telerik:GridTemplateColumn>




I tried replacing the  Text='<%# Bind("Comments")%>'  with  Text='' but then the new text was not returned.  ( A trace showed that parameter value to be null).  I have tried to keep the application simple and so am not currently using any code-behind.  If possible, I'd like to avoid that.

So, I'm looking for some help in how to clear the textbox when the edit button is pushed so the required field validator will do its work, while still having the new comment included when the page is posted back.

I appreciate any help you can give.
Thanks
Rick

 

 

 



Jayesh Goyani
Top achievements
Rank 2
 answered on 07 Mar 2013
1 answer
167 views
I am using a RadWindow as a modal popup and can't seem to find a way to prevent the scroll bars from appearing on the window. If anyone know how I can eliminate the scroll bars from showing up on my popup please reply with your suggestions.

Thanks,

Jaime
Princy
Top achievements
Rank 2
 answered on 07 Mar 2013
1 answer
116 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
84 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
77 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
306 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
56 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
322 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
387 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
621 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?