Selecting "rows" in new datalist/repeater grid method

9 posts, 0 answers
  1. Zyguy
    Zyguy avatar
    23 posts
    Member since:
    Jan 2008

    Posted 27 Jan 2009 Link to this post

    Finally glad to see a datalist-type solution for the Radgrid at http://demos.telerik.com/aspnet-ajax/Grid/Examples/Programming/ListView/DefaultCS.aspx.

    I would like to retain the multi-row select method that is available in a standard radgrid - how can I implement a GridClientSelectColumn and Rowclicking in this new datalist format?

    Thanks
  2. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 30 Jan 2009 Link to this post

    Hello Zyguy,

    Unfortunately this is not possible when using DataList view for the grid since the entire layout is wrapped inside a single grid item template container. If you want to simulate selection on a per-row-basis, you will need to apply your custom code logic which to produce the desired effect.

    Kind regards,
    Sebastian
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Scott
    Scott avatar
    45 posts
    Member since:
    Apr 2008

    Posted 25 May 2009 Link to this post

    I'm not sure if I have similar issue. I am using the datalist in http://demos.telerik.com/aspnet-ajax/Grid/Examples/Programming/ListView/DefaultCS.aspx.  I don't need to select a "row", but I have a check box in each one of my "boxes" (records) as displayed in the sample above. How can I loop through this and get the datakey for each record that was checked? Code is below.

    On other note, for whatever reason, I can't get the paging to work with the code below as well.


    <telerik:RadGrid ID="grdItems"  AutoGenerateColumns="true" ShowHeader="false"  BorderWidth="0" ShowStatusBar="false" CellPadding="0" CellSpacing="0" 
        runat="server" GridLines="None" AllowPaging="true"    
        PageSize="2">  
        <PagerStyle Mode="NextPrevAndNumeric" /> 
        <MasterTableView TableLayout="Fixed" DataKeyNames="mem_id">  
            <ItemTemplate> 
                <%# (((GridItem)Container).ItemIndex != 0)? "</td></tr></table>" : "" %> 
                <asp:Panel ID="ItemContainer" CssClass='<%# (((GridItem)Container).ItemType == GridItemType.Item)? "item" : "alternatingItem" %>' 
                    runat="server">  
                    <span style="vertical-align:top"><asp:CheckBox runat="server" ID="chkSelect" /></span>  
                    <%#Eval("mem_name_first").ToString() + " " + Eval("mem_name_last").ToString()%> 
                    <%#Eval("mem_id").ToString()%>                  
                </asp:Panel> 
            </ItemTemplate> 
        </MasterTableView> 
          
        <GroupingSettings CaseSensitive="false" /> 
    </telerik:RadGrid> 
  5. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 28 May 2009 Link to this post

    Hello Scott,

    For your convenience I prepared a simple demo which illustrates how to extract the data from each individual element inside the global item template of RadGrid (when used in DataList-like mode) on the client, pass it to the server and read it there. You will find the example attached to this forum thread.

    The same approach can be used to determine the checked state of an asp CheckBox on the client and pass the information to the server (if needed).

    Best regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  6. Scott
    Scott avatar
    45 posts
    Member since:
    Apr 2008

    Posted 02 Jun 2009 Link to this post

    I don't think this solves my issue.  I don't need to retrieve on row by row. 

    Here's an example: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/webmailgrid/defaultcs.aspx 
    If I want that example to be in a datalist view, click on a few records and click on Delete button, how do I retrieve the items that were checked on the server side?
  7. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 03 Jun 2009 Link to this post

    Hello Scott,

    Unfortunately this type of functionality is not supported due to the reason explained in my first reply in this forum thread. I hope this is not a show stopper for you. You will need to use the grid in its regular row mode or using the global item template in this manner to delete records based on their checked status.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. Scott
    Scott avatar
    45 posts
    Member since:
    Apr 2008

    Posted 03 Jun 2009 Link to this post

    Thanks.  I'm now using a regular datalist control to do solve my issue.  I wish Telerik has its own datalist control just like the Grid.  I know you guys have been talking about this for quite sometime but I hope to see it soon.

    Thanks again for your help.
  9. Zyguy
    Zyguy avatar
    23 posts
    Member since:
    Jan 2008

    Posted 03 Jun 2009 Link to this post

    I second that, we absolutely depend on the datalist-style arrangement, up till now we've have to use inferior non-Telerik controls for main product inventory pages.  It would be great if Radgrid could have a built-in datalist option. Trying to hack it with the method described in this thread works at the basic level but trying to get into the higher functionality it is very difficult to work with. 

  10. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 04 Jun 2009 Link to this post

    Hello guys,

    I see your point here and will forward your proposal to our development department to be considered for the future versions of the suite. Currently we are researching the possibility to include DataList-like type of control to the suite using the binding engine of RadGrid for ASP.NET AJAX as a core. Stay tuned for more details.

    Kind regards,
    Sebastian
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017