Can you please show how to code for a checkbox list in a RowEditTemplate...I'm using a Sql data source to populate checkbox list. Thx!
Hi davefevold,
Are you trying to use a checkbox list for one column? To choose among multiple items and then have them concactenated with a comma? One option would be to use a WebDropDown. You could turn on checkbox selection to accomplish this. If you do want this, there is no default code for it in the grid. You would have to code it yourself. You'd need a function that takes in the value, splits it, and then checks the appropriate checkboxes. And going back, you'd need to iterate through the checkboxes to build the string to give to the grid.
regards,David Young
Thanks for the reply David. I tried using the WebDropDown within the RowEditTemplate but I could not make the control drop down...I could get it to work outside of the RowEditTemplate but not inside of it...any thoughts as to why?
Hi,
It is possible that the drop down is showing, but its z-index is less than that of the row edit template div. They both use our drop down framework. Could you maybe handle the opening client event on the drop down and try to set a bigger z-index on the drop down itself?
-Dave
Dave, below is the code that I'm using...please let me know if I'm missing something.
<ig:BoundDataField DataFieldName="Dray_Type" DataType="System.String" Key="Dray_Type" Width="100px"> <Header Text="Dray Type" /></ig:BoundDataField>
<ig:RowEditingClientBinding ColumnKey="Dray_Type" ControlID="wddDrayType" GetValueJavaScript="$find({ClientID}).get_currentValue()" SetValueJavaScript="$find({ClientID}).set_currentValue({value},true)" />
<td class="style12"> <b>Dray Type:</b></td><td class="style13"> <ig:WebDropDown ID="wddDrayType" runat="server" TabIndex="3" Height="20px" Width="110px" DataSourceID="sdsDrayType" TextField="DrayTypeDesc" ValueField="DrayType" DisplayMode="DropDownList" DropDownOrientation="Default" DropDownContainerHeight="500px" DropDownContainerWidth="300px" EnableMultipleSelection="true" MultipleSelectionType="Checkbox" EnableDropDownAsChild="true" ClientEvents-Initialize="setZIndex" DropDownItemBinding-TextField="DrayTypeDesc" DropDownItemBinding-ValueField="DrayType" > </ig:WebDropDown></td>
<asp:SqlDataSource ID="sdsDrayType" runat="server" ConnectionString="<%$ ConnectionStrings:csDrayage %>" SelectCommand="SELECT DISTINCT [Dray_Type] AS DrayType, [Dray_Type_Desc] AS DrayTypeDesc FROM [DrayType] WHERE ([Deleted_Id] IS NULL) ORDER BY [Dray_Type_Desc]"></asp:SqlDataSource>
function setZIndex(sender, args) { sender.behavior.set_zIndex(1000000);}
Hello davefevold ,
I'm just following up to see if you need any further assisatnce with this issue. If so let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
I have decided to use the checkboxlist because it works best for my solution. Thanks.
I'm following up to see if you might still need assistance with this approach. If so please let me know.
Hello,
It would be very helpful if you could provide a sample with the issue represented so that I can further research this.
Maybe the issue is caused by the environment you’re running. Could you tell me which version of Infragistics controls you’re using, which OS you’re using and on which browsers and their versions you’ve encountered the issue. Also does the previously provided sample work as expected on your environment?
I’m looking forward to your reply.
Maya, I've tried following your example and other examples in the forum...still, I'm unable to make the control "Drop down". I may have to pursue other options.