Is it possible to bind data to an individual cell? Right now I'm using the WebGrid as a sort of chart, but some individual cells need live data at times. I could do it with a sloppy old table and labels in every cell that I bind to data, but WebGrid is so much nicer for what we need.
Here's the grid's code. I currently don't have it bound to anything yet.
<igmisc:webasyncrefreshpanel id="WebAsyncRefreshPanel1" runat="server" height="100%" width="100%"><igtbl:UltraWebGrid id="UltraWebGrid1" runat="server" DataMember="DefaultView" ><Rows> <igtbl:UltraGridRow> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Contact Information"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="ContactInfo_Baseline" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="5/6/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="6/12/08"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Contact Information Follow Up"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="401"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="2"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/11/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/12/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="5/12/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Demographic"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="402"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="1"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/24/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/24/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Socio-Demographic"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="403"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="1"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Situational Transitions"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="401"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="1"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="5/3/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="5/6/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="6/12/08"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Situational Transitions Follow Up"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="401"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="2"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/11/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/12/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="5/12/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""> <Cells> <igtbl:UltraGridCell TargetURL="" Text="Diabetes Regimen"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="402"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="1"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="5/24/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="5/24/08"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""> <Cells> <igtbl:UltraGridCell TargetURL="" Text="BDI-II"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="Baseline" Text="403"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="3month" Text="1"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="6month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="9month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="12month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="15month" Text="Add New"></igtbl:UltraGridCell> <igtbl:UltraGridCell TargetURL="" Key="18month" Text="Add New"></igtbl:UltraGridCell> </Cells> </igtbl:UltraGridRow> <AddNewRow View="NotSet" Visible="NotSet"> </AddNewRow></igtbl:UltraGridBand></Bands><DisplayLayout Version="3.00" SelectTypeRowDefault="Extended" Name="UltraWebGrid1" AllowSortingDefault="No" ColWidthDefault="" RowHeightDefault="20px" TableLayout="Fixed" CellClickActionDefault="RowSelect" HeaderClickActionDefault="SortSingle" BorderCollapseDefault="Separate" StationaryMarginsOutlookGroupBy="True" AllowDeleteDefault="No" AllowUpdateDefault="No" allowcolsizingdefault="Free" ><FrameStyle BackColor="White" BorderColor="#E6E6E6" BorderWidth="1px" BorderStyle="Solid" Font-Names="Trebuchet MS,Verdana,Arial,sans-serif" ></FrameStyle> <Images> <CurrentRowImage Url="/ig_common/images/Themes/Aero/ig_CurrentRow.gif" /> <CollapseImage Url="/ig_common/images/Themes/Aero/ig_treeArrowMinus.png" /> <ExpandImage Url="/ig_common/images/Themes/Aero/ig_treeArrowPlus.png" /> <FixedHeaderOffImage Url="/ig_common/images/Themes/Aero/ig_tblFixedOff.gif" /> <FixedHeaderOnImage Url="/ig_common/images/Themes/Aero/ig_tblFixedOn.gif" /> </Images> <Pager> <PagerStyle BackColor="Red" BorderStyle="Solid" BorderWidth="1px"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </PagerStyle> </Pager> <EditCellStyleDefault BackColor="White" BorderStyle="None" Font-Names="Trebuchet MS,Verdana,Arial,sans-serif" > <Margin Bottom="0px" Left="4px" Right="0px" Top="0px" /> <Padding Bottom="0px" Left="2px" Right="0px" Top="0px" /> </EditCellStyleDefault><FooterStyleDefault BackColor="LightGray" BorderWidth="1px" BorderStyle="Solid"><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px"></BorderDetails></FooterStyleDefault><HeaderStyleDefault HorizontalAlign="Left" BackgroundImage="/ig_common/images/Themes/Aero/grid_header_bg.jpg" Cursor="Hand" BorderStyle="None" Font-Bold="True" Font-Names="Trebuchet MS,Verdana,Arial,sans-serif" ForeColor="#555555" Height="23px" > <Padding Left="5px" /><BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px"></BorderDetails></HeaderStyleDefault> <RowSelectorStyleDefault BackColor="White" BackgroundImage="none"> </RowSelectorStyleDefault> <SelectedHeaderStyleDefault BackgroundImage="/ig_common/images/Themes/Aero/grid_header_selected_bg.jpg"> </SelectedHeaderStyleDefault> <RowStyleDefault BackColor="Window" Font-Names="Trebuchet MS,Verdana,Arial,sans-serif" Height="19px"> <Padding Left="6px" /> <BorderDetails ColorLeft="230, 230, 230" StyleLeft="Solid" WidthLeft="1px" WidthTop="0px" /> </RowStyleDefault> <GroupByRowStyleDefault BackColor="#F4FBFE"> </GroupByRowStyleDefault> <SelectedRowStyleDefault BackColor="#E0F1F9" BackgroundImage="/ig_common/images/Themes/Aero/row_selected_bg.jpg" BorderStyle="None" BorderWidth="0px" CustomRules="background-repeat: repeat-x;"> <Padding Left="7px" /> </SelectedRowStyleDefault> <GroupByBox> <BandLabelStyle BackColor="#6372D4" ForeColor="White"> </BandLabelStyle> <BoxStyle BackColor="#3C7FB1" BackgroundImage="/ig_common/images/Themes/Aero/groupBy_bg.jpg" BorderColor="Window" Font-Bold="True" ForeColor="#3C7FB1" Height="40px"> </BoxStyle> </GroupByBox> <AddNewBox Hidden="False"> <style backcolor="Window" bordercolor="InactiveCaption" borderstyle="Solid" borderwidth="1px"> <borderdetails colorleft="White" colortop="White" widthleft="1px" widthtop="1px" /> </style> <BoxStyle BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </BoxStyle> </AddNewBox><ActivationObject BorderStyle="Solid" BorderColor="204, 237, 252" BorderWidth="1px"><BorderDetails WidthLeft="0px" WidthRight="0px"></BorderDetails></ActivationObject><FilterOptionsDefault AllowRowFiltering="No" FilterUIType="HeaderIcons"><FilterDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px" Width="200px"><Padding Left="2px"></Padding></FilterDropDownStyle><FilterHighlightRowStyle BackColor="#151C55" ForeColor="White"></FilterHighlightRowStyle><FilterOperandDropDownStyle CustomRules="overflow:auto;" BackColor="White" BorderColor="Silver" BorderWidth="1px" BorderStyle="Solid" Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="11px"><Padding Left="2px"></Padding></FilterOperandDropDownStyle></FilterOptionsDefault></DisplayLayout></igtbl:UltraWebGrid></igmisc:webasyncrefreshpanel>
Hi,
Thanks very much for your feedback on this. It is indeed an interesting use case, and makes a lot of sense in live-data scenarios. Unfortunately the UltraWebGrid doesn't currently support pure per-cell data binding. You can still modify the data set on the server, and invoke a DataBind() call , or implement the InitializeDataSource UltraWebGrid event handler, but this would still mean full databinding on the whole data set.
You can use the below link to submit a feature request, and our team will be more than willing to evaluate it as soon as possible:
http://devcenter.infragistics.com/Protected/RequestFeature.aspx
Thanks,
Angel