Hi ,
I am using Infragistics version 8.2
I want to add javascript function to onclick of a link button which is a templated column at 4th band
i need to pass some parameters(information related to that row) to javascript function.
Currently i am using Initialize row event but it is not working properly
Please suggest me how to achieve this.
Regards
Siva Prasad
Siva,
What do you mean by "not working properly"? Using InitializeRow to modify the CellItem corresponding to the cell for each row in your templated column is the best approach.
Hi,
The problem is when getting CellItem I made a mistake in InitializeRowEvent
CellItem
item = ((CellItem)((TemplatedColumn)e.Row.Cells[4].Column).CellItems[e.Row.Index]);
LinkButton lnk = item.FindControl("lnk") as LinkButton ;
For example grid is binded like this
First Band
SecondBand
Third Band
Fourth Band --- In this band i had Templated column and i need to attach Javascript function for the link button which is in this templated column.
In order to get cellitem i am using above logic
Javascript function is attaching but the problem is grid is binding like this.
Parent1
Child11
Child111
Child1111 --- RowIndex - 0
Child1112 --- RowIndex - 1
Child1113 --- RowIndex - 2
Parent2
Child22
Child222
Child2221 --- Again Row Index is initializing to 0, so same cellitem it is referrencing
Child2222
Child2223
Please correct me where i made mistake?