Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
273 views
Hi,

I would like to add a copy button to a record like the edit and delete buttons that would open the add new record form and prepopulate the form items with the data from the record being copied.  This way some of the data can be changed before it is saved to the database and avoid the user having to copy the record and then edit it to make changes.

Any help would be appreciated. Thanks.
Katie
Top achievements
Rank 1
 answered on 25 Jun 2009
0 answers
231 views

Question 1 - Does the user have any control on the text that is displayed in the Radcombobox while using keyboard navigation.

 

 

 

ChangeTextOnKeyBoardNavigation = "true" or "false" just completely turns it on or off.

Question 2 - Is there any property that will return the index or text of the currently focussed item? eg. if i am currently highlighting the 6th item in the combobox items with my keyboard. (Selected item does not return the item that i just highlight during keyboard navigation)

If you need more information about what we are trying the achieve you can continue to read...

We are using the Radcombobox to autosuggest employees. For better user experience, what we want to do is - If the user tyes something like - 'smith', in all the auto suggested values we want to 'bold' the text 'smith' eg-

John Smith
Jonathon Smithson
Smith and others

so what we do is while populating the list of values to autosuggest, we use the <b> tags to format the text.

So baiscally we add

John <b>Smith</b>
<b>Smith</b> and others

etc...

This works perfectly and we can see the search results with Smith highlighted.
However, when we use the keyboard to navigate in this list of suggested values, the text  'John <b>Smith</b>' (with the html <b> tags) appear in the text box.

Please advise.

Jyoti
Top achievements
Rank 1
 asked on 25 Jun 2009
11 answers
384 views
Hi guys, need a bit of help, here's the scenario

I'm popping up a RadWindow on the click of a button, which I have working fine in 2 different ways:-
Method 1, aspx page
function ShowAddUserPopup() {  
   var oWnd = $find("<%=AddUserPopup.ClientID%>");  
   oWnd.setUrl('addUser.aspx');  
   oWnd.show();  
}

<

 

telerik:RadWindowManager ID="RadWindowManager1" runat="server">

 

 

 

<Windows>

 

 

 

    <telerik:RadWindow ID="AddUserPopup" runat="server" Behavior="Close" Modal="True" Width="700px" Height="650px" VisibleStatusbar="False" OnClientClose="OnClientClose">

 

 

 

    </telerik:RadWindow>

 

 

 

  </Windows>

 

 

 

</telerik:RadWindowManager>

 

 

 

 

<

 

button onclick="ShowAddUserPopup();return false;" type="button">Add User</button>

 

 

 

 


Method 2, CS page
AddUserPopup.OpenerElementID = btnAddUser.ClientID;  
AddUserPopup.NavigateUrl = "addUser.aspx"

Both work fine but what I need to do is, when a user clicks the button, check the users' permission stored in the database first and if they have the relevant permission for accessing the section then it will pop up the radWindow

So it would need to be in an if else statement.

I tried the following in the if else
lblMessage.Text = "<script>ShowAddUserPopup()</script>"
but it throws a runtime error stating that the oWnd window handle is null. I then tried the following in place of the code in the first section
function ShowEditUserPopup() {  
    var oWnd = radopen('editUser.aspx', "EditUserPopup");  
but it threw an error stating that RadWindowManager was null. RadWindowmanager is present as is shown in the first section of code.

Any help would be appreciated.
Denis
Top achievements
Rank 1
 answered on 25 Jun 2009
2 answers
335 views
I have a RadGrid where the first column is declaratively created as GridBoundColumn:
                <%--ID COLUMN--%>
                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" ReadOnly="True"
                    SortExpression="ID" UniqueName="ID">
                    <ItemStyle Width="35px"></ItemStyle>
                </telerik:GridBoundColumn>

It is defined as the only DataKeyName in the grid:
        <MasterTableView DataKeyNames="ID" DataSourceID="WORDC" PageSize="40" AllowMultiColumnSorting="true"
            EnableHeaderContextMenu="true" >

Defined in ClientSettings I have:
            <ClientEvents OnRowSelected="RowSelected" />

The function RowSelected is defined (to test, there is a bigger "Real" function if I ever get this to work) as:
        function RowSelected(sender, args) {
            var ID = args.getDataKeyValue("ID")
            var label = 
            "ID:" + args.getDataKeyValue("ID");
        } 

With the grid populated, EVERY ID column has a value. But when I select a row and break in the function all I ever get is null for args.getDataKeyValue("ID").

WHAT am I missing??????

Thanks,

Joe B
Brad
Top achievements
Rank 2
 answered on 25 Jun 2009
1 answer
58 views
Is there such a thing as a server side rowselect?

I've got 2 radgrids.  When I select a ROW (not a button) on the lefthand grid I want to change what is displayed in the righthand grid.

How?
Daniel
Telerik team
 answered on 25 Jun 2009
9 answers
368 views
Hello,

I would like to suggest two useful features for FileExplorer:

1-) Integrate the Image Editor in context menu to resize image files.
2-) Add paging support for folders with large number of files.


Kind Regards,
Newton
Michael
Top achievements
Rank 1
 answered on 25 Jun 2009
1 answer
199 views
I want to create a CustomValidator that will ensure that one of two different controls has a value. How do I get a reference to both controls in the ServerValidate event? My grid looks something like:

<telerik:RadGrid ID="MyGrid" runat="server" 
    OnNeedDataSource="MyGrid_NeedDataSource" 
    OnItemDataBound="MyGrid_ItemDataBound" 
    OnInsertCommand="MyGrid_InsertCommand" 
    OnUpdateCommand="MyGrid_UpdateCommand" 
    OnDeleteCommand="MyGrid_DeleteCommand" 
    > 
    <MasterTableView DataKeyNames="Key" CommandItemDisplay="Top" EditMode="InPlace"
        <Columns> 
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" 
                <HeaderStyle Width="40px" HorizontalAlign="Center" /> 
                <ItemStyle Width="40px" HorizontalAlign="Center" /> 
            </telerik:GridEditCommandColumn> 
 
            <telerik:GridTemplateColumn UniqueName="Category" HeaderText="Category"
                <ItemStyle Width="100px" /> 
                <HeaderStyle Width="100px" /> 
                <ItemTemplate> 
                    <%#DataBinder.Eval(Container.DataItem, "Category.Name") %> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <telerik:RadComboBox ID="CategoryEdit" runat="server" 
                        Width="100%" 
                        DataSourceID="CategoryDataSource"  
                        DataTextField="Name" DataValueField="Key" 
                        SelectedValue='<%#Bind("CategoryKey") %>'
                    </telerik:RadComboBox> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
 
            <telerik:GridTemplateColumn UniqueName="Contact" HeaderText="Contact"
                <ItemStyle Width="150px" /> 
                <HeaderStyle Width="150px" /> 
                <ItemTemplate> 
                    <%#DataBinder.Eval( Container.DataItem, "ContactName" )%> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <telerik:RadComboBox ID="ContactEdit" runat="server" 
                        Width="100%" 
                        DataSourceID="ContactDataSource"  
                        DataTextField="Name" DataValueField="Key" 
                        SelectedValue='<%#Bind("ContactKey") %>'
 
                    <asp:CustomValidator ID="ContactOrDescriptionValidator" runat="server"  
                        Display="Dynamic" 
                        ErrorMessage="Item must have a contact or a description." 
                        OnServerValidate="MyGrid_ContactOrDescriptionValidator_ServerValidate" 
                        > 
                    </asp:CustomValidator> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
 
            <telerik:GridTemplateColumn UniqueName="Description" HeaderText="Description"
                <ItemStyle Width="150px" /> 
                <HeaderStyle Width="150px" /> 
                <ItemTemplate> 
                    <%#DataBinder.Eval( Container.DataItem, "Description" )%> 
                </ItemTemplate> 
                <EditItemTemplate> 
                    <telerik:RadTextBox ID="DescriptionEdit" runat="server"  
                        Width="100%" MaxLength="50" 
                        Text='<%#Bind("Description") %>'
                    </telerik:RadTextBox> 
                </EditItemTemplate> 
            </telerik:GridTemplateColumn> 
 
            <telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="DeleteColumn"  
                CommandName="Delete" 
                <HeaderStyle Width="20px" HorizontalAlign="Center" /> 
                <ItemStyle Width="20px" HorizontalAlign="Center" /> 
            </telerik:GridButtonColumn> 
        </Columns> 
    </MasterTableView> 
</telerik:RadGrid>  


Notice that my CustomValidator does not have a ControlToValidate value because I want to ensure that either the ContactEdit combo box has a value or the description has a value. Is there a way to do this or am I required to have a custom edit form?
Thomas
Top achievements
Rank 1
 answered on 25 Jun 2009
0 answers
92 views
I am correctly receiving a parameter passed to a RadWindow using:

    protected void Page_Load(object sender, EventArgs e)
    {
          WORDC.SelectParameters["WORID"].DefaultValue = Request.QueryString["WORID"];
    }


How do I get the stored proc, WORDC to execute? It is in a RadTabStrip control:
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Outlook"
         MultiPageID="WORDetails" DataSourceID="WORDC" SelectedIndex="0" AutoPostBack="true">

TIA,

Joe B
 
Brad
Top achievements
Rank 2
 asked on 25 Jun 2009
2 answers
86 views
I have a Radgrid with EditMode="EditForms". When adding a new record, I accidently hit the Enter key and it cleared all data I entered. What event get fired by clicking on Enter key and how to prevent this from happening?

I also tried in editing and noticed that clicking on Enter key make the screen reload the data. All updates are gone.

Does anyone come cross this kind of problem?

Thanks!
Ying
Ying
Top achievements
Rank 1
 answered on 25 Jun 2009
0 answers
84 views
Hi

   I want an arrow image at end of RadMenuItem text if it has childs...

   And How can i change that arrow image in to another image after it expanded..

   Thanks
    Srikanth gn
srikanth
Top achievements
Rank 1
 asked on 25 Jun 2009
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?