本文介绍了使用RadGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想当用户编辑radgridview的单元格值当前单元格的文本

显示在文本框中并发。

mytextbox.text = radgrid.currentrow.cells [MYCOLUMN ] .value.tostring;

在编辑文本结束时有效。我想在文本框中显示我的更改;

I want When user edit Cell Value of radgridview the text of current cell
show in textbox concurrency .
mytextbox.text=radgrid.currentrow.cells["MYCOLUMN"].value.tostring;
works when editing text ended .i want show in textbox my change;

推荐答案


<telerik:GridTemplateColumn HeaderText="" UniqueName="TemplateColumnAddlfield" ItemStyle-Width ="20%" HeaderStyle-Width="20%">
<ItemTemplate>
<asp:Panel ID="pnlComment" runat="server" Visible="True">
<asp:Label ID="lbComment"  text="Comment" runat="server"></asp:Label>
<asp:TextBox ID="ctlTextBox"  runat="server"></asp:TextBox>
</asp:Panel>
</ItemTemplate>
<ItemStyle BorderColor="white" />
</telerik:GridTemplateColumn>













   Protected Sub grdQuestions_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdQuestions.ItemDataBound
Dim ctlTextBox As TextBox = gridItem.FindControl("txtQuestion")
 If Not ctlTextBox Is Nothing Then
ctlTextBox.Attributes.Add("onchange", "checkMnadatoryRows();")



 End If
   End Sub

function checkMnadatoryRows()
{
// write whatever you need here
// this will call when your text has changing in textbox 
}


这篇关于使用RadGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 00:04