Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
83 views
Hi guys I have a radgrid with AllowPostBackOnFilter = true and a FilterDelay=250, this works good if I type something  in the filter textbox, but if I erase the text I have to hit enter to make the postback, is this a normal behavior? How can I do an automaticpostback after I erase the text?
Please hope you could help me.
Iana Tsolova
Telerik team
 answered on 16 Aug 2011
6 answers
339 views
I have a RadGrid that populates its data via a Subprocedure, which calls a SQL Stored Procedure to bind the data.

Private Sub PopulateMyData()
    ' initialize variables
    Dim sqlConn As New SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings("SQLConn2010").ToString)
    Dim sqlCmd As New SqlCommand("", sqlConn)
 
    ' open sql connection
    sqlConn.Open()
 
    With sqlCmd
        .CommandType = CommandType.StoredProcedure
 
        If ThisVariable.Length > 0 Then
            ' passed array search
            .CommandText = "prRunThisProcedure"
            .Parameters.AddWithValue("@VariableList", ThisVariable)
        Else
            ' standard search
            .CommandText = "prRunThatProcedureInstead"
            .Parameters.AddWithValue("@someVariable", NullString(SomeParameter))
            .Parameters.AddWithValue("@anotherVariable", NullString(AnotherParameter))
        End If
    End With
 
    ' execute query and read into sql data adapter
    Dim daTestObject As New SqlDataAdapter(sqlCmd)
 
    ' fill datatable with results from sql adapter
    Dim dtTestObject As New DataTable()
    dtTestObject.Columns.Add("Name", Type.GetType("System.String"))
    dtTestObject.Columns.Add("ReportInfoID", Type.GetType("System.String"))
    daTestObject.Fill(dtTestObject)
 
    ' retrieve rowcount
    Dim RowCount As Integer = dtTestObject.Rows.Count
 
    ' set datasource and bind if records were returned from stored procedure
    If (RowCount > 0) Then
        ' bind datasource
        rgTestGrid.DataSource = dtTestObject
        rgTestGrid.DataBind()
    End If
End Sub

I want to enable paging on this RadGrid but for some reason as soon as I attempt to move to the next page it seems to post back and do nothing.

<telerik:RadGrid ID="rgTestGrid" runat="server" GridLines="None" Width="700px" AllowPaging="true" PageSize="25" EnableViewState="true">
  <MasterTableView Caption="This is the data" CommandItemDisplay="Top" CommandItemSettings-ShowAddNewRecordButton="false" DataKeyNames="ReportInfoID" AllowPaging="true" NoDetailRecordsText="Nothing Found.">
    <PagerStyle Mode="NumericPages"  />
    <CommandItemSettings ShowExportToExcelButton="true" ShowExportToPdfButton="true" />                       
    <Columns>
    <telerik:GridTemplateColumn>
        <ItemTemplate>
        <asp:Label ID="lblRowCount" runat="server" Width="30px" />
        </ItemTemplate>
        <HeaderStyle Width="30px" />
    </telerik:GridTemplateColumn>
    <telerik:GridButtonColumn UniqueName="ReportURL" DataTextField="Name" CommandName="Select"></telerik:GridButtonColumn>
    </Columns>                         
  </MasterTableView>                           
</telerik:RadGrid>

If I return to my initial search page and essentially force it to rerun the Sub that calls the SQL Stored Proc (which forces a databind) then I can see it has the correct page selected, but this is not practical at all.

I was under the impression the Radgrid could query the data only once and then preserve the information in the RadGrid for use in offline paging?

I do not want to rebind the data each time they page through the Data-set since it never changes (it is statistical data nothing is input), and I do not understand from the examples I've read why I need to specify the paging information using the NeedDataSource since the data never changes, and I do not want it requerying the database (It already has grabbed all the records once on the initial page-load)

I am not defining a DataSource in the markup since I am doing that programmatically during the Subprocedure that references the SQL Stored Procedure (Which takes many parameters that need to be altered before used as parameters, hence why I have a Subprocedure to populate the initial Grid)

I have stripped out some of my excess code and tried  to put some illustration above in case it helps.  I would basically like this to function all client side so after the server intiially populates the RadGrid (which works fine), that further paging requests will simply page through that populated RadGrid and not require a post-back or rebind.

Hopefully there is something I am missing here that can be explained.

Thanks in advance
Tsvetina
Telerik team
 answered on 16 Aug 2011
1 answer
148 views
Hi guys I'm dealing with this problem i have a radgrid with allow postbackonfilter ="true" and a filterdelay  everything works fine if I type something in every textboxt a postback occurs and the grid is filtered, but when I erase the text of the textbox I have to hit enter to rebind the grid.
Is it possible to have the same behavior for both cases when typing and erasing text?, I mean, after erasing the text return the grid to it's normal state.
Here's the code of my grid:
<telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False"  
                                GridLines="None" Skin="Sunset" onitemdatabound="RadGrid2_ItemDataBound" 
                                AllowPaging="True" AllowSorting="True" onitemcommand="RadGrid2_ItemCommand" 
                                onpageindexchanged="RadGrid2_PageIndexChanged" 
                                onselectedindexchanged="RadGrid2_SelectedIndexChanged" 
                                AllowFilteringByColumn="True" onneeddatasource="RadGrid2_NeedDataSource" 
                                EnableLinqExpressions="False" Culture="es-MX" 
                                onitemcreated="RadGrid2_ItemCreated" >
                                <GroupingSettings CaseSensitive="False" />
                                <ClientSettings EnablePostBackOnRowClick="True">
                                    <Selecting AllowRowSelect="True" />
                                </ClientSettings>
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
  
<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
        <telerik:GridBoundColumn DataField="fiCircuito" HeaderText="Circuito" 
            UniqueName="columnCirc"  AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500" 
  
  
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_edo" HeaderText="Estado" 
            UniqueName="columnEdo" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_cd" HeaderText="Ciudad" 
            UniqueName="columnCd" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="fiIdSolicitud" HeaderText="Folio" 
            UniqueName="columnFolio"  AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="250" >
            <HeaderStyle HorizontalAlign="Center"  />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_padre" 
            HeaderText="Nombre Madre/Padre" UniqueName="columnPadre" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="nom_menor" HeaderText="Nombre del Menor" 
            UniqueName="column1" AutoPostBackOnFilter="true" ShowFilterIcon="false" FilterDelay="500">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn 
            UniqueName="columnIdM" DataField="fiIdMenor" Visible="False">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn HeaderText="Fecha" UniqueName="column4" 
            DataField="fech_baja" AllowFiltering="false">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ind_baja" HeaderText="Estatus Empleado" 
            UniqueName="columnEstatus" AllowFiltering="false">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridBoundColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" HeaderText="Avisos" 
            UniqueName="column2"  ImageUrl= "~/imgs/new-message-icon.png" 
            CommandName="Avisos">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridButtonColumn>
        <telerik:GridButtonColumn ButtonType="ImageButton" 
            HeaderText="Actualiza Estado" UniqueName="column3" 
            ImageUrl="~/imgs/refresh_document-icon.gif" CommandName="Actualiza">
            <HeaderStyle HorizontalAlign="Center" />
        </telerik:GridButtonColumn>
         <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center" 
                                            HeaderText="Estatus"  DataField="fcDescEdoSol"  
                                            UniqueName="fcDescEdoSol" Visible="False">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        </telerik:GridBoundColumn>
  
                                          <telerik:GridBoundColumn HeaderText="Adscripción Actual" 
            UniqueName="columnAdscAct" DataField="area_Nueva" Visible="false">
            <HeaderStyle HorizontalAlign="Center"  />
        </telerik:GridBoundColumn>
  
         <telerik:GridBoundColumn HeaderStyle-HorizontalAlign="Center"  
                                            HeaderText="Expediente "  DataField="fiExpEmpleado"  
                                            UniqueName="EXPEDIENTE" Visible="False">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        </telerik:GridBoundColumn>
         
    </Columns>
</MasterTableView>
                            </telerik:RadGrid>
 
Iana Tsolova
Telerik team
 answered on 16 Aug 2011
1 answer
529 views

Afternoon folks.

I am using a radgrid as this has lots of functionality that I wish to keep (exporting, line selection, scrolling, etc) but I have come across a request I'm not sure how to handle and as such, I'd like some advice!

I have a radgrid attached to an object datasource implementing a SelectMethod of GetProductList and a SelectCountMethod of CountProductItems.This would return something along the lines of:

enter image description here

With CountProductItems returning 9.

What I need to do with this is dynamically set the radgrid so that the paging is defined by the guid i.e. one page for each guid present.

So in the above example, we'd have 3 pages.

On page load you'd be shown Page 1:

enter image description here

With the pager items displaying 1, 2, 3.

Click on page 2 and you'd see:

enter image description here

and clicking on page 3:

enter image description here

Does that makes sense? Is it possible and if so, any pointers greatly appreciated.

Iana Tsolova
Telerik team
 answered on 16 Aug 2011
2 answers
106 views
I am trying to setup a hierarchical grid where the master data is summary contact data and the detail is a tabstrip containing one tab for detailed contact information and the other tab containing a grid for the order information.  To me this seems like a very straightforward use for the tabstrip control inside a nestedviewtemplate.  I want to be able to handle all of the databinding in the code-behind, but I can't seem to figure out how to bind the inner-grid to the appropriate datasource.  All of my datasources are retrieved with calls to classes that return datasets.  

Is there an example that I can look at that works this way?  The ones I've found online seem to do the binding to the asp:sqldatasource control, which doesn't work in my scenario.

This is pretty much the structure of what I want to accomplish:

(Master)
   Contact Summary
     (Detail)
   Tab 1
         Contact Detail (just bound asp fields)
     Tab 2
          Order Details (in a grid)
Maria Ilieva
Telerik team
 answered on 16 Aug 2011
7 answers
157 views
Can anyone help with this???

I am using DNN 5.6.3. There is a Telerik editor that is included with DNN. However, in safari (Imac pc) I am experiencing huge editing problems. Although thats not been the case until yesterday!

The editor is inserting code where it should not. It will not recognise text, colour and font changes.

It is resizing text and even not making any changes at all on some occasions.

If you write a line of text it does it correct. Insert a link and it changes either the link or the preceding text or all of it! A real NIGHTMARE!!!!!! 4 hours of messing to alter a few lines of text!!!!! that should have taken about 1 minute!!!

Here are some code snippets to look at taken from within the editor after dozens of attempts to put 2 lines of text on a page with the second line being a page link.

2 lines of text.. appears normal....:- 

Submit your business<br />
<br />
Submit your business

2nd line of text now has a link inserted

Submit your business<br />
<br />

it has now changed the font size of the link and the font type on the page (Text shows blue in the editor..css i expect..

<div style="text-align: justify;"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: medium; color: #000000;">Submit your business</span></div>
<div style="text-align: justify;"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: 16px; color: #000000;"><br />
</span></div>
<div style="text-align: justify;"><a href="/iConnectDirectory/Submityourbusiness.aspx"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: medium; color: #000000;"></span></a><a href="/iConnectDirectory/Submityourbusiness.aspx">Submit your business</a><br />
</div>

this is with 'full justification set'...

on the page the linked text is now 12pt arail..... not the 16pr its supposed to be

further attempts at editin:- now it wont let me change the font or the size of the linked text

however the text is now the blue colour i want it to be..

As you can see from the above it is all a bit of a mess!!!!! Some help would really be appreciated!!

We did manage to get this to work by editing on a windows machine in IE. However the editor is unusable sometimes in IE too!!
Pat
Top achievements
Rank 1
 answered on 16 Aug 2011
1 answer
99 views
per the docs I should be able to place html markup in the ItemTemplate. I am trying to create a couple of div tags. One float left, the other floats right. Inside the ItemTemplate they are placed next to each other. When I copy the code outside of the template the divs works fine. What simple thing am I missing?



 

 

 

 

<%

 

 

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!

 

 

 

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

 

 

 

 

 

html xmlns="http://www.w3.org/1999/xhtml">

<

 

 

 

 

 

head runat="server">

 

 

<title></title>

 

 

<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />

 

 

<style type="text/css">

 

 

div.wrapper {

 

 

width:100%;

}

 

 

div.left_column {

 

 

width:150px;

 

 

float:left;

 

 

text-align:center;

 

 

vertical-align:middle;

}

 

 

div.right_column {

 

 

width:150px;

 

 

float:right;

 

 

text-align:center;

 

 

vertical-align:middle;

}

 

 

</style>

</

 

 

 

 

 

head>

<

 

 

 

 

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

<Scripts>

<%

 

 

--Needed for JavaScript IntelliSense in VS2010--%>

<%

 

 

--For VS2008 replace RadScriptManager with ScriptManager--%>

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />

 

 

</Scripts>

 

 

</telerik:RadScriptManager>

 

 

<script type="text/javascript">

 

 

//Put your JavaScript code here.

 

 

</script>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

</telerik:RadAjaxManager>

 

 

<div>

<%

 

 

-- does not work --%>

 

 

<telerik:RadToolBar runat="server" ID="RadToolBar1" Width="100%">

 

 

<Items>

 

 

<telerik:RadToolBarButton>

 

 

<ItemTemplate>

 

 

<div class="wrapper">

 

 

<div class="left_column">

left Collumn

 

 

</div>

 

 

<div class="right_column">

right Collumn

 

 

</div>

 

 

</div>

 

 

</ItemTemplate>

 

 

</telerik:RadToolBarButton>

 

 

</Items>

 

 

</telerik:RadToolBar>

 

 

<br />

<%

 

 

-- works fine --%>

 

 

<div class="wrapper">

 

 

<div class="left_column">

left Collumn

 

 

</div>

 

 

<div class="right_column">

right Collumn

 

 

</div>

 

 

</div>

 

 

</div>

 

 

</form>

</

 

 

 

 

 

body>

</

 

 

 

 

 

html>

 

 

Kate
Telerik team
 answered on 16 Aug 2011
1 answer
27 views
I have a radpane, following by a splitter, then another radpane.

In the first radpane, I put a splitter that expands in the bottom direction.  The probem is, when it expands, a scrollbar appears.

What I want instead is for either the slider to expand OVER the splitter/radpane below it, or for the radpane window to expand the size of the slider.

Is this possible? If so, how?
Niko
Telerik team
 answered on 16 Aug 2011
1 answer
112 views
My slider icon is left aligned inside my radpane (horizontal, and it opens to the bottom).

How can I right align the icon that opens that when clicked expands the slider?
Niko
Telerik team
 answered on 16 Aug 2011
10 answers
123 views
Hi Telerik Team,

I am facing this problem. I always want to keep exactly pagesize value which user has entered before but i can't find any solution. RadGrid always set the total number of rows for page size textbox if the pagesize user has entered is larger than the total number of rows.

Please help me any solution to resolve it.

Thanks!
Pavlina
Telerik team
 answered on 16 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?