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

radgrid column dynamic value

3 Answers 177 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 06 Nov 2012, 04:43 PM
i have a radgrid that needs to show some dynamic values appended to a database value.

in other words the grid will display several columns whereby the display is 30 (15)
where 30 is a value retrieved from the database but (15) is updated on the fly depending on records added to a grid....

how would i achieve this?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Nov 2012, 04:40 AM
Hi Mark,

I guess you want to append a value to the data cell. Please check the code snippet I tried.

C#:
protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem ditem = (GridDataItem)e.Item;
        if (ditem["UniqueName"].Text == "30")
        {
            ditem["UniqueName"].Text = ditem["UniqueName"].Text+"(15)";
        }
    }
}

Thanks,
Shinu.
0
Mark
Top achievements
Rank 1
answered on 07 Nov 2012, 09:12 AM
Thanks

how would i identify each row?

on rowclick i launch a popup and depending what values are entered, these values affect the column value, but for the row clicked only.. not all rows...
0
Eyup
Telerik team
answered on 09 Nov 2012, 02:10 PM
Hi Mark,

In case you want to use an external edit form, please check out the following demos and choose which implementation best matches your requirements:
 Grid / PopUp Edit Form
 Grid / Editing with External Form 
 Window / Use as controls container
 Window / Edit Dialog for RadGrid
  Grid / Insert with Tooltip

I hope this will prove helpful. If you have different requirements or further instructions, please elaborate some more on the issue.

Regards,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or