Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
83 views
Hi Guys

I attached one image , my client need same as that
Can you please let me know whether i can do like the same in grid
 that view will have some buttons above the cross image which is in the center and link buttons in all other cell
Initially i need to show a grid with same type with out any data
and after the link button is clicked user will insert data

My requirement
1) I need to show the grid same as like this with out any data
2) Whether this type of design is possible .If yes?Please guide

Karthik.K
Karthik Kantharaj
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
143 views
Hi,

my problem is a little bit tricky. I will try to explain it as clear as I can.

I am using alot of grid in my application. For the moment I have a function called UpdateDefault which looks like this:

Public Sub GridCGSI_UpdateDefaults(ByVal tmpGrid As RadGrid)
    AddHandler tmpGrid.HeaderContextMenu.ItemCreated, AddressOf GridCGSI_HeaderContextMenu_ItemCreated
 
 
    tmpGrid.CellSpacing = "0"
    tmpGrid.AutoGenerateColumns = False
    tmpGrid.AllowPaging = True
    tmpGrid.PageSize = 40
    tmpGrid.AllowSorting = True
 
    tmpGrid.GridLines = GridLines.None
    tmpGrid.AllowFilteringByColumn = True
    tmpGrid.EnableHeaderContextMenu = True
    tmpGrid.ShowStatusBar = True
 
    tmpGrid.HeaderContextMenu.Enabled = True
 
 
    tmpGrid.GroupingSettings.CaseSensitive = False
    tmpGrid.ClientSettings.AllowColumnHide = True
    tmpGrid.ClientSettings.AllowColumnsReorder = True
    tmpGrid.ClientSettings.AllowKeyboardNavigation = True
    tmpGrid.ClientSettings.EnableRowHoverStyle = True
    tmpGrid.ClientSettings.Selecting.AllowRowSelect = True
    tmpGrid.ClientSettings.Scrolling.AllowScroll = True
    tmpGrid.ClientSettings.Scrolling.UseStaticHeaders = True
    tmpGrid.ClientSettings.Resizing.AllowColumnResize = True
    tmpGrid.ClientSettings.Resizing.AllowResizeToFit = True
    tmpGrid.ClientSettings.Resizing.EnableRealTimeResize = True
 
    tmpGrid.FilterMenu.EnableImageSprites = False
 
    tmpGrid.SortingSettings.SortedAscToolTip = "Trié asc"
    tmpGrid.SortingSettings.SortedDescToolTip = " desc"
    tmpGrid.SortingSettings.SortToolTip = "Cliquez ici pour trier"
    tmpGrid.StatusBarSettings.LoadingText = "Chargement..."
    tmpGrid.StatusBarSettings.ReadyText = GetMessageEx(3282).Texte
 
    tmpGrid.GroupingSettings.CaseSensitive = False
 
    tmpGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
 
 
    tmpGrid.MasterTableView.TableLayout = GridTableLayout.Fixed
    tmpGrid.MasterTableView.EnableHeaderContextAggregatesMenu = "True"
    tmpGrid.MasterTableView.NoMasterRecordsText = "Aucun enregistrement à afficher"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.ButtonType = GridButtonColumnType.PushButton
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.UpdateImageUrl = "Images/Icons/055-Check-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.CancelImageUrl = "Images/Icons/056-Check-not-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.InsertImageUrl = "Images/Icons/055-Check-ok-Icon.png"
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.CancelText = GetMessageEx(5352).Texte
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.UpdateText = GetMessageEx(4479).Texte
    tmpGrid.MasterTableView.EditFormSettings.EditColumn.InsertText = GetMessageEx(3177).Texte
    tmpGrid.MasterTableView.CommandItemSettings.AddNewRecordText = GetMessageEx(3177).Texte
    tmpGrid.MasterTableView.CommandItemSettings.RefreshText = "Rafraîchir"
End Sub

As you can see, I am settings some default settings for my grid. The best way it would be to put this in the grid constructor.

I am not familiar with custom user control. I know I can create a class and inherits from RadGrid and extend the constructor, but I don't know how I can implement this in the xaml and use it properly in code behind.

I need your help Telerik! Could you make me a little Project Sample with an example?

Regards,

- Jocelyn
Jocelyn
Top achievements
Rank 1
 answered on 18 Jun 2012
0 answers
37 views
Hello,

I have a nested RadGrid. I want to be able to expand the selected node when returning to the grid from an edit page. I know how to return to the selected page of the RadGrid, but which property is the selected expanded node?

Thanks
Thomas
Thomas
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
133 views
I have this on my RagGrid Edit FormTemplate:              

       <telerik:RadButton ID="RadBtnUpdate" runat="server" Text="Update" CommandName="Update"
                            Visible='<%# !(DataItem is Telerik.Web.UI.GridInsertionObject) %>' CssClass="ComandButton">
                        </telerik:RadButton>
                       
       <telerik:RadButton ID="RadBtnInsert" runat="server" Text="Insert" CommandName="PerformInsert"
                            Visible='<%# DataItem is Telerik.Web.UI.GridInsertionObject %>' CssClass="ComandButton">
                        </telerik:RadButton>

When i "press" insert my "update button" is visible, not "insert button". (on edit appears update button, which is ok)
Any ideea why this?
Shinu
Top achievements
Rank 2
 answered on 18 Jun 2012
7 answers
52 views
Hi all,

In my application I use the RadScheduler control work on MVC3, of course it is not support on MVC3 I must using Web service to bind data. And everything works fine in all browser. But when there are very much items display in the month view( total items close to 700  per month and I set VisibleAppointmentsPerDay="100" to show all of them). In the Firefox 13, IE9, Chrome it should take a froze page in 10s to 20s to loading and drawing all items and when I navigate to next month it takes time longer than that. Especially, in the IE7+ it show a froze page and after that throw an error: Stop running scripts?.

I tried to research to solve that error and i found interesting thing:
http://blogs.msdn.com/b/jpsanders/archive/2008/09/23/a-script-on-this-page-is-causing-internet-explorer-to-run-slowly-if-it-continues-to-run-your-computer-may-become-unresponsive.aspx 
 
That Error script only show on IE7+ when there are more than 5 million line of scripts :(


I am appreciate any support to solve this issue, so far can I use lazy loading in the month view schedule to avoid the froze page???

Plamen
Telerik team
 answered on 18 Jun 2012
0 answers
82 views
Hi
   I am using 2012.1.411.35 version and I have this code which does not work with IE 7 when browser resized but do resize the box on other browsers when resized.

<

 

 

p align="center" style="width:80%;">

<telerik:RadTextBox id="txtDeclineReason" runat="server" Rows="5" TextMode="MultiLine" Width="100%" CssClass="test" Visible="true"></telerik:RadTextBox>

</p>


Any help would be highly appreciated.

Best Regards
Rizwan Bashir

Rizwan
Top achievements
Rank 1
 asked on 18 Jun 2012
1 answer
119 views
That's great to see HTML5 charting controls.
Does the the HtmlChart 2012Q2 have support to stacked bar charts?
Marin Bratanov
Telerik team
 answered on 18 Jun 2012
1 answer
125 views
Maybe I am missing it, or it may just not be there, but one of the features I liked of the normal RadChart was the ability to specify the Y-Axis to not be zero based.  Is this a feature of the new HtmlChart or will I have to set the MinValue in the code behind based on the data returned?  Again if this is not a feature, will this be implemented at all?

Thanks,
Ron
Marin Bratanov
Telerik team
 answered on 18 Jun 2012
1 answer
61 views
I have an ASP:DropDownList that is being styled using the RadFormDecorator.  After the decorator has finished, there is a style width attribute applied that I have not set.  Does anyone know if 1) there is a way to prevent this from happening, or 2) an event that fires after the RadFormDecorator has finished decorating all the controls so that I can then go in and remove the width attribute.

Any help would be much appreciated!

Thanks!
Niko
Telerik team
 answered on 18 Jun 2012
1 answer
425 views
I have a control within a tool tip. Whenever I click the button, I always get -1 for my selected value, not the selected value. I really don't know why I'm getting -1. Here is my code. The reviewerid at the bottom is always -1


<
telerik:RadToolTip ID="PaperRevTooltip" runat="server" ManualClose="True" Modal="True"
            Position="Center" RelativeTo="BrowserWindow" ShowEvent="FromCode" Skin="Telerik"
            Title="Reviewers" Width="400" Height="400">
            <asp:Repeater ID="Repeater1" runat="server">
                <HeaderTemplate>
                    <table border="0" cellpadding="0" cellspacing="5">
                </HeaderTemplate>
                <ItemTemplate>
                    <UC1:UControl ID="test3" runat="server" PaperID='<%# DataBinder.Eval(Container.DataItem, "PaperID")%>'
                        ReviewerID='<%# DataBinder.Eval(Container.DataItem, "ReviewerUserID")%>' reviewId='<%# DataBinder.Eval(Container.DataItem, "ReviewOfPaperID")%>' />
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            <asp:SqlDataSource ID="ReviewersSqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:conferencehubConnectionString %>"
                SelectCommand="admin_PaperReviewers" SelectCommandType="StoredProcedure">
                <SelectParameters>
                    <asp:Parameter Name="PaperID" Type="Int16" DefaultValue="0" Direction="Input" />
                </SelectParameters>
            </asp:SqlDataSource>
        </telerik:RadToolTip>

Here is the relevant code behind for that page. note the item command comes from a rad grid the tool tip shows, but with nothing but the title
Protected Sub item_command(ByVal source As ObjectByVal As Telerik.Web.UI.GridCommandEventArgs) Handles PapersGV.ItemCommand
       Dim index As Integer
       Dim paperID As String
       If e.CommandName = "changeRev" Then
           index = e.Item.ItemIndex
           paperID = Me.PapersGV.Items(index).GetDataKeyValue("PaperID")
           Me.PaperRevTooltip.Title = Me.PapersGV.Items(index).GetDataKeyValue("PaperTitle")
 
           loadPaperReviewersData(paperID)
 
           Me.PaperRevTooltip.visible = True
           Me.PaperRevTooltip.Show()
       Else
           Me.PaperRevTooltip.visible = False
       End If
   End Sub
Protected Sub loadPaperReviewersData(ByVal paperID As String)
       Dim dt As DataTable
       Dim connString As String = System.Configuration.ConfigurationManager.ConnectionStrings("conferencehubConnectionString").ToString
       Dim myConnection As New Data.SqlClient.SqlConnection(connString)
       Dim strSQL As String "admin_PaperReviewers"
       Dim selectCommand As New Data.SqlClient.SqlCommand(strSQL, myConnection)
       Dim SQLReader As SqlDataReader
       Dim paperIDParam As SqlParameter
       Dim values() = {"-1""-1""0", paperID, ""}
       Try
           selectCommand.CommandType = Data.CommandType.StoredProcedure
           paperIDParam = New SqlParameter("PaperId", Data.SqlDbType.Int)
           paperIDParam.Value = paperID
           selectCommand.Parameters.Add(paperIDParam)
           myConnection.Open()
           SQLReader = selectCommand.ExecuteReader()
           dt = New DataTable
           dt.Load(SQLReader)
           myConnection.Close()
 
           'While dt.Rows.Count < minReviewers
           If dt.Rows.Count < maxReviewers Then
               dt.Rows.Add(values)
           End If
 
           'End While
 
           Me.paperReviewersDT = dt
           Me.Repeater1.DataSource = dt
           Me.Repeater1.DataBind()
       Catch ex As Exception
           Response.Write("There has been an error.<br />" & ex.ToString & "<Br />" & strSQL)
       Finally
           myConnection.Close()
       End Try
   End Sub
   Private Property paperReviewersDT() As DataTable
       Get
           Return CType(ViewState("allRevs"), DataTable)
       End Get
       Set(ByVal value As DataTable)
           ViewState("allRevs") = value
       End Set
   End Property


Here is the control uc1
    <td>test
        <asp:Label ID="output" runat="server"></asp:Label>
        <asp:DropDownList ID="RevDropDownList" runat="server" DataSourceID="TrackSqlDS" DataTextField="ReviewerName"
            DataValueField="UserID">
        </asp:DropDownList>
        <asp:CustomValidator ID="revValidator" runat="server" ErrorMessage="*"></asp:CustomValidator>
    </td>
    <td>
        <asp:Button ID="AddButton" runat="server" Text="Add" CommandName="AddReviewer" />
     
        <asp:Button ID="DelButton" runat="server" Text="Delete" CommandName="DeleteReviewer"
            Visible="false" />
     
        <asp:Button ID="UpdateButton" runat="server" Text="Update" CommandName="UpdateReviewer"
            Visible="false"/>
    </td>
    <asp:SqlDataSource ID="TrackSqlDS" runat="server" ConnectionString="<%$ ConnectionStrings:conferencehubConnectionString %>"
        SelectCommand="admin_AllReviewers" SelectCommandType="StoredProcedure" OnSelecting="TrackItDataSource_Selecting">
        <SelectParameters>
            <asp:Parameter Name="PaperID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
</tr>

And the control code
    Private _ReviewerID As Integer
    Private _ReviewID As Integer
    Public Property reviewId() As Integer
        Get
            Return CType(ViewState("reviewId"), Integer)
        End Get
        Set(ByVal value As Integer)
            ViewState("reviewId") = value
        End Set
    End Property
 
    Public Property PaperID() As Integer
        Get
            Return CType(ViewState("paperId"), Integer)
        End Get
        Set(ByVal value As Integer)
            ViewState("paperId") = value
        End Set
    End Property
    Public Property ReviewerID() As Integer
        Get
            Return Me.RevDropDownList.SelectedItem.Value
        End Get
        Set(ByVal value As Integer)
            _ReviewerID = value
        End Set
    End Property
    Public ReadOnly Property ReviewerName() As String
        Get
            Return Me.RevDropDownList.SelectedItem.Text
        End Get
    End Property
#Region "SQLDS Events"
    Protected Sub TrackItDataSource_Selecting(ByVal sender As ObjectByVal As SqlDataSourceSelectingEventArgs)
        e.Command.Parameters.Item(0).Value = PaperID
    End Sub
#End Region
    Protected Sub rev_Bound(ByVal sender As ObjectByVal As System.EventArgs) Handles RevDropDownList.DataBound
        Dim defaultItem As New ListItem("- Select Reviewer -""-1")
        RevDropDownList.Items.Insert(0, defaultItem)
        output.Text = "test"
        If _ReviewerID <> 0 Then
            RevDropDownList.Items.FindByValue(_ReviewerID).Selected = True
        End If
 
        If isValid() Then
            AddButton.Visible = False
            UpdateButton.Visible = True
            DelButton.Visible = True
        End If
    End Sub
    Public Function isValid() As Boolean
        If RevDropDownList.SelectedIndex = 0 Then
            revValidator.IsValid = False
            Return False
        Else
            Return True
        End If
    End Function
    Protected Sub Page_Load(ByVal sender As ObjectByVal As System.EventArgs) Handles Me.Load
        RevDropDownList.DataBind()
        output.Text = "test"
    End Sub
    Protected Sub AddButton_Click(ByVal sender As ObjectByVal As System.EventArgs) Handles AddButton.Click
        If isValid() Then
            ReviewerID = Me.RevDropDownList.SelectedItem.Value
        End If
    End Sub

Marin Bratanov
Telerik team
 answered on 18 Jun 2012
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?