问题
I'm a new to DevexpressGridView
.
I have a Dev Grid in my webpage, and I want to handle the RowClick Event
like:
private void GridView1_RowClick(object sender, RowClickEventArgs e)
{
if(a row is selected)// how???
Button1.Visible=true;
}
But when it has an error: "cannot resolve symbol RowClickEventArgs"
, this is first time I know about Devexpress. So I wonder if my RowClickEventArgs
syntax is wrong??? I've tried to find the solution by searching google for many times, but I still cannot get the right thing.
Can you give me a right syntax???
And one more question, how can I check " is there any row selected ?"
Help!
回答1:
So it would be like this:
private void GridView1_Click(object sender, EventArgs e)
{
System.Data.DataRow row = GridView2.GetDataRow(GridView2.FocusedRowHandle);
if(row[0].ToString() == "")
{
//YOUR LOGIC
}
}
GridView2 is your main view.
来源:https://stackoverflow.com/questions/19217076/cannot-find-rowclickeventargs-in-devexpressgridview