Problem in Datagrid

  • Thread starter umesh garnaik via .NET 247
  • Start date
U

umesh garnaik via .NET 247

(Type your message here)

--------------------------------
From: umesh prasad garnaik

Dear

I have a datagrid which contains records. I have a select column, when i select it corresponding items should display in the textbox

For that i had write the code but not working.


protected void DataGrid1_ItemCommand(object sender, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{

if(e.CommandName=="Select")
{
int i=(int)e.Item.ItemIndex;
TextBox1.Text=DataGrid1.Items.Cells[2].Text;
TextBox12.Text=DataGrid1.Items.Cells[3].Text;
fillGrid();

}

}

Any help highly acceptable.

Thanks & Regards

Umesh
 
M

Morten Wennevik

Hi umesh,

I can't find anything wrong with your code, however, what does fillGrid() do?
Removing fillGrid() I can show the content of the currently selected row in two textboxes using your code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top