hi...
frnds
i want to hold the position of selected row of gridview using update panel...
plz help..
hi...
frnds
i want to hold the position of selected row of gridview using update panel...
plz help..
div class="span-93 prepend-2 top">
<strong>Enter Number</strong><br />
<asp:TextBox ID="PartNumber" runat="server" Width="100"></asp:TextBox>
<asp:Button ID="CreateButton" runat="server" Width="85" Text="Locate" OnClick="CreateButton_Click" />
</div>
<asp:Label ID="Select" runat="server" Font-Bold="true" Text="Select choice" Visible="false"></asp:Label><br />
<ajax:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GridView" Visible="false" runat="server" HeaderStyle-Width="200" HeaderStyle-BackColor="#2B6292" HeaderStyle-ForeColor="White"
AllowSorting="true" AllowPaging="true" Width="600" AutoGenerateColumns="False" OnRowCreated="GridView_OnRowCreated"
DataKeyNames="Id" onsorting="GridView_OnSort">
<Columns>
...
</Columns>
</asp:GridView>
</ContentTemplate>
<Triggers>
<ajax:AsyncPostBackTrigger ControlID="CreateButton"/>
</Triggers>
</ajax:UpdatePanel>
protected void Create_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(Number.Text))
{
BLL newbll = new BLL();
Database.DataTable tempTable = newbll.GetItemByPartNumber(Number.Text);
if (Table.Count != 0)
{
DataTable table = tempTable ;
string[] VID = { "Id" };
GridviewDiv.Visible = true;
GridView.DataSource = table;
GridView.DataKeyNames = VID;
GridView.DataBind();
}
}
}
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.