Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
112 views
Hi,

I am using a GridButtonColumn in a grid to delete records.  The confirm text that I want to display is quite long.  Is it possible to put a carriage return and line feed in the text?

ConfirmText

 

="This group will be deleted from all users that have this group assigned to them. This process CANNOT be undone. Are You Sure Want To Delete This Group?" ConfirmDialogType="RadWindow"

Thank You

 

Tracy
Top achievements
Rank 1
 answered on 31 Dec 2010
1 answer
382 views
I have a RadNumericTextbox and I want to assign two javascript events to fire for the OnValueChanged.

So lets say I have JavaScript methods called MethodA(); and MethodB(); that I want to call.  What I would like to do would be something like this:

<telerik:RadNumericTextBox ID="rntMyTextBox" Type="Number" runat="server"
                    MaxValue="997" EnabledStyle-HorizontalAlign="Right" Font-Size="Small" MaxLength="3"
                    MinValue="0" Width="153px" FocusedStyle-PaddingRight="1px" ShowSpinButtons="true"
                    ClientEvents-OnValueChanged="MethodA(); MethodB();">
 I am able to stack methods on other HTML properties, such as when I add an onChange="alert('A'); alert('B');" property and change the value via the page, then I get the expected message boxes, the first saying A, the second saying B.

So the first question is, can this be done?  If so, what is the format?  I can't seem to make it work.

Secondly, one of the methods I'm adding sets a 'FormHasChanged' bool to True... but based on another forum post I read it would seem the 'OnValueChanged' fires once when the page loads and the control populates the value initially... is there a way to modify this behavior?  The other post suggested tracking the before and after values... this is far from ideal as I would like to be able to generically add a call to set the bool when the value changes.

The big picture is this:

From a random page's code behind I want to be able to call a function I created like so:
//Add the OnChange event to all the appropriate controls on this user control.
ControlManager.AddOnChange(this.Controls, "SetDirtyFlag"true);
The AddOnChange method loops through all the controls in the passed in control set.  For each control, it tries to decide how best to apply an 'onChange' event... ADDING to any existing method defined.  The way I'm trying to do this for a RadNumericEtc is something like :
else if(control is RadNumericTextBox)
{
(control as RadNumericTextBox).ClientEvents.OnValueChanged = (control as RadNumericTextBox).ClientEvents.OnValueChanged + ";" + onChangeString;
//We also want to avoid user tab to the up and down spinner buttons on any RadNumericTextBox controls.
(control as RadNumericTextBox).ButtonDownContainer.Attributes.Add("tabindex""-1");
(control as RadNumericTextBox).ButtonUpContainer.Attributes.Add("tabindex""-1");
}
This way, when I call AddOnChange, the SetDirtyFlag method call would be ADDED to any other method(s) defined to fire when the value changes.  The SetDirtyFlag simply sets the 'FormHasChanged' flag to true, without needing to include any other specific logic.

So my two issues are 1) I can't seem to stack method calls and 2) If the 'OnValueChanged' fires at page load, then the page will ALWAYS think the form has changed... and if I have to track before/after values, then that would require a MASSIVE amount of additional coding...

Thoughts?
Cori
Top achievements
Rank 2
 answered on 31 Dec 2010
1 answer
154 views
Hi,

I'm currently upgrading our application to support the Ajax editor. I'd like to hide the above mentioned button text. I just want to see their icons with tooltips. How would I do this?

Regards,
Laredo
Rumen
Telerik team
 answered on 31 Dec 2010
4 answers
117 views

 

hi I am trying to get a PDF Report for this following code.  But its displaying Empty Report.

Please help me .

Thanks in advance


<
telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"

 

 

GridLines="None">

 

<

 

HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

 

<

 

MasterTableView>

 

<

 

CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>

 

<

 

RowIndicatorColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

RowIndicatorColumn>

 

<

 

ExpandCollapseColumn>

 

<

 

HeaderStyle Width="20px"></HeaderStyle>

 

</

 

ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn UniqueName="TemplateColumn">

 

 

<ItemTemplate>

 

 

<table>

 

 

<tr>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Student Name

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

<td>

 

Date Of Payment

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Class

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

<td>

 

Transaction Number

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Year

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Fee Type

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

<tr>

 

 

<td>

 

Term

 

</td>

 

 

<td>

 

 

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

 

 

</td>

 

 

</tr>

 

 

</table>

 

 

</ItemTemplate>

 

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

</

 

MasterTableView>

 

 

</telerik:RadGrid>

 

vijay
Top achievements
Rank 1
 answered on 31 Dec 2010
1 answer
65 views
Hi everybody and merry christmas !

I'm trying to cancel filtering client side on the "oncommand" client event.

It's Ok when i just lostfocus on the textbox filter but if i press enter key the event is not cancel.

js function :

function RadGrid1_Command(sender, eventArgs) {
 
        if (eventArgs.get_commandName() == "Sort" || eventArgs.get_commandName() == "Page" || eventArgs.get_commandName() == "PageSize" || eventArgs.get_commandName() == "Filter" ) {
            if (confirm("blablabmlablabla")) {
                eventArgs.set_cancel(true);
            }else{ ....}
        }
  }

Client setting :

<ClientSettings>
    <ClientEvents OnCommand="RadGrid1_Command" />
</ClientSettings>

Filter column :
<telerik:GridTemplateColumn HeaderText="Libellé"
                   SortExpression="LIBRED"
                   DataField="LIBRED"                            
                   AutoPostBackOnFilter="true"
                   CurrentFilterFunction="Contains"
                   ShowFilterIcon="false"
                   UniqueName="LIBRED">
                 <ItemTemplate>
                     <asp:Label ID="LibelleLbl" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "LIBRED")%>' />
                   </ItemTemplate>
</telerik:GridTemplateColumn>

Thanks.

OPL



Daniel
Telerik team
 answered on 31 Dec 2010
1 answer
78 views
I have a clientside RadGrid that I am doing the following:
grid.tableView = grid.get_masterTableView();
grid.tableView.set_dataSource(data.Items);
grid.tableView.dataBind();
grid.tableView.set_virtualItemCount(data.Count);
Before my RowDatabound and DataBound Events are called, I am getting a bunch of blank rows with "System.Data.DataRowView" displayed in them. 
My attempt to fix this was to default the grid to display:none and then set it back later one, but I can't find a good event to do this since RowDataBound isn't good enough as it does it on the first row and that's not good enough. Any thoughts/ideas?
Tsvetoslav
Telerik team
 answered on 31 Dec 2010
8 answers
156 views
When using the GroupsDefaultExpanded = False, and also using inline editing, when I click the editbutton, my inline edit form won't show but instead the group collapses again. When using groups and not having GroupsDefaultExpanded on false there is no problem.

Using 2008.3.1124, in a dotNetNuke module. But also tried a testpage without dotnetnuke with the same problem.





G
Top achievements
Rank 1
 answered on 31 Dec 2010
1 answer
135 views
I have a case in which I need to use a custom validator in a grid edit form, and part of the custom validation is dependent upon ID of the data item being edited, but I don't see how to find that data item in my validation code.  Basically, I need to ensure that the name value entered in a text box is unique in the database for that table - which means that for an insert no other record should exist in the table with that name value, and for an update only the record with the matching ID should exist with that value.  My custom validator looks like:

<asp:CustomValidator ID="UniqueNameValidator" runat="server" Display="Dynamic"  ErrorMessage='A record already exists with this name' ControlToValidate="NameEditTextBox" OnServerValidate="ValidateUniqueName" />

Then the server side method would be:

        protected void ValidateUniqueName(object source, ServerValidateEventArgs args)
        {
            /// code here
        }

My problem is that the args object only gives me the value of the field being validated.  In order for me to do the dupe check I need to know the GridEditableItem being edited, and I don't know how to find that programmatically in this case because I don't have a GridCommandEventArgs or similar object with which to look at e.Item.

Is there any way to find the current GridEditableItem object from just looking at the grid object? Or is there another way to approach this that I am missing?
Princy
Top achievements
Rank 2
 answered on 31 Dec 2010
3 answers
207 views
I would like to validate file name when I upload document or image in RadEditor. If the file name is not valid, I would like to prompt an error message to user.

Is there any quick and easy way to do this?

I attach a screen shot to help clarify my case.
Rumen
Telerik team
 answered on 31 Dec 2010
2 answers
549 views
Dear all,

Does Telerik Grid have feature to Merge Cells? I want to Merge by Column (eg. Merge A1, A2, A3) .
If Telerik Grid doesn't have it, is there any way to do?

* My version is Q1 2010 SP2.
Hope you all can guide me as this is my first ASP.Net prj.

Thanks & Best Regards.
Naunton
Top achievements
Rank 1
 answered on 31 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?