Open On Cell Click

7 posts, 0 answers
  1. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 28 Nov 2010 Link to this post

    Hi
    I want to open a tooltip to update a record on a cell click in a Radgrid,
    However i dont want to use anything other than a simple bound column with data in the cell,

    Can anyone advise me of any method of doing this please.

    Many Thanks

    Rgds

    Darren
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Nov 2010 Link to this post

    Hello,


    One suggestion is attaching OnRowClick client event to RadGrid and open the tooltip from client side. Now add the code for updating the row in tooltip.

    A similar case is shown here by using ToolTip for inserting records.
    Insert in RadGrid with Tooltip



    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 29 Nov 2010 Link to this post

    Hi Shinu

    Thank for your response
    I want to open a tooltip to update a record if a user clicks on a specific column in a row that is not a hyper link?

    Rgds

    Darren
  5. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 29 Nov 2010 Link to this post

    Hello Darren,

    You change the column to a GridTemplateColumn. In that column you can wrap the value in a div and handle the div's onclick event. Like so:

    <telerik:GridTemplateColumn>
        <ItemTemplate>
            <div onclick="OpenTooltip('<%#DataBinder.Eval(Container.DataItem,"ID")%>')">
                <%#DataBinder.Eval(Container.DataItem,"Text")
            </div>
        </ItemTemplate>
    </telerik:GridTemplateColumn>

    I'm passing the primary key of record, but you can change it to suit your needs.

    I hope that helps.
  6. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 29 Nov 2010 Link to this post

    Hi

    Thanks for the reply,
    Excuse my ignorance but how can i do this and show the original datavalue of the column?

    Rgds

    Darren
  7. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 30 Nov 2010 Link to this post

    Hello Darren,

    It is showing the original value. The line:

    <%#DataBinder.Eval(Container.DataItem,"Text")%>

    Is where you place the actual value of the column. Replace "Text" with your column name.
  8. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 30 Nov 2010 Link to this post

    See I told you :-)

    Thanks very much for your help Cori

    Regards

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