We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

That way recover the value of a ItemTemplate

Thread ID:

Created:

Updated:

Platform:

Replies:

77386 Oct 29,2008 07:50 PM UTC Nov 14,2008 11:23 AM UTC ASP.NET Web Forms (Classic) 7
loading
Tags: GridGroupingControl
Karla p. dzul sosa
Asked On October 29, 2008 07:50 PM UTC

That way recover the value of a ItemTemplate. For example the following code, how to recover the value of HiddenField or the Label?
C#.





Mohamed Suhaib Fahad A. [Syncfusion]
Replied On November 1, 2008 02:21 AM UTC

Hi Karla,

Since you define the ID's of the ItemTemplate controls, you can use FindControl method in the RowDataBound event of the GridGroupingControl.

Please let me know if this helps you out.

Thanks,
Fahad
ASP.NET Grid Team
Syncfusion Inc.,


Karla p. dzul sosa
Replied On November 3, 2008 07:24 PM UTC

Sorry but I was not served, I would like to forget to mention that the value of a selected row, that is, if this is the instruction to return the value of a grid:

String id = grid.Table.SelectedRecords[0].Record.GetValue("ActividadProdID").ToString();

What is the instruction to return the value of itemtemplate in the selected row?

String valueTemplate = ?????


Rajarajeswari S [Syncfusion]
Replied On November 7, 2008 10:46 AM UTC

Hi Karla,

Sorry for the delay in responding you.

We can loop through the GridCells and get value of ItemTemplate for a selected row.

Please refer the sample from the below link, which illustrates thsi:

http://www.syncfusion.com/support/user/uploads/TemplateValue_9304fbed.zip


Please let me know if this helps you out.

Regards,
Raji



Karla p. dzul sosa
Replied On November 7, 2008 07:19 PM UTC

I really thank you very much this was what I needed. I've been delayed two weeks just for this. The ingredients are very good, but I feel that there is not much information about them. Should have a section with examples preacticos like that you sent me, and if there is already send the link that I have not found me. It's hard to find that instruction is what you need when those accustomed to the AJAX and ASPX.

thanks again.

P.D. They should also be a little quicker to respond.


Rajarajeswari S [Syncfusion]
Replied On November 11, 2008 09:26 AM UTC

Hi Karala,

Thanks for the update.

Actually with the above sample, we are accessing the Rows collection from the TopLevelTable and check for the Record is current, if so we are loop through the GridCells from the Grid Records. GridCells contains the Controls collection, there we are checking for TexBox, if so we can get the value from the TextBox.

The below code snippet illustrates this:

foreach (TableRow row in this.GridGroupingControl1.TopLevelTable.Rows)
{
if (row is GridRow)
{
GridRow gridRow = row as GridRow;
// Skip all non record rows.
if (gridRow.Record != null)
{
Record record = gridRow.Record;
if(record.IsCurrent)
{
string val = record.GetValue("City").ToString();
//record.BeginEdit();
// Parse through all the cells in the row, skipping the first, which is the row header.
//bool skippedFirst = false;
foreach (GridCell gridCell in gridRow.Cells)
{
if (gridCell.ColumnDescriptor.Name == "City")
{
TextBox tb = null;

foreach (Control c in gridCell.Controls[0].Controls)
{
if (c is TextBox) { tb = c as TextBox; this.TextBox2.Text = tb.Text; break; }
}

}
}
}
}
}
}


Please let me know if you have any other concerns.

Regards,
Raji


Karla p. dzul sosa
Replied On November 11, 2008 07:23 PM UTC

Here's an image of a grid for you to understand what they desire. I want to remove that sign over, I do not want a breakdown of the information, why not need it. What that does not appear?

I am doing this because my slow pages that information overload


Rajarajeswari S [Syncfusion]
Replied On November 14, 2008 11:23 AM UTC


Hi Karala,

Forum # 77661 has been updated the for the mentioned issue, Could you please follo-up with that forum, to get more details on this?

Regards,
Raji


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;