Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Rod Snyder #1
.NET databound radiolistbutton in a repeater
I have a databound radiobuttonlist in a repeater and I am at a loss to
figure out how to set a selected item at runtime? Any help would be
appreciated.
Rod
Rod Snyder Guest
-
UserControl with databound repeater drops values on postback
Hi all, I have a user control that contains a repeater that generates a list of check boxes. The checkboxes render fine, but they don't maintain... -
UserControls and DataBound Repeater
I've built a few UserControls that have worked perfectly for a while. Now, for the first time, I want to use these controls inside a Data-Bound... -
Composite control delegating databound templated features to child <asp:repeater> control
Hi Everybody, I'm creating a composite control in C# that basically renders a bunch of webcontrols such as <asp:Label />, <asp:Repeater />,... -
Databound DDL using code-behind
Does anyone know of a resource for information on how to create a working databound DDL in a datagrid using code behind? I have found a plethora of... -
DataBound ListBox
I have the following code (this is a snippet): InitDBConn(); OpenDBConnection(); OleDbCommand cmdRidge = new OleDbCommand("SELECT * FROM... -
RichMcCrea #2
Re: .NET databound radiolistbutton in a repeater
In your repeater column, call a custom routine which returns a routine.. My
routine returns a list of employees assigned to a project. The important point
is that you can reverse engineer the needed html in your called procedure and
return it as a string this goes in the repeater object in place of where you
would usually have a <%# DataSet1.FieldValue('myfield', Container) %> <%#
GetAssignees((System.Data.DataRowView) Container.DataItem) %> the function
(which I did in a code behind page but which could be in the page itself is
public string GetAssignees(System.Data.DataRowView thedata) { System.Int64
theid=(System.Int64)thedata['id']; assigneelist=new
swimsql.baseLookTable();;
assigneelist.set_ConnectString(ConfigurationSettin gs.AppSettings['ufportal_co
nn_nonoledb']); assigneelist.Load_LookUpData('select username from
projectrequest_assignees a right join application_users u on a.user_id=u.id
where a.proj_id='+theid.ToString(), 'assignees');
System.Data.DataRowCollection
theassigneerows=assigneelist.dsLookUp.Tables['assignees'].Rows; if
(theassigneerows.Count==0) { return 'No one'; } else { // build list of
assigned employees string thelist=''; int rowcount=0; foreach
(DataRow row in theassigneerows) { rowcount++; if (rowcount>1)
thelist+='<br>'; thelist+=row['username']; } return
thelist; } } I did use a custom framework in the routine in my codebehind
page to access the data but again.. all that matters is that the string you
return creates the raw radio button html (with the appropriate value selected).
Hope this helps Rich McCrea
RichMcCrea Guest
-
RichMcCrea #3
Re: .NET databound radiolistbutton in a repeater
sorry about the formatting problems in the previous message.. I made a type and
when I re-edited the text.. the forum put all those <BR> tags in.. copy my
answer out and replace all the <BR> tags with (CR+LF) characters and it will be
readable again.. lol.. sorry.
RichMcCrea Guest
-
RichMcCrea #4
Re: .NET databound radiolistbutton in a repeater
if it is impossible to understand this.. send me an email and I will send you the source code in it's entirety (richmccrea@richmccrea.com)
RichMcCrea Guest



Reply With Quote

