Welcome Guest Search | Active Topics | Sign In | Register

Grid- Changing text of ButtonColumn Options
tb
Posted: Thursday, April 10, 2008 2:53:21 PM
Rank: Newbie
Groups: Member

Joined: 3/13/2008
Posts: 6
I need to have a button column where each of the text is a different part name. When I set the ButtonText it only allows a static value. I didn't see an option on the Grid to do OnRowDataBound like in GridView. I then tried using the OnLoad option, and I can see each row and value, but I can't find the actual link button control when going through the different levels of the grid. I can find the button column, but it has the same issue that if I set the text, it will set the text for all the links in the column to the same value. How do I set the button text to be different for each link button? Is there any equavalent <%# Eval("PartName")%> available?

My column:
<eo:ButtonColumn DataField="PartName" ButtonText="PartName" ButtonType="LinkButton" HeaderText="Part Name" ></eo:ButtonColumn>
The code I've been trying to find the link button control

protected void CheckRow(object sender, EventArgs e)
{
EO.Web.Grid grDisplay = (EO.Web.Grid)sender;
int i = 0;
EO.Web.GridItemCollection gCol = grDisplay.Items;

foreach (EO.Web.GridItem gr in gCol)
{
EO.Web.GridCellCollection gtest1 = gr.Cells;
i = 0;
foreach(EO.Web.GridCell gc in gtest1)
{

EO.Web.ButtonColumn bc = (EO.Web.ButtonColumn)gc.Column;

string tst1 = gc.Column.GetType().ToString();
string tst2 = gc.ToString();
string tst3 = gc.Value.ToString();


i++;

}




}


}
eo_support
Posted: Thursday, April 10, 2008 2:58:43 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

You can do that by leaving ButtonText empty and set DateField:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.ButtonColumn.ButtonText.html

This is only supported in very recent versions, so make sure you have the latest first.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.