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

[Solved] get DataKeyName from GridTempleteColumn

3 Answers 118 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shehab
Top achievements
Rank 1
Shehab asked on 03 Jun 2008, 12:37 PM
Hi all,

I have a radgrid that has a GridTemplateColumn and inside it there is ItemTemplate which has ModalPopupExtender and LinkButton so when I click on the button I would see detail values for that row just like this:
    <MasterTableView DataKeyNames="PersonID">  
            <Columns> 
              <radG:GridTemplateColumn UniqueName="TemplateColumn">  
                  <ItemTemplate>                         
                        <asp:LinkButton ID="link1" runat="server" CausesValidation="false" Text='<%#Eval("PersonID")%>'      
                        CommandName="SelectButton" ></asp:LinkButton> 
                        <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground"   
                        TargetControlID="link1" PopupControlID="Panel1" OkControlID="btnOK" > 
                        </cc1:ModalPopupExtender> 
                  </ItemTemplate> 
              </radG:GridTemplateColumn> 
              <radG:GridBoundColumn DataField="PersonID" Display="False" HeaderText="PersonID" 
                    ReadOnly="True" UniqueName="PersonID">  
              </radG:GridBoundColumn> 
   </MasterTableView> 
Now I want to get the value of PersonID from the DataKey Names so I can run a query with that ID and get more details to display in the popupextender.

Thank you for all your help
Shehab

3 Answers, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 06 Jun 2008, 12:03 PM

Hello Shehab,

For your convenience I prepared a demo project and uploaded in the code library section on our site:

http://www.telerik.com/community/code-library/submission/b311D-beckhk.aspx

I think it can be used as a basis for your custom implementation.

Best regards,

Stephen

the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
0
Shehab
Top achievements
Rank 1
answered on 10 Jun 2008, 06:32 PM
Thanks Stephen,

It pops up the modalpopupExtender, the problem is, it stops at that line in the JS code so it go throught the first line, pops up the panel and it stops, it doesn't continue to the second line:
$find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(rowid);     

The second part is, I don't want to fill SQLDataSource, I have my DLL project that I connect with to the database and get the dataset then assign the values in the panel weather it is data list or just filling lables with the values I get back.

Thank you very much for your help,

Shehab
0
Sebastian
Telerik team
answered on 11 Jun 2008, 07:36 AM
Hi Shehab,

Can you please modify the example from the code library thread I created thus as the issue surface and send it back attached to a formal support ticket? Thus I will do my best to advice you further.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Shehab
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Shehab
Top achievements
Rank 1
Share this question
or