c# - Multiple Parameters in GridView with multiple DataKeyNames passing same value for all parameters -
i have gridview1 want populate gridview2
gridview1 declared so:
<asp:gridview runat="server" id="gwdup" allowpaging="true" allowsorting="true" pagesize="15" datakeynames="caseid, column2, adate, adddate" autogeneratecolumns="false" datasourceid="sqldatasource1"` > <asp:commandfield showselectbutton="true" /> <asp:boundfield datafield="column1" headertext="possible duplicates" readonly="true" sortexpression="column1" /> <asp:boundfield datafield="caseid" headertext="caseid" sortexpression="caseid" /> <asp:boundfield datafield="column2" headertext="column2" sortexpression="column2" /> <asp:boundfield datafield="adate" headertext="adate" sortexpression="adate" /> <asp:boundfield datafield="adddate" headertext="adddate" sortexpression="adddate" /> </columns> </asp:gridview>
i've put in function check values being passed in when click on select:
protected void sqldatasource2_selecting(object sender, sqldatasourceselectingeventargs e) { foreach (controlparameter s in sqldatasource2.selectparameters) { response.write(s.tostring()); } }
(i using debugger value, not response.write...)
though seems parameter name changes should, value same (of caseid, first parameter) doing wrong here? how come same value gets passed in 4 parameters?
Comments
Post a Comment