Radgrid SelectedItem always 0

10 posts, 0 answers
  1. Leon
    Leon avatar
    35 posts
    Member since:
    Dec 2007

    Posted 17 Apr 2008 Link to this post

    Hi, I have upgraded from Q3 promothues to Q1 2008 Ajax
    same code, but doesn't work anymore
    here is the aspx

    <telerik:RadGrid ID="AListingsGrid" runat="server"   
              AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"   
              AutoGenerateColumns="False" GridLines="None" Height="515px" PageSize="300"   
              Skin="Vista">  
    <MasterTableView> 
    <RowIndicatorColumn Visible="False">  
    <HeaderStyle Width="20px"></HeaderStyle> 
    </RowIndicatorColumn> 
     
    <ExpandCollapseColumn Visible="False" Resizable="False">  
    <HeaderStyle Width="20px"></HeaderStyle> 
    </ExpandCollapseColumn> 
     
        <Columns> 
            <telerik:GridBoundColumn DataField="Href_No" HeaderText="Ref"   
                UniqueName="column">  
            </telerik:GridBoundColumn> 
        </Columns> 
     
    <EditFormSettings> 
    <PopUpSettings ScrollBars="None"></PopUpSettings> 
    </EditFormSettings> 
    </MasterTableView> 
              <ClientSettings> 
                  <Selecting AllowRowSelect="True" /> 
                  <Scrolling AllowScroll="True" UseStaticHeaders="True" /> 
              </ClientSettings> 
          </telerik:RadGrid> 
    <telerik:RadAjaxLoadingPanel ID="PnlLoading" Runat="server"   
            height="75px" width="75px">  
            <img alt="Loading..."   
                src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>'   
                style="border:0px;" /> 
          </telerik:RadAjaxLoadingPanel> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
         <telerik:AjaxSetting AjaxControlID = "AListingsGrid">  
          <UpdatedControls> 
           <telerik:AjaxUpdatedControl ControlID ="AListingsGrid" LoadingPanelID="PnlLoading" /> 
          </UpdatedControls> 
         </telerik:AjaxSetting>       
         <telerik:AjaxSetting AjaxControlID = "btnFilter">  
          <UpdatedControls> 
           <telerik:AjaxUpdatedControl ControlID ="AListingsGrid" LoadingPanelID="PnlLoading" /> 
          </UpdatedControls> 
         </telerik:AjaxSetting>       
        </AjaxSettings> 
        </telerik:RadAjaxManager> 


    after some data pouplated, and select some rows and call

    Debug.Print(AListingsGrid.SelectedItems.Count)
    the AListingsGrid.SelectedItems.Count is always 0

    what's wrong?

  2. Leon
    Leon avatar
    35 posts
    Member since:
    Dec 2007

    Posted 17 Apr 2008 Link to this post

    Sorry, suddenly it works again....
    i have no idea what's going on out there
    :(
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 19 Jun 2008 Link to this post

    I'm having this problem.  No matter what I do, the grid.selecteditems.count = 0

  5. t
    t avatar
    21 posts
    Member since:
    Mar 2008

    Posted 07 Jul 2008 Link to this post

    I have the same problem after updating to the new version.

    Which changes have to be made to get this working again?
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 07 Jul 2008 Link to this post

    Hello guys,

    Do you use advanced binding through the NeedDataSource event or data source control as shown in these demos:

    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/NeedDataSource/DefaultCS.aspx
    http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/DataEditing/AllEditableColumns/DefaultCS.aspx

    This should ensure that the SelectedItems collection will reflect the client/server selection made by the end user. Also verify that the viewstate for the grid is enabled.

    Regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. t
    t avatar
    21 posts
    Member since:
    Mar 2008

    Posted 07 Jul 2008 Link to this post

    I use the NeedDataSource Event and Viewstate ist also enabled.

    But it still doesn't work.

    SelectedItems are always 0
  8. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 07 Jul 2008 Link to this post

    Hi t,

    Can you isoalate a stripped working version of your project, illustrating the issue, and send it attached to a formal support ticket? I will test it locally and will advice you further.

    Regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Marco
    Marco avatar
    5 posts
    Member since:
    Jul 2010

    Posted 10 Mar 2011 Link to this post

    Was there a solution found for this?  I have the same problem.
  10. asimptota
    asimptota avatar
    50 posts
    Member since:
    Apr 2011

    Posted 30 Apr 2011 Link to this post

    I have the same problem. But the funny thing is that I;ve made sample project to try to isolate problem and it works as it should even though the markup and code are same :D funny
    Any help?
  11. Minh
    Minh avatar
    1 posts
    Member since:
    Feb 2014

    Posted 31 Aug 2015 Link to this post

    I came across this issue while working on custom widget template in Sitefinity.

    It turn out that the custom page, which I created and added the template in, had ViewState set to false. So even the Grid has ViewState set to true, it did not work.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017