Hello,
how can i use a checkboxlist in the grid?
I have created a grid with inside a EditItemTemplate:
When I create a new record i need this format in the database field "TypeObjectTypes" from the selected items from the CheckBoxList:
"DynamicScrolltext,FreeText".
How can i save the selected items in the DataBase and which event can i use for this?
When i show the EditItemTemplate, how can i select the right items in the CheckBoxList from this format ("DynamicScrolltext,FreeText")?
Best regardsReiner
how can i use a checkboxlist in the grid?
I have created a grid with inside a EditItemTemplate:
<
telerik:GridTemplateColumn
DataField
=
"TypeObjectTypes"
FilterControlAltText
=
"Filter TypeObjectTypes column"
HeaderText
=
"Object Type"
UniqueName
=
"TypeObjectTypes"
>
<
EditItemTemplate
>
<
asp:CheckBoxList
ID
=
"CblObjectTypes"
runat
=
"server"
>
<
asp:ListItem
Value
=
"DynamicImage"
>Dynamic Image</
asp:ListItem
>
<
asp:ListItem
Value
=
"StaticURL"
>Static URL</
asp:ListItem
>
<
asp:ListItem
>Static Text</
asp:ListItem
>
<
asp:ListItem
Value
=
"DynamicScrolltext"
>Dynamic Scrolltext</
asp:ListItem
>
<
asp:ListItem
Value
=
"FreeText"
>Free Text</
asp:ListItem
>
<
asp:ListItem
>Object List</
asp:ListItem
>
</
asp:CheckBoxList
>
</
EditItemTemplate
>
<
ItemTemplate
>
<
asp:Label
ID
=
"TypeObjectTypesLabel"
runat
=
"server"
Text='<%# Eval("TypeObjectTypes") %>'></
asp:Label
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
...
</
telerik:RadGrid
>
<
asp:ObjectDataSource
ID
=
"ObjectDataSource2"
runat
=
"server"
DeleteMethod
=
"DeleteLayoutType"
InsertMethod
=
"InsertLayoutType"
SelectMethod
=
"GetLayoutTypes"
TypeName
=
"LayoutTypesBLL"
UpdateMethod
=
"UpdateLayoutType"
>
<
DeleteParameters
>
<
asp:Parameter
Name
=
"TypeID"
Type
=
"Int32"
/>
</
DeleteParameters
>
<
InsertParameters
>
<
asp:Parameter
Name
=
"TypeName"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeText"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeObjectTypes"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeMenu"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypePriority"
Type
=
"Int32"
/>
<
asp:Parameter
Name
=
"ProjectID"
Type
=
"Int64"
/>
</
InsertParameters
>
<
UpdateParameters
>
<
asp:Parameter
Name
=
"TypeName"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeText"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeObjectTypes"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypeMenu"
Type
=
"String"
/>
<
asp:Parameter
Name
=
"TypePriority"
Type
=
"Int32"
/>
<
asp:Parameter
Name
=
"ProjectID"
Type
=
"Int64"
/>
<
asp:Parameter
Name
=
"TypeID"
Type
=
"Int32"
/>
</
UpdateParameters
>
</
asp:ObjectDataSource
>
When I create a new record i need this format in the database field "TypeObjectTypes" from the selected items from the CheckBoxList:
"DynamicScrolltext,FreeText".
How can i save the selected items in the DataBase and which event can i use for this?
When i show the EditItemTemplate, how can i select the right items in the CheckBoxList from this format ("DynamicScrolltext,FreeText")?
Best regardsReiner