Link to home
Start Free TrialLog in
Avatar of csintera
csintera

asked on

How do I a template field dropdown value into the datanavigateurlformatstring

How would I get the value of a templatefield dropdown into the datanavigateurlstring property within a gridview edit columns using vs2005

I am using the following

Datanavigateurlfields = job_no,Column[6]

Datanavigateurlformatstring = savetime.aspx?job_no={0}&start travel={1}

job_no gets the value but I can get the start_travel value from the dropdown list in column6

This is using the gridview tasks option in vs and not programatically

Avatar of Dustin Hopkins
Dustin Hopkins
Flag of United States of America image

the Datanavigateurlfields  property accepts the datafield/dataitem values, not a specific column value.
Avatar of csintera
csintera

ASKER

But it accepts the job_no bounditem column as a column value,  but not the templatefields coulum
what dataitem is the ddl in column[6] bound to?
If you could post the code for your gridview, that would help...

Thanks,
Dustin
 <asp:TemplateField HeaderText="Finish Travel">
                            <ControlStyle BackColor="ControlLightLight" BorderColor="Gray" Width="75px" />
                            <ItemStyle Width="75px" />
                            <ItemTemplate>
                                &nbsp;<asp:DropDownList ID="DropDownList1" runat="server">
                                    <asp:ListItem>01:00</asp:ListItem>
                                    <asp:ListItem>01:15</asp:ListItem>
                                    <asp:ListItem>01:30</asp:ListItem>
                                    <asp:ListItem>01:45</asp:ListItem>
                                    <asp:ListItem>02:00</asp:ListItem>
                                    <asp:ListItem>02:15</asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                    <asp:ListItem></asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:HyperLinkField DataNavigateUrlFields="job_no,dropdownlist1" DataNavigateUrlFormatString="savetime.aspx?job_no={0}&amp;finish travel={1}"
                            HeaderText="Save " Target="_top" Text="Save" />
                    </Columns>

so I want to get the value of finish travel dropdownlist1 into the urlstring
ASKER CERTIFIED SOLUTION
Avatar of Dustin Hopkins
Dustin Hopkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes this optioned worked
Were you going to accept that as the solution since it worked?