4 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 17 Aug 2012, 06:30 AM
Hi,
I suppose you want to access the values in UpdateCommand. Here is the sample code.
C#:
Thanks,
Shinu.
I suppose you want to access the values in UpdateCommand. Here is the sample code.
C#:
protected
void
RadGrid1_UpdateCommand(
object
sender, GridCommandEventArgs e)
{
GridEditableItem editItem = e.Item
as
GridEditableItem;
TextBox txt = (TextBox)editItem[
"EmployeeID"
].Controls[0];
//accessing the column
string
value = txt.Text;
Hashtable newValues =
new
Hashtable();
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editItem);
//using ExtractValuesFromItem method
string
id = newValues[
"EmployeeID"
].ToString();
}
Thanks,
Shinu.
0
Sanjeev
Top achievements
Rank 1
answered on 24 Aug 2012, 11:46 AM
grideditableitem datatype is not available in my updateCommand function.. can you please tell me the reason
0
Hi,
The easiest way to access row values is on the ItemDataBound event:
You should substitute "ColumnUniqueName" with the name of the column in which the cell is located. Additionally, in order to use the GridEditableItem and GridDataItem classes you should include the Telerik.Web.UI namespace in your file:
If you want to receive response within a guaranteed time frame, you should open support threads, instead of forums. The forum threads are not with guaranteed time reply.
Additionally, as I see from your account all support thread are marked with "Closed by client" tag. Is there any thread that you are still waiting reply for?
Regards,
Andrey
the Telerik team
The easiest way to access row values is on the ItemDataBound event:
protected
void
RadGrid1_ItemDataBound(
object
sender, Telerik.Web.UI.GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem dataItem = e.Item
as
GridDataItem;
string
value = dataItem[
"ColumnUniqueName"
].Text;
}
}
You should substitute "ColumnUniqueName" with the name of the column in which the cell is located. Additionally, in order to use the GridEditableItem and GridDataItem classes you should include the Telerik.Web.UI namespace in your file:
using
Telerik.Web.UI;
If you want to receive response within a guaranteed time frame, you should open support threads, instead of forums. The forum threads are not with guaranteed time reply.
Additionally, as I see from your account all support thread are marked with "Closed by client" tag. Is there any thread that you are still waiting reply for?
Regards,
Andrey
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.
0
Sanjeev
Top achievements
Rank 1
answered on 30 Aug 2012, 06:28 AM
Thanks Admin. its now working fine for me