Hello,
Does anyone know how to associate a LinkButton (webform control) to a webgrid row data?
I have an ultrawebgrid with three columns, column ID, column Status, and column Command (Add). The Add command is a link button (web form control). Everytime I click on the Add link button, I need to retrieve the Column ID and Column Status and and pass it to a modal dialog to change the current status and update it into the database.
Thanks in advance for your help.
Hs2
Hi,
I am new to Infragistics controls.
I am using Ultrawebgrid control and tried to create a template field for a column in the grid, just like you mentioned using LinkButton control.
But, I am unable to set the Text attribute for it.
I want to set the grid cells text in the text attribute.
<igtbl:TemplatedColumn BaseColumnName="MakeModel" IsBound="true" Key="MakeModel" Width="200px" Type="Custom"> <Header Caption="SPC Model"> <RowLayoutColumnInfo OriginX="1" /> </Header> <CellTemplate> <asp:LinkButton ID="ID" Text="Press" OnClick="Link_Click" CommandName="Edit" CommandArgument="<%# Container.Cell.Row.Index %>" runat="server" /> </CellTemplate> <Footer> <RowLayoutColumnInfo OriginX="1" /> </Footer> </igtbl:TemplatedColumn>
Just in case anyone else stumbles upon this in search, I believe this forum thread gives the best resources and information (and additional forum posts with answers)
http://forums.infragistics.com/forums/p/20982/75631.aspx#75631
Hope this helps.
Is it possible to hadle the same Click event on the Client Side. What I want to achive is I have a hyperlink and on its Click event I want to run some Javascript code.How can i achive this,
Thank you in advance
Very nicely done. Here's the same code in vb.net assuming your "sender" is a LinkButton.
Dim i As Int32 = CType(CType(sender, LinkButton).NamingContainer, CellItem).Cell.Row.Index
in the link button click event:
int rowIndex = ((CellItem)((Control)sender).NamingContainer).Cell.Row.Index;
This appears to work in all cases...