Hi everybody,
I have a RadGrid which has checkbox as GridTemplateColumn. When the checkbox is clicked, I want to add a new item to a RadListbox.
I use the click event and add RadListBoxItems to my RadListbox, but the new item is not rendered in browser. I can also add a new item using a button's click event. After button click event, I can see both newly added items. So the problem is, a new item cannot be seen after checkbox click event.
Am I doing something wrong or it this a bug?
(Telerik assembly version: v4.0.30319)
Below is the related code:
After the checkbox checked changed event, I cannot see the new item added. (Not rendered.)
I tried many things but no hope. Any help is appreciated.
Thanks.
Bahadır
I have a RadGrid which has checkbox as GridTemplateColumn. When the checkbox is clicked, I want to add a new item to a RadListbox.
I use the click event and add RadListBoxItems to my RadListbox, but the new item is not rendered in browser. I can also add a new item using a button's click event. After button click event, I can see both newly added items. So the problem is, a new item cannot be seen after checkbox click event.
Am I doing something wrong or it this a bug?
(Telerik assembly version: v4.0.30319)
Below is the related code:
<
telerik:RadGrid
ID
=
"rgStudentList"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
CellSpacing
=
"0"
Enabled
=
"false"
GridLines
=
"None"
GroupingSettings-CaseSensitive
=
"false"
OnItemCommand
=
"rgOgrenciListesi_ItemCommand"
OnNeedDataSource
=
"rgOgrenciListesi_NeedDataSource"
SortingSettings-SortToolTip
=
""
>
<
GroupingSettings
CaseSensitive
=
"False"
/>
<
SortingSettings
SortToolTip
=
""
/>
<
MasterTableView
AllowPaging
=
"true"
AutoGenerateColumns
=
"False"
DataKeyNames
=
"No"
PageSize
=
"10"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
>
<
HeaderStyle
Width
=
"20px"
/>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
>
<
HeaderStyle
Width
=
"20px"
/>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
AllowFiltering
=
"true"
AllowSorting
=
"true"
AutoPostBackOnFilter
=
"true"
CurrentFilterFunction
=
"StartsWith"
DataField
=
"TCKimlikNo"
FilterControlAltText
=
"Filter column1 column"
>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Seç"
AllowFiltering
=
"false"
>
<
ItemTemplate
>
<
asp:CheckBox
ID
=
"chkI"
runat
=
"server"
AutoPostBack
=
"true"
OnCheckedChanged
=
"chkI_CheckedChanged"
/>
</
ItemTemplate
>
<
HeaderTemplate
>
<
asp:CheckBox
ID
=
"chkH"
runat
=
"server"
AutoPostBack
=
"true"
OnCheckedChanged
=
"chkH_CheckedChanged"
/>
</
HeaderTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
<
NoRecordsTemplate
>
<
center
>
blah blah</
center
>
</
NoRecordsTemplate
>
</
MasterTableView
>
<
FilterMenu
EnableImageSprites
=
"true"
>
</
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
protected
void
chkI_CheckedChanged(
object
sender, EventArgs e)
{
CheckBox chkI = sender
as
CheckBox;
String student= ((GridDataItem)chkI.Parent.Parent).Cells[3].Text;
rlbOgrNo.Items.Add(
new
RadListBoxItem(student, student));
}
After the checkbox checked changed event, I cannot see the new item added. (Not rendered.)
I tried many things but no hope. Any help is appreciated.
Thanks.
Bahadır