|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
I have been using the Grid for a while now, and am finding it a very useful control.
I am finding one major deficiency, however, when using the Grid for data editing. I have a requirement on many of my pages to dynamically enable/disable cells within the grid during data binding. Although I am able to achieve this behaviour simply by writing appropriate html via the StaticColumn, I now require this behaviour on the DateTimeColumn.
Is there any way around this problem? By defining my own custom column maybe? Help would be really appreciated.
Regards, Phil
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You can handle the GridColumn's ClientSideBeginEdit and return false from your handler to prevent a cell entering edit mode. That allows you to enable/disable editing on cell basis. You can also use GridCell.overrideStyle to set CSS on cell basis. This maybe useful if you need to "gray out" a cell. overrideStyle is often used together with parent child CSS selector because the style you set would be on the Grid cell, which is the parent elements of the actual element you want to apply styles upon. The following post has more details about this: http://www.essentialobjects.com/forum/postst3177_Grid-checkbox-column-I-need-to-disable-checkbox-on-one-cell.aspxHope this helps. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi,
Thanks for the response. I am not sure how ClientSideBeginEdit can help me here. This can only be used in FullRow mode, and therefore can only prevend editing of an entire row. I need to control editing on a cell by cell basis.
Phil
|
|
Rank: Advanced Member Groups: Member
Joined: 8/24/2007 Posts: 130
|
Hi, I am also experiencing a second issue. I would like to control the appearance of the DatePicker within a DateTimeColumn. I have attempted to do this using the ColumnTemplate, however this seems to have no effect on the DatePicker. In the example below, the calendar should be rendered with a silver background and a red border, however, this seems to be ignored.
Code: HTML/ASPX
<eo:Grid ID="availableItems" Width="380px" Height="180px" runat="server" KeyField="TopicID"
ColumnHeaderDescImage="00050105" ColumnHeaderAscImage="00050104"
GoToBoxVisible="True" GridLines="Both" BorderColor="#7F9DB9"
GridLineColor="220, 223, 228" ColumnHeaderDividerImage="00050103" Font-Names="Tahoma"
Font-Size="8.75pt" BorderWidth="1px" FullRowMode="False">
<ColumnTemplates>
<eo:DateTimeColumn>
<DatePicker DayHeaderFormat="FirstLetter" DayCellHeight="16" DisabledDates="" TitleLeftArrowImageUrl="DefaultSubMenuIconRTL"
OtherMonthDayVisible="True" DayCellWidth="19" TitleRightArrowImageUrl="DefaultSubMenuIcon"
ControlSkinID="None" SelectedDates="">
<CalendarStyle CssText="background-color: silver; border-right: red 1px solid; padding-right: 4px; border-top: red 1px solid; padding-left: 4px; font-size: 9px; padding-bottom: 4px; border-left: red 1px solid; padding-top: 4px; border-bottom: #7f9db9 1px solid; font-family: tahoma">
</CalendarStyle>
</DatePicker>
</eo:DateTimeColumn>
</ColumnTemplates>
<Columns>
<eo:DateTimeColumn HeaderText="Date" DataField="StartDate">
</eo:DateTimeColumn>
</Columns>
</eo:Grid>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
ClientSideBeginEdit is available on GridColumn and occurs on cell level. This is not the same as ClientSideBeforeEditItem, which is on Grid and occurs on item level.
The DatePicker issue is a bug, we are looking into it and should be able to fix it in our next release.
Thanks!
|
|