Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
224 views
i want to hide the update button if the row was updated ,
just want to update one time only
Mohamed El-Sayed
Top achievements
Rank 1
 answered on 14 Mar 2013
1 answer
172 views
Hi there,

I hope someone can help me. I have a problem with RadGrid after I install latest Telerik ASP.NET AJAX controls Q1 2013. The code now return   values when I select a row. Before the upgrade everything works perfectly.

The code :

ASPX
<telerik:RadGrid ID="ChangeProjectGrid" runat="server" AllowFilteringByColumn="True"
            AllowSorting="True" Font-Bold="False" Font-Italic="False" Font-Overline="False"
            Font-Size="XX-Small" Font-Strikeout="False" Font-Underline="False" GridLines="None"
            EnableLinqExpressions="False" AutoGenerateColumns="False">
            <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" ReorderColumnsOnClient="True"
                EnableRowHoverStyle="True">
                <Scrolling AllowScroll="True" />
            </ClientSettings>
            <MasterTableView AllowMultiColumnSorting="True">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="IDProject" FilterControlAltText="Filter IDProject column"
                        UniqueName="IDProject" Visible="False">
                    </telerik:GridBoundColumn>
                        <telerik:GridCheckBoxColumn UniqueName="Active" AllowFiltering="true" AllowSorting="true"
                        DataField="Active" DataType="System.Boolean" HeaderText="Is Active" HeaderStyle-Wrap="false">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="ProjectAcronym" FilterControlAltText="Filter ProjectAcronym column"
                        HeaderText="Project Acronym" UniqueName="ProjectAcronym" ReadOnly="True">
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProjectTitle" FilterControlAltText="Filter ProjectTitle column"
                        HeaderText="Project Title" UniqueName="ProjectTitle" ReadOnly="True">
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                    </telerik:GridBoundColumn>
                           </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>

Code behind

Protected Sub ChangeProjectGrid_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles ChangeProjectGrid.ItemCommand
 
       If TypeOf e.Item Is GridDataItem Then
 
            Try
                Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
                Dim ts As EfamtPlus.TrenutnaSeja
                
                Dim str As String = dataItem("IDProject").Text
               ' code returns empty (& nbsp;) value - on the old telerik controls returns numeric value
            Catch ex As ThreadAbortException
                ' ne naredi nič
 
            Catch ex As Exception
                PublishException(ex)
                Response.Redirect(NapakaUrl, RedirectParameter)
 
            Finally
                ClientScript.RegisterStartupScript(Page.GetType(), "closeWindow", "<script type='text/javascript'>RefreshParentPageAndClose()</script>")
            End Try
 
        End If
    End Sub

I tried to find similar problem on this forum, goole it, but just coudnt find any so if someone could help me i would be very grateful.

Thanks all in the advance.
Janez Kalan
Andrey
Telerik team
 answered on 14 Mar 2013
1 answer
124 views
When i click at "Add new record" nothing happens when i have GridTemplateColumn like:
<telerik:GridTemplateColumn HeaderButtonType="TextButton" HeaderStyle-Width="30px">
  <ItemTemplate>
    <asp:ImageButton ID="ibVisa" CommandArgument='<%# Container.DataItem("id") %>' ImageUrl="../images/rtGrid/edit.gif" ToolTip="Uppdatera" OnClick="Visa" PostBackUrl="~/admin/foretag/uppdate/default.aspx" runat="server" />
  </ItemTemplate>
</telerik:GridTemplateColumn>

The grid is only loading, nothing happens when i click. But edit works.

If i remove the GridTemplateColumn a blank record showing, and i can Add new record.
Whats the problem?


Princy
Top achievements
Rank 2
 answered on 14 Mar 2013
1 answer
95 views
Hello,

I'm trying to use the Visual Style Builder to create a custom theme for the grid control. I hope that the requirement is very simple but I must be doing something wrong.

I am attempting to make a theme using Metro as the base skin. The only modification I want to make is to change the blue colour that is used in metro as a highlight colour with our company orange (#F7B322). All other colours (mostly white and grey on metro) should stay the same.

I followed these steps:

- open visual style builder
- select metro as base skin
- tick grid tickbox
- click create
- under colourize tab (not fine tune) change base colour to #F7B322
- click Save
- repeat for Calendar, Input, Menu and Slider
- Download skin

In the previews this looks good but when we load up the skin on our application it looks all wrong. The grid lines and some grey elements in the background have turned white.

Any help would be amazing. Please let me know if I can provide any other useful information.

OS: Windows 7,
Browser: IE9 and Firefox 19
ASP.NET: 4.0
Telerik: 2012.3
Ivan Zhekov
Telerik team
 answered on 14 Mar 2013
5 answers
145 views

Hi all,
In my RadTimePicker I want to show time in 24 hour format. I gone thourgh some of the threads of your site and wrote my code in the following way -

 

<telerik:RadTimePicker ID="RadTimePicker1" runat="server"  SharedTimeViewID="sharedTimeView" 
    Width="100px" Skin="WebBlue" DateInput-DateFormat="HH:mm" 
    DateInput-DisplayDateFormat="HH:mm" TimeView-TimeFormat="HH:mm" >                                   
</telerik:RadTimePicker>

It is working fine in my development environment. But when I deployed this code in our local test environment, it is not showing data is as should show. The input field (textbox) is showinig time in 24 hour format but the popup is showing in 12 hour format. Please check the attached image for your reference. Both the development system and test system are using same dll.

Why it is behaving like this? Am I missing someting? Any Idea?
Diana
Top achievements
Rank 1
 answered on 14 Mar 2013
1 answer
89 views
Hi

We are using 4.5.1 version of Telerik HTML editor.
While creating a hyperlink inside the editor it brings up the dialog box for selecting the link, but it doesn't creates any link in the editor.

Kindly request your thoughts on why this is not creating any link in the editor control.

Thanks


Rumen
Telerik team
 answered on 14 Mar 2013
2 answers
204 views
Hey all,

I want to insert an ID by using eval in a button in GroupHeaderTemplate, can anyone help as I can't access Eval.

My code
   <GroupHeaderTemplate>
               <telerik:RadButton ID="btnAddSpecificDelegationToCashGift" OnClick="btnAddSpecificDelegationToCashGift_OnClick"
                   CommandArgument=''
                   runat="server" Text='<%# Eval("TRP_LOOK_UP.ID") %>' >
                   <Icon PrimaryIconCssClass="rbAdd" PrimaryIconLeft="4" PrimaryIconTop="4"></Icon>
               </telerik:RadButton>
</GroupHeaderTemplate>

Or is there any other way to eval the ID.

Grid view data source.
    protected void gridAddDelegationToCashGift_OnNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
       {
           destinationID = int.Parse(Request.QueryString["destinationID"]);
           if (destinationID != 0)
               gridAddDelegationToCashGift.DataSource = _srv.GetDelegationNotAddedToCashGift(destinationID);
       }
Ahmed
Top achievements
Rank 1
 answered on 14 Mar 2013
1 answer
157 views
Hello,

I was wondering if its possible to have a treeview with the nodes being comboboxes/ listboxes.  The selection of one item may have additional nodes of additional comboboxes/listboxes.

Thanks in advance,

Mike
Princy
Top achievements
Rank 2
 answered on 14 Mar 2013
1 answer
92 views
Hi,
I am using Telerik Control Library v2009 for my web application.

Everything works fine in IE 9 Compatibility mode. All embedded styles works fine with my control (i.e. RadGrid, Calendar Control etc).
But in non-compatibility mode, no css loaded properly.
If we check through Developer Tools -> Console, it gives the following error.
///////////////////////////////////////
SEC7113: CSS was ignored due to mime type mismatch WebResource.axd?d=4DzX1gSlgsf9eiyfsOmMEfF7Yniuv7E5z4WX19F9pvc3MxpWZC1oEFL5MmC1hWCcrhk7Nuyyx5tolNE_3FShghZ5SLfqnd3m1ZEbdufb5neMr009seJgX784LZXOv_BjH83oszSu2EYKsUqghm4qZ5pcHFo1&t=634770805886806167
/////////////////////////////////////

Please suggest?
Imran
Galin
Telerik team
 answered on 14 Mar 2013
1 answer
73 views
I have a Grid that is grouped. When I update the database based on the group I get the foolwoing error:

"Unable to cast object of type 'Telerik.Web.UI.GridGroupFooterItem' to type 'Telerik.Web.UI.GridDataItem'. "

The database is updated even though the error is thrown.

Here is my code.
Private Sub btn_ApproveAll_Click(sender As Object, e As EventArgs)
 
    Dim item As GridGroupHeaderItem = DirectCast(rgd_ProjectPlanTasksApprove.MasterTableView.GetItems(GridItemType.GroupHeader)(0), GridGroupHeaderItem)
    For Each groupHeader As GridGroupHeaderItem In rgd_ProjectPlanTasksApprove.MasterTableView.GetItems(GridItemType.GroupHeader)
        Dim children As GridItem() = groupHeader.GetChildItems()
        For Each child As GridDataItem In children
 
            Dim IDTaskUpdates As String = child("IDTaskUpdates").Text
 
            Dim sql As String
            Dim strConnString As [String] = System.Configuration.ConfigurationManager.ConnectionStrings("SharePoint_ConnectionString").ConnectionString()
            sql = "UPDATE Task_Updates SET TaskUpdateApproved = 1, ApprovedDate = @ApprovedDate, ModifiedDate = @ModifiedDate  WHERE IDTaskUpdates = @IDTaskUpdates"
            Dim cn As New SqlConnection(strConnString)
            Dim cmd As New SqlCommand(sql, cn)
 
            cmd.Parameters.Add("@IDTaskUpdates", SqlDbType.Int).Value = IDTaskUpdates
            cmd.Parameters.Add("@ApprovedDate", SqlDbType.DateTime).Value = Date.Now
            cmd.Parameters.Add("@ModifiedDate", SqlDbType.DateTime).Value = Date.Now
            cmd.Parameters.Add("@IDModifiedUser", SqlDbType.NVarChar, 36).Value = Session("ActiveDirID")
 
            cmd.Connection.Open()
            cmd.ExecuteNonQuery()
            cmd.Connection.Close()
        Next
 
    Next
 
End Sub

As always any help much appreciated.


Andrey
Telerik team
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?