Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Getting Datakey Field Value Of a Row
posted

How Can I get the data key field value of a row in Ultrawbgrid when i click a button in templated column in that row.

I am using vs 2005,Infragistics NetAdvantage 2008.1 CLR2.0.

Can any one please send me the solution .Thanks in advance

 

Parents
No Data
Reply
  • 28464
    posted

    You can use the CommandArgument property of the button and set it to the same valiud is the TemplatedColumn. Example:

     <igtbl:TemplatedColumn Key="CustomerID">
        <CellTemplate>
            <asp:Button CommandArgument="CustomerID" ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
        </CellTemplate>
    </igtbl:TemplatedColumn>
        
        
        protected void Button1_Click(object sender, EventArgs e)
        {
            Button button = sender as Button;
            string dataKey = button.CommandArgument;        
        }

Children
No Data