dev exp aspxgridview服务器端事件,以在文本框中获取选定的行详细信息 [英] dev exp aspxgridview server side events to get selected row details in to text box
本文介绍了dev exp aspxgridview服务器端事件,以在文本框中获取选定的行详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Dev Exp Gridview,我将在aspxgridview中所选行的文本框中显示详细信息.
请帮助我.............
谢谢,
Shashikant
Hi,
I am using Dev Exp Gridview, i waht to display the details in to textbox for selected row from aspxgridview.
please help me.............
Thanks,
Shashikant
推荐答案
比拉达尔,
您能否在这里联系我们的支持团队,他们可以帮助您找到解决方案?
http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question [^ ]
谢谢!
-Mehul
Hi Biradar,
Could you please contact our support team here and they can help you find a solution for that?
http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question[^]
Thanks!
-Mehul
我为我的问题找到了解决办法,
只需设置gridview的属性
EnableCallBacks = False
aspx代码
Hi,
i got the solution for my problem,
just set the property of gridview
EnableCallBacks=False
aspx code
<dx:ASPxGridView ID="dxGVUser" runat="server" AutoGenerateColumns="False"
ClientIDMode="AutoID" EnableCallBacks="False" KeyFieldName="UserId"
OnSelectionChanged="dxGVUser_SelectionChanged" Width="700px">
<Columns>
<dx:GridViewCommandColumn ShowInCustomizationForm="True" VisibleIndex="0">
</dx:GridViewCommandColumn>
<dx:GridViewDataTextColumn FieldName="UserId" Name="User Id"
ShowInCustomizationForm="True" VisibleIndex="2">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="UserName" Name="User Name"
ShowInCustomizationForm="True" VisibleIndex="3">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn FieldName="FirstName" Name="First Name"
ShowInCustomizationForm="True" VisibleIndex="4">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Last Name" FieldName="LastName"
Name="Last Name" ShowInCustomizationForm="True" VisibleIndex="5">
</dx:GridViewDataTextColumn>
<dx:GridViewDataTextColumn Caption="Middle Name" FieldName="MiddleName"
Name="Middle Name" ShowInCustomizationForm="True" VisibleIndex="6">
</dx:GridViewDataTextColumn>
</Columns>
<SettingsBehavior AllowFocusedRow="True" AllowSelectByRowClick="True"
AllowSelectSingleRowOnly="True" ProcessSelectionChangedOnServer="True" />
</dx:ASPxGridView>
<asp:textbox id="txtUserName" runat="server" width="180px" xmlns:asp="#unknown"></asp:textbox>
CS代码
CS Code
protected void dxGVUser_SelectionChanged(object sender, EventArgs e)
{
txtUserName.Text = dxGVUser.GetSelectedFieldValues("UserName")[0].ToString();
}
在gridview的RowCommand上
On RowCommand of gridview
protected void select_empl(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
GridViewRow row = GridView1.Rows[index];
txtemployeecode.Text=row.Cells[1].Text;
txtemployeename.Text=row.Cells[2].Text;
}
希望对您有帮助
注意:它用于ASP.Net GridView.
Hope it helps
Note: It is for ASP.Net GridView.
这篇关于dev exp aspxgridview服务器端事件,以在文本框中获取选定的行详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文