Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
120 views
Is there a way to prevent the nodes from expanding when a node checkbox is checked?

Thanks,
Greg
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2010
3 answers
137 views
Hi,

I'm new to the grid control/asp.net programming and need this solution rather urgently, help is appreciated.

I'm creating a link URL in my table but only want the field to have a hotlink if it is active, else show data and no hotlink.

how do i do this?
the item template is:

<telerik:GridTemplateColumn ItemStyle-HorizontalAlign="Right" HeaderText="Matches"
                            DataField="Matches">
                            <ItemTemplate>
                                <div class="grid_4 center">
                                    <a href="<%#Eval("MatchesURL") %>" class="blueLink" style="font-weight:bold;">
                                        <%#Eval("Matches")%>
                                    </a>
                                </div>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn> 
Princy
Top achievements
Rank 2
 answered on 19 Mar 2010
0 answers
50 views
thank you !
j hg
Top achievements
Rank 1
 asked on 19 Mar 2010
1 answer
97 views
Hello there,

I am trying to use RadGrids own Insert/Update/Delete method in order to edit or delete any records i want.

I have 2 columns on my table Group_id and Group_Name where group_id is Auto Increment.

I copy and pasted the code from http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx for VB.NET and modified but it does nothing. 
When I edit and press update button it says: Group with ID 15 is updated! but nothing changes! also when I press Delete button nothing happens...

This is my code
Imports System.Data.SqlClient 
Imports Telerik.Web.UI 
Imports System.Drawing 
 
Partial Class category 
    Inherits System.Web.UI.Page 
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load 
        'Put user code to initialize the page here 
        RadGrid1.DataBind() 
    End Sub 
    Protected Sub btninsert_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btninsert.Click 
        Dim sConnStr As String = "Data Source=Barlet-HP\SQLEXPRESS;Initial Catalog=KDN;Integrated Security=True" 
        Dim cnBKTest As New SqlConnection(sConnStr) 
        Dim cmdTest As New SqlCommand("addGroup", cnBKTest) 
 
        cmdTest.CommandType = Data.CommandType.StoredProcedure 
 
        cmdTest.Parameters.Add(New SqlParameter("@Group_Name", Data.SqlDbType.VarChar)) 
        cmdTest.Parameters("@Group_Name").Value = TextBox1.Text.ToString 
 
 
 
 
        cnBKTest.Open() 
        cmdTest.ExecuteNonQuery() 
        cnBKTest.Close() 
        RadGrid1.DataBind() 
 
        Label2.Text = "Last Inserted Category is: " & TextBox1.Text 
 
        TextBox1.Text = "" 
        TextBox1.Focus() 
        '''''''''''''''''''''''''''''''''''''''''''''' 
    End Sub 
 
    Protected Sub RadGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource 
 
    End Sub 
 
    Protected Sub RadGrid1_ItemDeleted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridDeletedEventArgs) Handles RadGrid1.ItemDeleted 
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) 
        Dim id As String = item.GetDataKeyValue("Group_id").ToString() 
 
        If Not e.Exception Is Nothing Then 
            e.ExceptionHandled = True 
            SetMessage("Group with ID " + id + " cannot be deleted. Reason: " + e.Exception.Message) 
        Else 
            SetMessage("Group with ID " + id + " is deleted!") 
        End If 
    End Sub 
 
    Protected Sub RadGrid1_ItemUpdated(ByVal source As Object, ByVal e As Telerik.Web.UI.GridUpdatedEventArgs) Handles RadGrid1.ItemUpdated 
        Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem) 
        Dim id As String = item.GetDataKeyValue("Group_id").ToString() 
 
        If Not e.Exception Is Nothing Then 
            e.KeepInEditMode = True 
            e.ExceptionHandled = True 
            SetMessage("Group with ID " + id + " cannot be updated. Reason: " + e.Exception.Message) 
        Else 
            SetMessage("Group with ID " + id + " is updated!") 
        End If 
    End Sub 
 
    Protected Sub RadGrid1_ItemInserted(ByVal source As Object, ByVal e As Telerik.Web.UI.GridInsertedEventArgs) Handles RadGrid1.ItemInserted 
        If Not e.Exception Is Nothing Then 
            e.ExceptionHandled = True 
            e.KeepInInsertMode = True 
            SetMessage("Product cannot be inserted. Reason: " + e.Exception.Message) 
        Else 
            SetMessage("New product is inserted!") 
        End If 
    End Sub 
 
    Private Sub DisplayMessage(ByVal text As String) 
        RadGrid1.Controls.Add(New LiteralControl(String.Format("<span style='color:red'>{0}</span>", text))) 
    End Sub 
 
    Private Sub SetMessage(ByVal message As String) 
        gridMessage = message 
    End Sub 
 
    Private gridMessage As String = Nothing 
    Protected Sub RadGrid1_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid1.DataBound 
        If Not String.IsNullOrEmpty(gridMessage) Then 
            DisplayMessage(gridMessage) 
        End If 
    End Sub 
End Class 
Allow Automatic Delete is set to 'TRUE'
Allow Automatic Insert is set to 'TRUE'
Allow Automatic Update is set to 'TRUE'

any suggestions

Thanks
Barlet Hamzai
Tsvetoslav
Telerik team
 answered on 19 Mar 2010
8 answers
239 views

Hello,

We are currently in the process of evaluating RadEditor in order to use it in a  MOSS 2007 Publishing project.
Functionality fits our project needs but there are some issues that need clarification.

The version I have deployed on our MOSS Server is RadEditorMOSS 5.6.2.0 and I am using a RadHtmlField embedded in a Page Layout.

I would like to verify the following things regarding Tables:

1. In Table Wizard: Table Properties: CSS Class Layout , there is a drop down with pre-defined styles. Is it possible to create your own custom styles that apply to tables, and how is this done?

2. In the following RadEditor Demo (http://demos.telerik.com/aspnet-ajax/editor/examples/tablelayoutcssfile/defaultcs.aspx)
, when you click on an element of a table, on the bottom of the editor, some choices on setting the element's style appear. Does this functionality exist only in ASP.NET version of the editor, or there is a way to enable it in the MOSS version also?

Your feedback would be very helpful.

Regards,

Kostas

Stanimir
Telerik team
 answered on 19 Mar 2010
2 answers
103 views
I thought the image manager navigation problem has been solved in version 5.4.1.  But I recently installed new version 6.2 and the RADEditor image manager can't navigate to the upper level. 
Stanimir
Telerik team
 answered on 19 Mar 2010
1 answer
220 views
how to give background color to RadGrid on any condition?  suppose I want to show a light red color to my Grid where Priority is High?
Shinu
Top achievements
Rank 2
 answered on 19 Mar 2010
3 answers
269 views
Hi,

Is there a way by which I can retrive the value of a column of a row, in the Updating() event of the sql data source control? I am trying to set the parameters of the stored procedures on updating event. And the value of one of the parameters will be from one of the columns of the row being updated.

Thanks
Veli
Telerik team
 answered on 19 Mar 2010
1 answer
209 views
Hi all,
Everytime I create a new page, I have to delete "RadControls for ASP.NET AJAX Q3 2009 NET20", can I just delete once and it's never appear again? Thx
Erjan Gavalji
Telerik team
 answered on 19 Mar 2010
2 answers
121 views
Hi, I am using Telerik RadGrid control on my page and when I click on edit link to generate form edit content, it gives me following error.

Microsoft JScript runtime error: Sys.InvalidOperationException: Two components with the same id 'ctl00_ContentPlaceHolder1_UserMain1_PhysicianProfessionalPageControl_grdEducation' can't be added to the application.

<telerik:RadGrid ID="grdworkhistory" AllowMultiRowSelection="True" AllowMultiRowEdit="True" 
                Skin="WebBlue" runat="server" AllowAutomaticInserts="True" EnableViewState = "false" 
                Width="97%" PageSize="10" AllowAutomaticUpdates="True"   
                AllowPaging="True" AutoGenerateColumns="False" OnItemCreated="grdworkhistory_ItemCreated" 
                ShowStatusBar="True"   
                GridLines="Both" ShowFooter="True">  
            <ClientSettings> 
                <Selecting AllowRowSelect="true" /> 
            </ClientSettings> 
            <MasterTableView CommandItemDisplay="Top" DataKeyNames="EmploymentEpisodeId" ClientDataKeyNames="EmploymentEpisodeId" 
                EditMode="EditForms"  AutoGenerateColumns="False" Width="100%">  
                  
                <Columns> 
                    <telerik:GridEditCommandColumn> </telerik:GridEditCommandColumn> 
                    <telerik:GridBoundColumn DataField="JobEmployer.Name" EditFormColumnIndex="0" HeaderText="Name" SortExpression="Name" 
                        UniqueName="WHname" Visible="true">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridBoundColumn DataField="JobTitle" EditFormColumnIndex="1" HeaderText="Title" SortExpression="Title" 
                        UniqueName="WHtitle" Visible="true">  
                    </telerik:GridBoundColumn> 
                      <telerik:GridBoundColumn DataField="JobEmployer.EmployerAddress.Address1" EditFormColumnIndex="0" HeaderText="Address" SortExpression="created_date" 
                        UniqueName="WHaddress" Visible="false">  
                    </telerik:GridBoundColumn> 
                    <telerik:GridDropDownColumn DataField="JobEmployer.EmployerAddress.AddressCountry.CountryId" EditFormColumnIndex="1" HeaderText="Country" 
                        SortExpression="WHcountry" UniqueName="Country" Visible="false" ListTextField="name" ListValueField="countryId">  
                    </telerik:GridDropDownColumn> 
                    <telerik:GridBoundColumn DataField="JobEmployer.EmployerAddress.City" EditFormColumnIndex="0" HeaderText="City"   
                        SortExpression="WHcity" UniqueName="city" visible="false">  
                    </telerik:GridBoundColumn> 
                      
                    <telerik:GridDropDownColumn DataField="JobEmployer.EmployerAddress.AddressState.StateId" EditFormColumnIndex="0" HeaderText="State" 
                        SortExpression="WHstate" UniqueName="state" Visible="false" ListTextField="name" ListValueField="stateId">  
                    </telerik:GridDropDownColumn> 
                      
                    <telerik:GridBoundColumn DataField="JobEmployer.EmployerAddress.PostalCode" EditFormColumnIndex="1" HeaderText="Postal"   
                        SortExpression="WHpostal" UniqueName="postal">  
                    </telerik:GridBoundColumn> 
                      
                    <telerik:GridDateTimeColumn EditFormColumnIndex="0" DataField="BeginDate" HeaderText="From" 
                        SortExpression="WHfrom" UniqueName="beginDate" Visible="true" > 
                    </telerik:GridDateTimeColumn> 
                      
                    <telerik:GridDateTimeColumn EditFormColumnIndex="1" DataField="EndDate" HeaderText="To" 
                        SortExpression="WHto" UniqueName="endDate" Visible="true">  
                    </telerik:GridDateTimeColumn> 
                      
                    <telerik:GridBoundColumn ItemStyle-Wrap="true" EditFormColumnIndex="0" DataField="Description" 
                        SortExpression="WHDescription" UniqueName="description" Visible="false">  
                    </telerik:GridBoundColumn>   
                      
                    <telerik:GridBoundColumn ItemStyle-Wrap="true" EditFormColumnIndex="0" DataField="EmploymentEpisodeId" 
                        SortExpression="WHID" UniqueName="EmploymentEpisodeId" Visible="false">  
                     </telerik:GridBoundColumn> 
                      
            </Columns> 
              <EditFormSettings ColumnNumber="2" CaptionDataField="Work History" CaptionFormatString="Edit properties for work history">  
                    <FormTableItemStyle Wrap="true"></FormTableItemStyle> 
                    <FormCaptionStyle > </FormCaptionStyle> 
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" 
                        Width="100%" /> 
                    <FormTableStyle CellSpacing="0" CellPadding="2"  Height="110px" 
                        BackColor="White" /> 
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
                    <EditColumn ButtonType="LinkButton"   
                        InsertText="Insert " UpdateText="Update record" UniqueName="EditCommandworkhistory" CancelText="Cancel edit">  
                    </EditColumn> 
                    <FormTableButtonRowStyle HorizontalAlign="Left" ></FormTableButtonRowStyle>  
                </EditFormSettings> 
             </MasterTableView>     
        </telerik:RadGrid> 
Mugdha Aditya
Top achievements
Rank 1
 answered on 19 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?