Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
When clicking a node in the OnNodeClick server event how can we check if the node the last level/node
Princy
Top achievements
Rank 2
 answered on 08 Oct 2012
1 answer
122 views
Hello,
I have Grid with Edit mode of "EditForms". When the user clicks the edit button, it brings up an edit tree with two radio buttons with the same group name and two buttons: approve and cancel. By default, neither of the radio buttons are checked. I want to make it so that when the user clicks the approve button and neither radio button is checked, it does not close the edit form.

Here is the radgrid declaration:
<telerik:RadGrid ID="approvalGrid"  runat="server" AllowPaging="true" ShowStatusBar="true" ShowFooter="false" AllowFilteringByColumn="false" FilterItemStyle-HorizontalAlign="Center" ShowGroupPanel="false"
AutoGenerateColumns="false" PageSize="25" AllowSorting="true" AllowMultiRowSelection="false" GirdLines="Vertical" Skin="WebBlue" AlternatingItemStyle-HorizontalAlign="Center"
ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" GroupingSettings-CaseSensitive="false"  AllowAutomaticInserts="false" AllowAutomaticUpdates="false" AllowAutomaticDeletes="true" OnItemCommand="approvalGrid_ItemCommand"
OnNeedDataSource="approvalGrid_NeedDataSource" OnItemDataBound="approvalGrid_ItemDataBound" Width="1080" EnableLinqExpressions="false">

Here is the edit form:
<EditFormSettings CaptionFormatString=" Approve ID #{0}" CaptionDataField="ID" EditFormType="Template">
<PopUpSettings Modal="false" Width="550px" />
<FormTemplate >
<asp:Label ID="ApprovalWindowError" runat="server" Font-Bold="true" Font-Size="Large" Font-Underline="true" ForeColor="#990000" /<fieldset>
<legend><asp:Label ID="editLabel" runat="server" Text="Select A Location" Font-Bold="true" Font-Size="Medium"></asp:Label> </legend>
<table>                                                           
<tr>
<td align="left">
   Original Location:
</td>                                                               
<td align="left">
<telerik:RadButton ID="SendToOrig" runat="server" ButtonType="ToggleButton" ToggleType="Radio" GroupName="ApproveGroup" Text='<%#Bind("OrigLocation") %>'>
   </telerik:RadButton>
</td>
</tr>
<tr>
<td align="left">
Receiving Location:
 </td>                                                                                                                                 
<td align="left">                                                                   
<telerik:RadButton ID="SendToLocation" runat="server" ButtonType="ToggleButton" ToggleType="Radio" GroupName="ApproveGroup" Text='<%#Bind("Location") %>'>
</telerik:RadButton>                                                               
</td>
</tr>
   </table>
   <table>
<tr>
<td align="right">                                                                   
<telerik:RadButton ID="approveButton" runat="server" Text="Approve" Font-Bold="true" CommandName="Update"></telerik:RadButton>
<telerik:RadButton ID="cancelButton" runat="server" Text="Cancel" Font-Bold="true" CommandName="Cancel"></telerik:RadButton>
</td>
</tr>
</table>
</fieldset>                                                       
</FormTemplate>
</EditFormSettings>

here is the code for the approveButton:
protected void approvalGrid_ItemCommand(object sender, GridCommandEventArgs e)
    {
         
        if (e.CommandName == "Update")
        {                           
            GridEditableItem item = e.Item as GridEditableItem;
            //checks if at least one radio is pushed
            if ((item.FindControl("SendToOrig") as RadButton).Checked || (item.FindControl("SendToLocation") as RadButton).Checked)
            {
                if ((item.FindControl("SendToOrig") as RadButton).Checked)
                {
                    successLabel.Text = "Adjustment Approved For Original Location";                                      
                }
                else
                {
                    successLabel.Text = "Adjustment Approved For Receiving Location";
                }
            }
            //if neither radios are pushed
            else
            {
                errorLabel.Text = "Approval Failed: You Did Not Select A Location";
            }
        }
        if (e.CommandName == "Cancel")
        {
            errorLabel.Text = "Approval Canceled";
        }
    }

Thanks,
Justin
Slav
Telerik team
 answered on 08 Oct 2012
1 answer
104 views
i added a Radmenu in my asp.net image. instead of default text for menu, i added images. but i am seeing a border of real menu around image. i am not getting 2 menu items close together. a screenshot is attached. please give me a solution how to remove this border
Boyan Dimitrov
Telerik team
 answered on 08 Oct 2012
3 answers
278 views
Hi there,
I need to bind the listitems into the GridDropdownColumn in edit mode where my grid also bind data from DataTable.I have seen so many examples and all of them gave the solution with GridTemplateColumn..I cant understand is there is a only way for showing dropdownlist in edit mode????..If it is then what is the use of GridDropdownColumn and how can i bind list of items into it without using GridTemplateColumn..
Shinu
Top achievements
Rank 2
 answered on 08 Oct 2012
1 answer
187 views
I have multiple comboBoxes all with checkboxes. What I want to do is pass the checkedItems (multiple) of a comboBox as a parameter value for a stored procedure.

The way the stored procedure is built, having a separator of "+" would work when more than one checkbox is checked. (I have Display All Input set to true). However the separator by default is ",".

Is there any way of changing the separator that appears when more than one checkbox is checked within a comboBox?

If not, how do I append a "+" sign onto the end of each item when it is checked, basically it would be to convert the checkedItems to a "+" delimited list and send them as parameters that way.

cmd.Parameter.AddWithValue("@ID_SYSTEM", ID_SYSTEM);

I want to be able to pass more than just one instance of @ID_SYSTEM as a parameter value for a stored procedure.
Kalina
Telerik team
 answered on 08 Oct 2012
1 answer
61 views
Hello,

I want to make the the td elements to go behind the header. I've attached an image indicating what I want to do:

 http://postimage.org/image/brvww4a3b/


Galin
Telerik team
 answered on 08 Oct 2012
1 answer
99 views
Hi,

Here is my code :

Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs) Handles RadButton1.Click
           Dim sql = (From p In DbContext.VUE_BACKOFFICE_INTERFACE_PHOTOs Select p Where p.etablissement.Contains(RadTextBox1.Text) Or p.titre.Contains(RadTextBox1.Text) Or p.description.Contains(RadTextBox1.Text) Or p.copyright.Contains(RadTextBox1.Text) Or p.tag.Contains(RadTextBox1.Text) Or p.sous_collection.Contains(RadTextBox1.Text) Order By p.id_photo Descending)
        If sql.Count <> 0 Then
            RadFilter1.RootGroup.Expressions.Clear()
            RadFilter1.RootGroup.GroupOperation = RadFilterGroupOperation.Or
            For Each result In sql
                Dim expr1 As New RadFilterEqualToFilterExpression(Of Integer)("id_photo")
                expr1.Value = result.id_photo
                RadFilter1.RootGroup.AddExpression(expr1)
            Next
            RadFilter1.RecreateControl()
            RadFilter1.FireApplyCommand()
        End If
    End Sub

Lets say that my query return 1500 records, 1500 lines/rows will be added to the RadFilter which cause the page to freeze and it goes nowhere.
Not only the page freeze but my whole website become unresponsive.

How would you deal with that ? How many rows can handle the Rafilter component (approximately).

Right now i'm doing a If sql.Count > 100 Then do nothing but I'd like to have your feedback on such a situation

Thank You
Arnaud
Antonio Stoilkov
Telerik team
 answered on 08 Oct 2012
1 answer
243 views
Hi,
I am trying to assign value to Radnumeric textbox from jquery on change() event of same textbox.  
But its not working fine. If i replace teleik textbox to asp textbox its working fine.

MyCode.aspx
<script type="text/javascript">
    $(document).ready(function() {
        $('#<%= txtAmount.ClientID %>').change(function() {
$('#<%= txtAmount.ClientID %>').val(123);
}
})
    });
</script>
 
 
<telerik:RadNumericTextBox ID="txtAmount" ShowSpinButtons="false" Type="Number" runat="server"
                    InvalidStyleDuration="100" Width="200">
                    <NumberFormat DecimalDigits="2" DecimalSeparator="." AllowRounding="true" KeepNotRoundedValue="False" />
                </telerik:RadNumericTextBox>

Please check and let me know.
Thanks,
Abhi
Princy
Top achievements
Rank 2
 answered on 08 Oct 2012
0 answers
59 views
 See my screen shot.
 I have typed in Group code/name in Initial Caps.
 how to data Insert in same method(For Initial Caps)
 
This my coding
if (e.CommandName == RadGrid.PerformInsertCommandName)
            {
                if (e.Item is GridEditFormItem)
                {
                   GridEditFormItem item = (GridEditFormItem)e.Item;
                    RadTextBox groupcode = (RadTextBox)item.FindControl("groupcode");
                    RadTextBox groupname = (RadTextBox)item.FindControl("groupname");

                    oDSGroupMaster.groupcode = groupcode.Text;
                    oDSGroupMaster.groupname = groupname.Text;
                    oDSGroupMaster.status = "ADD";
                }
           }
Tamim
Top achievements
Rank 1
 asked on 08 Oct 2012
5 answers
218 views
Hi

Id like to replace a textbox in the insert form with a combo box that has values poulated from database. Any suggestions?

Thanks in advance
Princy
Top achievements
Rank 2
 answered on 08 Oct 2012
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?