Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
197 views

Hi,

I have two questions here.

I am using a RADGRID and when ME.LOADComplete event is happening I run a procedure which will filter the RAD Grid - roughly about 200 rows by default from the SQL View, it then goes down to about 20 results. The query takes less than 0 seconds to run on SQL Management studio. It takes about 1-2 seconds to display the page and filter the view.

In a different window, I am returning a view which has about 17,000 rows in it and takes about 4 seconds to run in SQL Management Studio but then it takes about 14 seconds to display and filter the page. It takes about 8 seconds to load without being filtered. Both RADGRIDs has the data source set in the ASPX page but I was wondering is there not a more efficient way to filter it first and then if the user changes the filter, it will apply accordingly? The number of results would be about 400 or so. I was thinking I need to use OnNeedDataSource and filter directly from SQL instead of the programmatically way of
rgCompanyTickets.MasterTableView.FilterExpression = strFilter
rgCompanyTickets.Rebind()

My other issue is that, in the RADGRID I have added a new column so the user can check the box and when the user presses a button on the screen, it displays a  RadWindow which says enter comment and click a button so that it can update the db. The issue I am facing is that when the page gets loaded from the first button click is that it is removing the state the checkboxes are in. So when I press the 2nd button, it doesn't know what rows I have selected before the post back. I believe the reason why it is doing this is due to me using the rebind statement during the filter process.

Do you know guys have any solutions or ideas about this?

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="False" >
        <ItemTemplate>
          <asp:CheckBox ID="CheckBox1" runat="server"
          />
        </ItemTemplate>
        <HeaderTemplate>
          <asp:CheckBox ID="headerChkbox" runat="server"
      />
        </HeaderTemplate>
      </telerik:GridTemplateColumn>



Thanks,
Alex


Princy
Top achievements
Rank 2
 answered on 05 Jun 2014
3 answers
112 views
Hi,
Currently I have a 'add' button on a webform.

When clicked, a RadWindowsManager dialog window is displayed.

Clicking 'save' in that dialog, closes the dialog, adds a record to database table, and uses the client 'RefreshGrid' to update a grid on-screen with that extra record.

This all works fine- thanks to the great Telerik documentation!

However, as the record is added to the bottom of the grid, I would like the client to automatically scroll to the bottom.

I've tried using javascript before and after the '_doPostBack' call in 'refreshGrid', but the browser ignores it.

Do you have any suggestions?

Thanks,
Steve
Princy
Top achievements
Rank 2
 answered on 05 Jun 2014
1 answer
100 views
Hello,

My data source looks like:
RadGrid1.DataSource = TubesLoad;
where TubesLoad is ObservableCollection from my dll(from references).

I know, what i mast handle events RadGrid1_ItemUpdated, RadGrid1_ItemCreated etc. for each action with dataGrid. But i can't find the way to update data in my collection using Telerik.
Can u help me?

Thanks.
Ivan.
Ivan
Top achievements
Rank 1
 answered on 05 Jun 2014
1 answer
498 views
I have try to use CustomValidator with telerik:RadTextBox but it is not fired?

​<telerik:RadTextBox ID="rtbTelefon" MaxLength="50" Width="220px" EmptyMessage="Telefon" ToolTip="Telefon" runat="server" /><telerik:RadTextBox ID="rtbEpost" MaxLength="50" Width="230px" EmptyMessage="E-postadress" ToolTip="E-postadress" runat="server" /> <asp:CustomValidatorid="AtLeastOneContact" ClientValidationFunction="AtLeastOne_ClientValidate"Display="None" ErrorMessage="Telefon <b>eller</b> e-post krävs!"   SetFocusOnError="True"runat="server" />


And in telerik:RadScriptBlock
function AtLeastOne_ClientValidate(source, args) {
    if (document.getElementById("<%= rtbTelefon.ClientID %>").value == "" &&
        document.getElementById("<%= rtbEpost.ClientID %>").value == "") {
        args.IsValid = false;
    }
    else {
        args.IsValid = true;
    }
}


Nothing happand, but if i change to <asp:TextBox it works??
Why does it not work with telerik:RadTextBox?












Shinu
Top achievements
Rank 2
 answered on 05 Jun 2014
1 answer
123 views
I have got the Export settings enabled within my RadGrid, but cannot figure out how to execute or initiate an export of the data that is currently in the Grid.


<telerik:RadGrid ID="RadGrid2" runat="server" AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="OpenAccessLinqDataSource1" Skin="Sunset" CellSpacing="-1" GridLines="Both" AutoGenerateEditColumn="True" AllowFilteringByColumn="True" AllowSorting="True" ShowGroupPanel="True">
<ExportSettings ExportOnlyData="True" FileName="SystemCabCommExport">
<Excel Format="ExcelML" />
</ExportSettings>

How do you go about creating a button or link to execute the enabled Export Settings?
Princy
Top achievements
Rank 2
 answered on 05 Jun 2014
5 answers
254 views
Hi,

The examples I have seen have a button-per-appointment approach. I am interested in exporting all appointments via one button click and preferably, that button is a button that is not integrated into the scheduler, but is a simple .net button elsewhere on the page. Has anyone done this/know if it can be done? Thanks!
SDI
Top achievements
Rank 1
 answered on 05 Jun 2014
1 answer
133 views
Is it possible to get Virtual Scrolling going using ObjectDataSource? I haven't been able to find any good examples except for those on the demo-site (http://demos.telerik.com/aspnet-ajax/dropdownlist/examples/functionality/virtualscrolling/defaultcs.aspx). Unfortunately, the DropDownList doesn't seem to provide the ObjectDataSource with values for "StartIndex" and "ItemsCount" as per the WebService-datasource example.

Below is a simple example, describing the desired scenario. The Facade is in place and works well with other types of solutions, e.g. paging a Grid using an ObjectDataSource.


<asp:ObjectDataSource ID="ODSNotifications" runat="server"
        TypeName="NotificationsFacade"
        SelectMethod="Get"
        OnSelecting="ODSNotifications_Selecting"
        EnablePaging="true"
        SelectCountMethod="GetCount"       
        StartRowIndexParameterName="StartIndex"
        MaximumRowsParameterName="ItemsCount">
        <SelectParameters>
            <asp:Parameter Name="userId" Type="Int32" />
            <asp:Parameter Name="fromDate" Type="DateTime" />
        </SelectParameters>
    </asp:ObjectDataSource>
 
    <telerik:RadDropDownList ID="RDDLNotifications" runat="server"
        DataSourceID="ODSNotifications"
        CssClass="RDDLNotifications"
        DataValueField="Title"
        DataTextField="Id"
        OnItemDataBound="RDDLNotifications_ItemDataBound"
        DropDownWidth="200px"
        DropDownHeight="100px"
        EnableVirtualScrolling="true">
        <ItemTemplate>
            <asp:Panel ID="PNotification" runat="server" CssClass="w_n_outer" onclick="StopPropagation(event);">
                <div class="w_n_inner">
                    <asp:Label ID="LType" runat="server" Font-Size="0.8em" />
                    <br />
                    <asp:Label ID="LTitle" runat="server" Font-Bold="true" />
                    <br />
                    <asp:Label ID="LBody" runat="server" />
                </div>
            </asp:Panel>           
        </ItemTemplate>
    </telerik:RadDropDownList>

Any help would be greatly appreciated!


Nencho
Telerik team
 answered on 04 Jun 2014
2 answers
288 views
I set the background color of the RadToolTip but it doesn't work.

Why is it there?

Also, how do you format the text and title?

Thanks.
Raymond
Top achievements
Rank 1
 answered on 04 Jun 2014
3 answers
97 views
Have an AsyncUpload control with MultipleFileSelection set to Automatic.  User can upload multiple images which are previewed in a listview and user can remove or reorder the images before final save.

Seems the AsyncUpload control uploads the files in alphabetic order as oppose to the order that the user has clicked.
Is there any setting or way to make the upload of the files in the order that the user has clicked using Ctrl Mouse Click?

Thanks

Glenn

Hristo Valyavicharski
Telerik team
 answered on 04 Jun 2014
3 answers
269 views
I am looking for a solution that will allow me to click a button or a hyperlink within a row and open a folder on our network.  The location to be opened is stored in the record source for that grid.

I have tried a couple of things, both of which failed.  Granted, the solution I have are either my own creation or a hybrid of my code and assistance from the forums.


FAILED SOLUTION #1
This column contains a button that opens the folder.  This does work locally, but does not work when published to our web folder.
<telerik:GridButtonColumn FilterControlAltText="Filter Files column" CommandName="ShowFiles"  UniqueName="Files" ButtonType="PushButton" HeaderText="Files" Exportable="False" Text="Display">
</telerik:GridButtonColumn>

Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    Dim value As String
 
    If e.CommandName = "ShowFiles" Then
        Dim dataItm As GridDataItem = TryCast(e.Item, GridDataItem)
 
        value = dataItm("Location").Text & "\03 Submitted\"
  
        Process.Start("explorer.exe", value)
  
    End If
 
End Sub


FAILED SOLUTION #2
This does nothing but reload the page. 
<telerik:GridTemplateColumn UniqueName="LinkColumn">
    <ItemTemplate>
        <asp:LinkButton runat="server" ID="LinkButton1" CommandName="ShowFiles"></asp:LinkButton>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Private Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = TryCast(e.Item, GridDataItem)
        Dim row As DataRow = TryCast(item.DataItem, DataRowView).Row
        Dim linkButton As LinkButton = TryCast(item("Location").FindControl("LinkButton1"), LinkButton)
        linkButton.Text = "Location"
        linkButton.PostBackUrl = "#"
    End If
 
End Sub

  
Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    Dim value As String
 
    If e.CommandName = "ShowFiles" Then
 
        Dim linkButton As LinkButton = TryCast(e.CommandSource, LinkButton)
        Dim dataItm As GridDataItem = TryCast(e.Item, GridDataItem)
        value = dataItm("Location").Text & "\03 Submitted\"
 
        Process.Start("explorer.exe", value)
 
    End If
 
End Sub
Rick
Top achievements
Rank 1
 answered on 04 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?