Hi there,
Been looking around lately... couldn't find a way to do it clean.
I have the insert row in mode "InPlace" and one column has a checkbox and other column has a datepicker:
I have Registered the ItemCreated event and got something like this:
So actually trying to setup the visibility of the datepicker in other column if the checkbox is checked.
At first when itemcreated is hit, the datepicker is not visible since of course, the checkbox is unchecked.
But once i click it to check it, partial postback comes, and it's still considered unchecked. But it's checked in the interface!
So wondering if you guys can hint me up? is there something i could do to make it work server side?
Thanks
Been looking around lately... couldn't find a way to do it clean.
I have the insert row in mode "InPlace" and one column has a checkbox and other column has a datepicker:
<telerik:GridTemplateColumn DataField="IN_RESLN" HeaderText="Résolu" UniqueName="IN_RESLN" SortExpression="IN_RESLN"FilterControlWidth="100px" HeaderStyle-Width="120px"> <ItemTemplate> <asp:CheckBox ID="CheckResolution" runat="server" Checked='<%#If(Eval("IN_RESLN") = "True", True, False)%>' Enabled="false" /> </ItemTemplate> <InsertItemTemplate> <asp:CheckBox ID="InsertCheckResolution" runat="server" AutoPostBack="True" /> </InsertItemTemplate></telerik:GridTemplateColumn><telerik:GridTemplateColumn DataField="DA_RESLN" HeaderText="Date de résolution" UniqueName="DA_RESLN" SortExpression="DA_RESLN"ShowFilterIcon="true" HeaderStyle-Width="120px" FilterControlWidth="100px"AutoPostBackOnFilter="true" FilterDelay="2000" CurrentFilterFunction="Contains"> <ItemTemplate> <asp:Label ID="LabelDateResolution" Text='<%#Eval("DA_RESLN", "{0:yyyy-MM-dd}")%>' runat="server"></asp:Label> </ItemTemplate> <FilterTemplate> <telerik:RadDatePicker runat="server" ID="DatePickerDateResolution"></telerik:RadDatePicker> </FilterTemplate> <EditItemTemplate> <telerik:RadDatePicker runat="server" ID="DatePickerDateResolution"></telerik:RadDatePicker> </EditItemTemplate> <InsertItemTemplate> <telerik:RadDatePicker runat="server" ID="DatePickerDateResolution"></telerik:RadDatePicker> <asp:CustomValidator ID="DatePickerDateResolution_Validator" runat="server" ErrorMessage="*" ControlToValidate="DatePickerDateResolution" OnServerValidate="DatePickerDateResolution_Validator_ServerValidate"></asp:CustomValidator> </InsertItemTemplate></telerik:GridTemplateColumn>I have Registered the ItemCreated event and got something like this:
If TypeOf e.Item Is GridDataInsertItem Then Dim chkResln As CheckBox = DirectCast(insertItem("IN_RESLN").FindControl("InsertCheckResolution"), CheckBox) Dim dtePickerDaResln As RadDatePicker = DirectCast(insertItem("DA_RESLN").FindControl("DatePickerDateResolution"), RadDatePicker) Dim dtePickerDaReslnValidator As CustomValidator = DirectCast(insertItem("DA_RESLN").FindControl("DatePickerDateResolution_Validator"), CustomValidator) dtePickerDaResln.Visible = chkResln.Checked dtePickerDaReslnValidator.Visible = chkResln.CheckedEnd IfSo actually trying to setup the visibility of the datepicker in other column if the checkbox is checked.
At first when itemcreated is hit, the datepicker is not visible since of course, the checkbox is unchecked.
But once i click it to check it, partial postback comes, and it's still considered unchecked. But it's checked in the interface!
So wondering if you guys can hint me up? is there something i could do to make it work server side?
Thanks