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

RadGrid Get Cell Value

3 Answers 1875 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kaushal
Top achievements
Rank 1
Kaushal asked on 22 Mar 2012, 05:56 PM
Hi,

I am new to radcontrols. Started using this week.
My problem is I want to get the column value inside a row of a radgrid. I am using the cde bewlo

var mymultiplier = MasterTable.getCellByColumnUniqueName(dataItem, 'Multiplier');

Instead of getting the value of multiplier, I am getting the HTML. Please help.

3 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 22 Mar 2012, 06:16 PM
Hello,

protected void Page_PreRender(object sender, EventArgs e)
        {
            foreach (GridDataItem item in RadGrid1.MasterTableView.Items)
            {
                string str = item["Multiplier"].Text;
            }
        }

or

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
       {
           if (e.Item is GridDataItem)
           {
               GridDataItem item = e.Item as GridDataItem;
               string str = item["Multiplier"].Text;
               
           }
 
       }


Thanks,
Jayesh Goyani
0
Kaushal
Top achievements
Rank 1
answered on 22 Mar 2012, 08:38 PM
Ok. I fixed it.
I had to use

var rtbmultiplier = dataItem.findElement('Multiplier');";

this gave me varialble and using rtbmultiplier.value, I wa able to extract the value of multiplier.

0
Sabaratnam
Top achievements
Rank 1
answered on 04 Dec 2012, 09:05 PM
Jayesh GoyaniAppreciate all your extremely helpful help posts.
Thanks a lot for sharing / helping.
Tags
Grid
Asked by
Kaushal
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Kaushal
Top achievements
Rank 1
Sabaratnam
Top achievements
Rank 1
Share this question
or