devexpress gridview,selectedrowchanged
<dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="711px" CssClass="Glass" KeyFieldName="名称" EnableTheming="True" AutoGenerateColumns="False" OnCustomCallback="detailGrid_CustomCallback" onselectionchanged="ASPxGridView1_SelectionChanged" OnFocusedRowChanged="ASPxGridView1_FocusedRowChanged" > <Columns> <dx:GridViewDataTextColumn FieldName="名称" Caption="名称" VisibleIndex="1" Width="300px"></dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="版本号" FieldName="版本" VisibleIndex="2"> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="大小" FieldName="大小" VisibleIndex="3"> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="创建人" FieldName="作者" VisibleIndex="4"> </dx:GridViewDataTextColumn> <dx:GridViewDataTextColumn Caption="创建时间" FieldName="创建时间" VisibleIndex="5" Width="120px"> </dx:GridViewDataTextColumn> </Columns> <SettingsPager PageSize="15" Visible="true" ShowEmptyDataRows="true"> </SettingsPager> <Settings ShowHorizontalScrollBar="true" GridLines="None" /> <SettingsBehavior AllowSelectSingleRowOnly="true" AllowFocusedRow="true" ProcessFocusedRowChangedOnServer="true" /> </dx:ASPxGridView>
stre= this.ASPxGridView1.GetRowValues(this.ASPxGridView1.FocusedRowIndex, "名称").ToString();//”名称“,字段名
http://documentation.devexpress.com/#AspNet/CustomDocument5347