how to get values by selecting a row?

11 posts, 1 answers
  1. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 12 Nov 2008 Link to this post

    i have been trying for how to get values from grid by selecting a row. But i am unable to do it, please help me....
    I want to get all values in a selected row with those column values as well which arent been shown on grid..
    Actually i have made a query to select few things from database table and shown it using radgrid. but how to extract all values when user click on it or clicks on a link given for it on each row....but remember those values too which arent been shown on grid....plz help me!
  2. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 12 Nov 2008 Link to this post

    Hello Saadi,

    I created a sample website illustrating the functionality you requested.
    Please let us know if you need further assistance.

    Greetings,
    Daniel
    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. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 13 Nov 2008 Link to this post

    But where have you given the link of that sample website?
    There isnt any link for sample website.....
    Anyway thank you very much in advance. Now just do reply me the link of it...please!
  5. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 13 Nov 2008 Link to this post

    Hello Saadi,

    I reattached the example. Please excuse me for the inconvenience.

    Regards,
    Daniel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 14 Nov 2008 Link to this post

    Thanks alot for guiding me....
    I just need a little more guidance now. If i want to have link in each row and do the same on clicking it, then what should i do for it?
  7. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 14 Nov 2008 Link to this post

    Hello Saadi,

    I modified the example to fit your requirements. Please test it and let me know whether this helps.

    Greetings,
    Daniel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 15 Nov 2008 Link to this post

    And if i want to show a radwindow when ever link on each row of radGrid is clicked, then what should i do for it?
    I have done exactly the same as you`ve told me by using:

     

    protected

    void NoteBook_ItemCommand(object source, GridCommandEventArgs e)

     

    {

     

        if(e.CommandName ==

    "GetAllItems")
        {
        ..........
        }
    }

    So please tell this more....and THANK YOU very very much for this much support

     

  9. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 16 Nov 2008 Link to this post

    Now I want to place a text box whenever a user clicks on a row with link. I want that specific row to get hidden and place text box with 'ok' and 'cancel' buttons in place of that...If user clicks 'ok' or 'cancel', it do appropriate tasks and place that row again and hide text box and buttons....please guide me in it. Plllllzzzzzzzzzzzzzzzz!!!!!!

    By the way thanks alott for so much guidance till now.....Thank you!
  10. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 17 Nov 2008 Link to this post

    Hello Saadi,

    A suggestion would be to use an EditFormTemplate with the required controls in it. On clicking the link Button, you can put the row in EditMode and hide that particular row, so that only the FormTemplate is displayed. Check out the code below for the same:
    aspx:
    <Columns>  
        <telerik:GridEditCommandColumn EditText="Viewform" UniqueName="Col">                 
        </telerik:GridEditCommandColumn>  
    </Columns>  
    <EditFormSettings EditFormType="Template"
        <FormTemplate> 
                  <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> 
                  <asp:Button ID="Button5" runat="server" Text="OK" /> 
                  <asp:Button ID="Button6" runat="server" Text="Cancel" CommandName="Cancel" /> 
        </FormTemplate>                    
    </EditFormSettings> 

    cs:
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) 
        {       
            if (e.Item is GridEditableItem && e.Item.IsInEditMode && !e.Item.OwnerTableView.IsItemInserted) 
            { 
                GridEditFormItem editItem = (GridEditFormItem)e.Item; 
                editItem.ParentItem.Visible = false;           
               
            } 
        } 
             

    Thanks
    Princy.
  11. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Nov 2008 Link to this post

    Hi Saadi,

    You can also refer to the following link to open a window on the click of a link button in the grid.
    Window Editing

    Thanks
    Shinu.
  12. Saad
    Saad avatar
    82 posts
    Member since:
    Oct 2008

    Posted 17 Nov 2008 Link to this post

    Ok thanks alottt...
    Now i have put in a radTextBox (multilined and with button) instead of using a simple text box and to buttons....I need to know that whether can i place one more button with radTextBox? And how to do something on each OnButtonClick ? I need to put that text entered in text into the database.....
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017