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]
Datanavigateurlformatstrin g = savetime.aspx?job_no={0}&s tart 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
I am using the following
Datanavigateurlfields = job_no,Column[6]
Datanavigateurlformatstrin
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
the Datanavigateurlfields property accepts the datafield/dataitem values, not a specific column value.
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
Thanks,
Dustin
ASKER
<asp:TemplateField HeaderText="Finish Travel">
<ControlStyle BackColor="ControlLightLig ht" BorderColor="Gray" Width="75px" />
<ItemStyle Width="75px" />
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>01:00</asp:L istItem>
<asp:ListItem>01:15</asp:L istItem>
<asp:ListItem>01:30</asp:L istItem>
<asp:ListItem>01:45</asp:L istItem>
<asp:ListItem>02:00</asp:L istItem>
<asp:ListItem>02:15</asp:L istItem>
<asp:ListItem></asp:ListIt em>
<asp:ListItem></asp:ListIt em>
<asp:ListItem></asp:ListIt em>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="job _no,dropdo wnlist1" DataNavigateUrlFormatStrin g="savetim e.aspx?job _no={0}&am p;finish travel={1}"
HeaderText="Save " Target="_top" Text="Save" />
</Columns>
so I want to get the value of finish travel dropdownlist1 into the urlstring
<ControlStyle BackColor="ControlLightLig
<ItemStyle Width="75px" />
<ItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem>01:00</asp:L
<asp:ListItem>01:15</asp:L
<asp:ListItem>01:30</asp:L
<asp:ListItem>01:45</asp:L
<asp:ListItem>02:00</asp:L
<asp:ListItem>02:15</asp:L
<asp:ListItem></asp:ListIt
<asp:ListItem></asp:ListIt
<asp:ListItem></asp:ListIt
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="job
HeaderText="Save " Target="_top" Text="Save" />
</Columns>
so I want to get the value of finish travel dropdownlist1 into the urlstring
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes this optioned worked
Were you going to accept that as the solution since it worked?