I have a webdatagrid, but for some reason I can't get the row selectors to show up. I click on a row, or a cell, and nothing seems to appear. The little triangle selectors don't even appear. Can anyone help me out? I'm using the 2011 version.
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Width="400px" DataKeyFields="ID" AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false" > <Columns > <ig:TemplateDataField Key="ID" > <ItemTemplate> <sc:FieldRenderer runat="server" ID="FieldRenderer3" Item="<%#((Infragistics.Web.UI.TemplateContainer)Container).DataItem %> " Parameters="h=25" FieldName="Product Image" /> <sc:FieldRenderer runat="server" ID="FormDescription3" Item="<%#((Infragistics.Web.UI.TemplateContainer)Container).DataItem %>" FieldName="Product Name" /> </ItemTemplate> </ig:TemplateDataField> <ig:BoundCheckBoxField DataFieldName="ID" Key="IDField" Header-Text="Select" /> </Columns> <Behaviors> <ig:Activation Enabled="true" /> <ig:Selection RowSelectType="Single" Enabled="true" CellClickAction="Row" /> <ig:RowSelectors RowNumbering="true" Enabled="true"> <RowSelectorClientEvents RowSelectorClicked="hello" /> </ig:RowSelectors> <ig:EditingCore> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="IDField" ReadOnly="false" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:WebDataGrid>
Hi mario101,
Well, first off I'd like to point out that you do not have Selection enabled. However you do have Activation. So assuming that when you click on a cell, it is becoming active, the row selector should become active. Verify that the TH for the row selector has igg_ActiveRowSelector class applied and if there is an inner div, it should have igg_ActiveRowSelectorImage. If these are applied, it could mean you are missing those css class definitions for the background images. Please check all of that out.
regards,David Young
How do I enable selection then? Isn't that what this line is for?
I'll check to see if I'm missing the css classes.
<
ig:Selection RowSelectType="Single" Enabled="true" CellClickAction="Row" /><ig:RowSelectors RowNumbering="true" Enabled="true" ></ig:RowSelectors>
The resulting table seems to have an rowselect class attached to it:
<table cellspacing="0" cellpadding="0" border="0" style="table-layout: fixed; width: 100%; visibility: hidden" id="x:431846697.4:mkr:dataTbl.hdn"> <tbody id="x:431846697.8:mkr:rows:nw:1" class="ig_ClaymationItem igg_ClaymationItem"> <tr id="x:431846697.9:adr:0:tag:"> <th class="ig_ClaymationHeader igg_ClaymationRowSelector "> 1 </th> <td> <img src="~/media/Waspbarcode/ProductImages/LargeImages/wasp_wasplabeler_lg.ashx?h=25" alt="" width="25" height="25" /> Wasp Labeler </td> </tr>
Hello mario101,
Here I have created a sample with this theme and I am attaching it here. You can download and review it. In my case it worked fine with normal behavior. Please review it and note if I missed something.
Looking forward to hear from you.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thanks for the help! I ended up doing a test yesterday to see if maybe it was a problem with my cms, or some javascript on the page. It wasn't any of those, but placing a new datagrid on the page and changing the datasource type seemed to fix it. I'm not sure if that was what caused the issue. The last version I used is almost the exact same as the one posted above.
<ig:WebDataGrid ID="SoftwareGrid" runat="server" Width="440" DataKeyFields="ID" AutoGenerateColumns="false" ShowHeader="false" ShowFooter="false" OnRowSelectionChanged="SoftwareGrid_RowSelectionChanged"> <Columns> <ig:TemplateDataField Key="ID"> <ItemTemplate> <table> <tr> <td> <%# Eval("Product_Image")%> </td> <td> <%# Eval("Product_Name")%> </td> </tr> </table> </ItemTemplate> </ig:TemplateDataField> </Columns> <Behaviors> <ig:Activation Enabled="true" /> <ig:Selection Enabled="true" RowSelectType="Single" CellClickAction="Row"> <AutoPostBackFlags RowSelectionChanged="true" /> </ig:Selection> <ig:RowSelectors RowNumbering="false" Enabled="true"> </ig:RowSelectors> </Behaviors> </ig:WebDataGrid>
I am glad to hear that you were able to resolve your issue. For any further questions with this matter do not hesitate to contact me.