This is a migrated thread and some comments may be shown as answers.

Open On Cell Click

6 Answers 115 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Cush
Top achievements
Rank 1
Cush asked on 28 Nov 2010, 10:35 PM
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

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Nov 2010, 11:11 AM
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.
0
Cush
Top achievements
Rank 1
answered on 29 Nov 2010, 11:46 AM
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
0
Cori
Top achievements
Rank 2
answered on 29 Nov 2010, 03:25 PM
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.
0
Cush
Top achievements
Rank 1
answered on 29 Nov 2010, 10:14 PM
Hi

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

Rgds

Darren
0
Cori
Top achievements
Rank 2
answered on 30 Nov 2010, 02:07 PM
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.
0
Cush
Top achievements
Rank 1
answered on 30 Nov 2010, 07:10 PM
See I told you :-)

Thanks very much for your help Cori

Regards

Darren
Tags
ToolTip
Asked by
Cush
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Cush
Top achievements
Rank 1
Cori
Top achievements
Rank 2
Share this question
or