get datakey value radlistview

3 posts, 0 answers
  1. Prassin
    Prassin avatar
    87 posts
    Member since:
    Jun 2012

    Posted 06 Aug 2012 Link to this post

    Hi All,

    How to get the data key value of a rad list view control in item command. 

    Regards,

    Prassin
  2. Prassin
    Prassin avatar
    87 posts
    Member since:
    Jun 2012

    Posted 06 Aug 2012 Link to this post

    I have fix the issue by applying like this..


    protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
        if (e.CommandName == RadListView.SelectCommandName)
        {
            RadListViewDataItem item = e.ListViewItem as RadListViewDataItem;
            string myValue = item.GetDataKeyValue("myValue").ToString();
        }
    }


    Regards,

    Prassin
  3. Asromi
    Asromi avatar
    1 posts
    Member since:
    Jun 2017

    Posted 04 Jun Link to this post

    protected void RadListView1_ItemCommand(object sender, RadListViewCommandEventArgs e)
    {
        if (e.CommandName == "yourCommandName")
        {

           RadListViewDataItem eItem = (RadListViewDataItem)e.ListViewItem;

            string myValue = eItem.GetDataKeyValue("myValue").ToString();
        }
    }

Back to Top