not getting value from one edittemplate dropdownlist to another edittemplate dropdownlist

i have a gridview with few dropdownlists in the edit template, i am trying to populate one of the edit template dropdownlist based on another edittemplate's dropdownlist selected value how can i accomplish this??

 
<asp:TemplateField  HeaderText="Line">
                                 <HeaderTemplate>
                     Line
            <br />
                   <asp:DropDownList ID="LineValues" runat="server" AutoPostBack="True" OnSelectedIndexChanged="LineValues_SelectedIndexChanged"></asp:DropDownList>
               </HeaderTemplate>
                              <ItemTemplate>
                                 <asp:Label ID="line" runat="server" Text = '<%# Eval("[Line]") %>'></asp:Label>
                              </ItemTemplate>
                              <EditItemTemplate>
                                   <asp:DropDownList ID = "line1" Text = '<%# Eval("[Line]") %>' runat ="server" DataSourceID="SqlDataSource1" DataTextField="Line" DataValueField="Line" />
                                   <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:OEEDBConnectionString %>" SelectCommand="SELECT [Line] FROM [WC Info] WHERE ([Plant] = @Plant)">
                                       <SelectParameters>
                                           <asp:ControlParameter ControlID="PlantValue" Name="Plant" PropertyName="Text" Type="String" />
                                       </SelectParameters>
                                   </asp:SqlDataSource>
                              </EditItemTemplate>
                              <FooterTemplate>
                                   <asp:TextBox ID = "linefooter" runat ="server" />
                              </FooterTemplate>
                          </asp:TemplateField>
            <asp:TemplateField  HeaderText="Machine">
                                 <HeaderTemplate>
                     Machine
            <br />
                   <asp:DropDownlist ID="MachineValues" runat="server"></asp:DropDownlist>
               </HeaderTemplate>
                              <ItemTemplate>
                                 <asp:Label ID="Machine" runat="server" Text = '<%# Eval("[Machine]") %>'></asp:Label>
                              </ItemTemplate>
                              <EditItemTemplate>
                                   <asp:DropDownList ID = "Machine1" Text = '<%# Eval("[Machine]") %>' runat ="server" DataSourceID="SqlDataSource1" DataTextField="Machine" DataValueField="Machine" />
                                   <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:OEEDBConnectionString %>" SelectCommand="SELECT [Machine] FROM [WC Info] WHERE (([Plant] = @Plant) AND ([Line] = @Line))">
                                       <SelectParameters>
                                           <asp:ControlParameter ControlID="PlantValue" Name="Plant" PropertyName="Text" Type="String" />
                                           <asp:ControlParameter ControlID="line1" Name="Line" PropertyName="SelectedValue" Type="String" />
                                       </SelectParameters>
                                   </asp:SqlDataSource>
                              </EditItemTemplate>
                              <FooterTemplate>
                                   <asp:TextBox ID = "Machine" runat ="server" />
                              </FooterTemplate>
                          </asp:TemplateField>

Open in new window

Aravind RanganathanWindows Application DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CamilliaCommented:
I've used jQuery to do something like that but would this help

Example

or
Another example

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CamilliaCommented:
got an email from EE that this question has been inactive for 14 days and to help close it.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.