GridView Binding!!

V

Vai2000

Hi All, I have a DataList and a grid view control on the same page. The way
GridView binds is if an item is selected on Datalist the GridView Binds to
that selected value.

I want the Datalist to automatically fire off an event with default selected
value so that the gridview can bind when the page loads. How can I set "
default selected value "in datalist?

This is my current Code!!!!
protected void Item_Command(Object sender, DataListCommandEventArgs e){

DataList1.SelectedIndex = e.Item.ItemIndex;

}



TIA
 

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

Members online

No members online now.

Forum statistics

Threads
473,821
Messages
2,569,725
Members
45,511
Latest member
Osiris-Team

Latest Threads

Top