Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
102 views

Resource Value returns null in RAD Scheduler Data bound Event and appointment also not created (For Some Particular Data Row). i have attached the data source screenshot and Scheduler screen. Please help me resolve this problem.

arun
Top achievements
Rank 1
 asked on 03 Oct 2017
0 answers
188 views

Hello,

We've got what is basically a single page web application which uses tabs.  There is a Main.aspx page which has a RadTabStrip and a RadMultiPage on it and then, depending on things that a user does in the application, we open up new tabs and place web user controls (.ascx) inside of a new tab and multi-page.  Users can switch between tab pages and also close tabs as part of normal application use.  The RadTabStrip and RadMultiPage are set up with a RadAjaxManager on the Main.aspx page to be Ajax triggers and updated controls.  We also use RadAjaxManagerProxy in some of the ascx pages to control some Ajax postbacks in the ascx pages. 

 

One one of the ascx pages which appears in a tab/multi-page, we've got a RadGrid which has an edit form template defined with a RadAsyncUpload control inside of it.  I've set up a Postback Trigger so that only the insert/update button of the edit form template will cause the RadAsyncUpload to save to the uploaded item to the target directory.  This works fine as long as I stay on the same tab/multi-page.  When I switch tabs to another tab/multi-page, the RadAjaxManager triggers an Ajax postback but the FileUploaded event does not fire server side (which is what I expect).  When I switch back to the tab/multi-page with the RadAsyncUpload control on it, the RadAsyncUpload control has lost track of the file and, when I post back with the insert/update button, the RadAsyncUpload control doesn't have a file; the client side state is lost.  The temporary file is still in the temporary location but the control doesn't know anything about it so it never gets processed server side.

 

Is there any way to preserve the state of the RadAsyncUpload across tab/multi-page switches?

John
Top achievements
Rank 1
 asked on 03 Oct 2017
5 answers
173 views
I'm looking for a way to add to the RecurrenceDay mask dynamically. I see that the Silverlight and WPF have AddDay functionality but I'm not having any luck finding it for the ASP.NET AJAX implementation.

My goal is to loop through multiple weekdays defined in a database and add them to the WeeklyRecurrenceRule DayOfWeekMask when creating a new appointment in the RadScheduler.

Thanks!
Doug
Top achievements
Rank 1
 answered on 02 Oct 2017
1 answer
131 views

I have an unusual situation I have a rad grid set with AllowSorting=True.  On my columns I have set the SortExpression to equal the column UniqueName.  When viewing the results I see my records, but when I click on a column header to sort the data, the entire radGrid disappears.  It looks as if the radgrid is no longer bound to the data.  I am also having this same issue when I click on the edit images for a row.

Any Idea why This is happening?

Perry
Top achievements
Rank 1
 answered on 02 Oct 2017
0 answers
90 views

I am referring to the following link http://docs.telerik.com/devtools/aspnet-ajax/controls/radcompression

I have gone over all topics online, all tutorials, all recommendations and they are all pointing at how the "browser" file in the app_browser should be included and how the web.config file should be altered etc..

The article clearly states that the reduction will be between 40% to 60% or more depending on different factors. So, in order to clearly test the impact, i created an empty ASP.Net web forms application, added a masterpage and a content page with nothing but a RadScriptManager, RadGrid and Radeditor to just test how the viewstate is initially and then how applying the above will affect it.

The results were the following: Initially, the viewstate size was 9000 bytes without adding anything or any compressions, after applying the above (unless the documentation changed), the bytes have increased to 9100! not even decreased!

So, i am currently lost and i need to badly shrink the viewstate as much as possible to save on the bandwidth and performance.

I am using UI for ASP.NET AJAX Q2 2016, not sure if that affects the Radcompression module or not. Your assistance with this is highly appreciated (a sample project/configuration would go a long way)

Omar
Top achievements
Rank 2
 asked on 02 Oct 2017
4 answers
540 views

I use RadGrid a lot, so this one is mystifying me.

I have a RadGrid with a GridTemplateColumn which contains a button.  The first time I click on the button I get a postback, but the ItemCommand handler is not triggered.  However, if I click the button a second time the ItemCommand handler does get executed (which redirects to a new page so I don't get a third chance to try clicking the button).

The only thing unusual about this RadGrid is that the columns are dynamically created. 

Here is the RadGrid Markup

<telerik:RadGrid ID="dgDevices" runat="server" ShowGroupPanel="False" AllowPaging="true"
          ItemStyle-BackColor="#ffe394" BackColor="White" Visible="true" Height="200" PageSize="25"           
          Skin="Office2010Black" AllowSorting="false" AutoGenerateColumns="false" BorderWidth="0px"
          Width="1000" AllowCustomPaging="False"  OnNeedDataSource="dgDevices_NeedDataSource" OnItemCommand="dgDevices_ItemCommand">
 
          <AlternatingItemStyle BackColor="White" />
          <ExportSettings ExportOnlyData="True" IgnorePaging="true" OpenInNewWindow="true"
              HideStructureColumns="true">
          </ExportSettings>
          <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" AllowGroupExpandCollapse="True"
              ReorderColumnsOnClient="True" AllowDragToGroup="False">
              <Scrolling AllowScroll="False" UseStaticHeaders="True" />
              <Resizing AllowColumnResize="true" AllowRowResize="true" />
          </ClientSettings>
          <GroupingSettings ShowUnGroupButton="False" />
          <PagerStyle AlwaysVisible="true" Position="TopAndBottom" />
           
          <MasterTableView TableLayout="Fixed" CommandItemDisplay="Top"   UseAllDataFields="true"  >
              <NoRecordsTemplate><br />No assets matched this search.<br /><br /></NoRecordsTemplate>
              <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                  ShowExportToCsvButton="false" ShowExportToPdfButton="false" ShowAddNewRecordButton="false" />
              <Columns>
                  <telerik:GridTemplateColumn HeaderText="View" ItemStyle-HorizontalAlign="Center" >
                      <ItemTemplate >
                          <asp:ImageButton ID="ibtnView" runat="server" CommandName="View" ImageUrl="images/1258747021_old-edit-find.png" ToolTip="Drill down to view more detail"  />
                      </ItemTemplate>
                  </telerik:GridTemplateColumn>
                  <telerik:GridBoundColumn DataField="pct" HeaderText="% of Total" UniqueName="pct" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:p}"   />         
                  <telerik:GridBoundColumn DataField="cnt" HeaderText="Device Count" UniqueName="cnt" ItemStyle-HorizontalAlign="Right"   DataFormatString="{0:###,###,###}"  />
           
              </Columns>
          </MasterTableView>
      </telerik:RadGrid>

I don't think the ItemCommand code is useful here since when it is called, it works. 

Here is the code that creates the columns:

Sub BindColumns()
     
    dgDevices.Columns.Clear()
     
    Dim btncol As GridButtonColumn = New GridButtonColumn
    btncol.ButtonType = ButtonColumnType.LinkButton
    btncol.HeaderText = "View"
    btncol.CommandName = "View"
    btncol.Text = "<IMG src=""images/1258747021_old-edit-find.png"" border=0 /> "
    btncol.ItemStyle.HorizontalAlign = HorizontalAlign.Center
    dgDevices.Columns.Add(btncol)
     
    Dim bc As GridBoundColumn
     
    bc = New GridBoundColumn()
    bc.HeaderText = "Count"
    bc.SortExpression = "cnt"
    bc.DataField = "cnt"
    dgDevices.Columns.Add(bc)
 
    bc = New GridBoundColumn()
    bc.HeaderText = "Percent"
    bc.DataField = "pct"
    bc.DataFormatString = "{0:p}"
    dgDevices.Columns.Add(bc)
     
    Dim I As Integer
    For I = 0 To cblColumns.Items.Count - 1
        If cblColumns.Items(I).Selected Then
            Dim Value As String = cblColumns.Items(I).Value
            bc = New GridBoundColumn()
            bc.HeaderText = cblColumns.Items(I).Text
            bc.SortExpression = cblColumns.Items(I).Value
            bc.DataField = Value
            dgDevices.Columns.Add(bc)
        End If
    Next
End Sub

Here is the code that binds the data to the RadGrid - and it calls the above subroutine to add the columns

Sub BindDevices()
    Dim myConnection As SqlConnection = New SqlConnection(AppSettings.Get("connAccess2"))
    Dim dt As DataTable
    Dim myCommand As SqlDataAdapter
    Dim mySelectString As String
         
    mySelectString = " select * FROM ... "
        
    myCommand = New SqlDataAdapter(mySelectString, myConnection)
 
    dt = New DataTable()
 
    myCommand.Fill(dt)
  
    BindColumns()  'dynamically add the columns selected in the check box list
 
    dgDevices.DataSource = dt.DefaultView
        
End Sub

Thanks for any help.











Robert
Top achievements
Rank 1
 answered on 02 Oct 2017
4 answers
220 views

Legend order is reversed for some reason (see attached)

Any suggestions

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 02 Oct 2017
0 answers
37 views

Hi,

 

Is it possible to drag filenames from a fileexplorer to preferably a grid, or a treeview?

If so, can anyone guide me how to?

 

Kind regards

Andreas

Andreas
Top achievements
Rank 1
 asked on 02 Oct 2017
4 answers
237 views

I'm getting some very odd behavior on my radgrid when I call resizetofit after settings columns Display=false from the code behind. A lot of white space is left on the first call and on subsequent calls the grid continues to shrink and be set to more readable dimensions. The grid is very large (105 columns) and I'm using a checkbox list to allow users to select which columns they want visible which removes excess columns using radGrid.MasterTableView.Columns[i].Display = false; Currently I'm resolving the issue by wrapping the script called afterwards in a loop so it runs 3 times, but it continues to shrink long after even 3 calls. Depending on how many rows are removed it continues to shrink (at a reducing rate) up to 8 calls afterwards. Javascript and grid markup below:

<script>
            function resize() {
                var grid = $find("<%= gridAgents.ClientID %>");
                var columns = grid.get_masterTableView().get_columns();
                for (var i = 0; i < columns.length; i++) {
                    columns[i].resizeToFit();
                }
            }
</script>
 
<telerik:RadGrid ID="gridAgents" runat="server" AllowPaging="True" AllowSorting="True"
                    OnNeedDataSource="gridAgents_NeedDataSource" ShowGroupPanel="True"
                    OnEditCommand="gridAgents_EditCommand" OnUpdateCommand="gridAgents_UpdateCommand"
                    OnDeleteCommand="gridAgents_DeleteCommand" OnCancelCommand="gridAgents_CancelCommand"  
                           OnInsertCommand="gridAgents_InsertCommand" OnItemUpdated="gridAgents_ItemUpdated"
                    OnItemDeleted="gridAgents_ItemDeleted" OnItemInserted="gridAgents_ItemInserted"
                    AutoGenerateColumns="false">
                    <HeaderStyle BorderColor="LightGray" BorderWidth="1px" />
                    <GroupingSettings CollapseAllTooltip="Collapse all groups" />
                    <ClientSettings AllowDragToGroup="True">
                        <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />
                    </ClientSettings>
                    <MasterTableView AutoGenerateColumns="False" CommandItemDisplay="Top">
                        <Columns>
                            <telerik:GridEditCommandColumn>
                            </telerik:GridEditCommandColumn>
                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Delete"                                                                       UniqueName="DeleteColumn" ConfirmText="Delete record?">
                            </telerik:GridButtonColumn>
                                      //103 Bound/Template columns
                        </Columns>
                    </MasterTableView>
</telerik:RadGrid>
Eyup
Telerik team
 answered on 02 Oct 2017
1 answer
93 views

Hi,

I have a web application which uses many RadGrid controllers on a single page. Is there any possibility to has a set of class to handle RadGrid properties? So that all RadGrid will able to inherit the properties and much easier for me do any changes to all RadGrid when needed.

Thanks.

Eyup
Telerik team
 answered on 02 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?