5 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 17 Jun 2013, 08:38 AM
Hi Arun.
Please try the following code to get the new value.
C#:
Also take a look into the following help documentation.
Updating Values Using InPlace and EditForms Modes
Thanks,
Shinu.
Please try the following code to get the new value.
C#:
protected
void
grid1_UpdateCommand(
object
sender, GridCommandEventArgs e)
{
GridEditableItem editItem = e.Item
as
GridEditableItem;
Hashtable newValues =
new
Hashtable();
TextBox txt = ((TextBox)editItem.FindControl(
"txt1"
));
string
t = txt.Text;
// to get the value by accessing control in edittemplate
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editItem);
string
id = newValues[
"EmployeeID"
].ToString();
// to get the value by uniquename
}
Also take a look into the following help documentation.
Updating Values Using InPlace and EditForms Modes
Thanks,
Shinu.
0
Shinu
Top achievements
Rank 2
answered on 17 Jun 2013, 08:43 AM
Hi Arun.
Please try the following code to get the new value.
C#:
Also take a look into the following help documentation.
Updating Values Using InPlace and EditForms Modes
Thanks,
Shinu.
Please try the following code to get the new value.
C#:
protected
void
grid1_UpdateCommand(
object
sender, GridCommandEventArgs e)
{
GridEditableItem editItem = e.Item
as
GridEditableItem;
Hashtable newValues =
new
Hashtable();
TextBox txt = ((TextBox)editItem.FindControl(
"txt1"
));
string
t = txt.Text;
// to get the value by accessing control in edittemplate
e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editItem);
string
id = newValues[
"EmployeeID"
].ToString();
// to get the value by uniquename
}
Also take a look into the following help documentation.
Updating Values Using InPlace and EditForms Modes
Thanks,
Shinu.
0
Arun
Top achievements
Rank 1
answered on 17 Jun 2013, 11:44 AM
Hi shinu,
Thanks For your code for update.I have one more query regarding radgrid .When i trying to click edit button it shows a horizontal line .Instead of showing update & cancel link. I don't know how to solve .Please help me.
Thanks ,
Arun.
Thanks For your code for update.I have one more query regarding radgrid .When i trying to click edit button it shows a horizontal line .Instead of showing update & cancel link. I don't know how to solve .Please help me.
Thanks ,
Arun.
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2013, 05:08 AM
Hi,
I was not able to replicate your issue. The best approach would be to use a GridEditCommandColumn rather than using a GridButtonColumn or a GridTemplateColumn. When the user presses the edit button for an EditCommandColumn and if the table view is configured for in-line editing, the Update and Cancel buttons automatically appear in place of the edit button. Check out the following help document to find out more on various columns in the grid.
Column Types
Thanks,
Shinu.
I was not able to replicate your issue. The best approach would be to use a GridEditCommandColumn rather than using a GridButtonColumn or a GridTemplateColumn. When the user presses the edit button for an EditCommandColumn and if the table view is configured for in-line editing, the Update and Cancel buttons automatically appear in place of the edit button. Check out the following help document to find out more on various columns in the grid.
Column Types
Thanks,
Shinu.
0
Shinu
Top achievements
Rank 2
answered on 18 Jun 2013, 05:17 AM
Hi,
I was not able to replicate your issue. The best approach would be to use a GridEditCommandColumn rather than using a GridButtonColumn or a GridTemplateColumn. When the user presses the edit button for an EditCommandColumn and if the table view is configured for in-line editing, the Update and Cancel buttons automatically appear in place of the edit button. Please have a look into this help documentation.
Hope this will hep you.
Thanks,
Shinu.
I was not able to replicate your issue. The best approach would be to use a GridEditCommandColumn rather than using a GridButtonColumn or a GridTemplateColumn. When the user presses the edit button for an EditCommandColumn and if the table view is configured for in-line editing, the Update and Cancel buttons automatically appear in place of the edit button. Please have a look into this help documentation.
Hope this will hep you.
Thanks,
Shinu.