Hi , I have set all the properties, But still click on the row and cell doesn't make selection .. Please help.
<Infragrid:WebDataGrid ID="UserGroupDetails" AutoGenerateColumns="false" runat="server"
OnInitializeRow="UserGroupDetails_InitializeRow" EnableTheming="true" height="230px" EnableDataViewState="true"
EnableAjaxViewState="true" EnableAjax="false" >
<Columns>
<Infragrid:TemplateDataField Key="Description" Width="31%" >
<HeaderTemplate>Name</HeaderTemplate>
<ItemTemplate>
<asp:Image ID="UserGroupImage" runat="server" style="float: left;"></asp:Image>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Description")%>
</ItemTemplate>
</Columns>
<Behaviors>
<Infragrid:Selection CellClickAction="Row" RowSelectType="Multiple">
</Infragrid:Selection>
<Infragrid:RowSelectors>
</Infragrid:RowSelectors>
<Infragrid:Activation>
</Infragrid:Activation>
</Behaviors>
Could you provide more details about what you are doing on the server, particularly in your InitializeRow event and where you are setting the grid's data source? Using the markup that you have provided I was not able to reproduce this behavior. When I click on a row it is selected as expected. Please see my attached sample and let me know if you are able to reproduce the behavior in the sample.
Hi Jason,
Thanks for the response. I pasted the databinding , aspx file and Row_Initialize code. It shows the Select column on the grid but by clicking on the doesn't select the row or highlight the row.
protected void dgBudgetApprovalAlerts_InitializeRow(object sender, Infragistics.Web.UI.GridControls.RowEventArgs e)
{
int alertKey;
GridRecordItem currentCellItem = e.Row.Items.FindItemByKey("Action");
Label hdnActivityType = (Label)currentCellItem.FindControl("hdnActivityType");
string activityType = PWWebHelper.GetWebSafeTrimmedString(hdnActivityType.Text);
if (activityType == PWWebHelper.GetWebSafeTrimmedString(ActivityType.Medical))
Label hdnAlertKey = (Label)currentCellItem.FindControl("hdnAlertKey");
alertKey = PWWebHelper.GetWebSafeInt(hdnAlertKey.Text);
RadioButtonList Action = (RadioButtonList)currentCellItem.FindControl("Actions");
Action.Items[0].Attributes.Add("onclick", "return CaptureApproveClick(" + alertKey + "," + e.Row.Index + ");");
Action.Items[1].Attributes.Add("onclick", "return CaptureDenyClick(" + alertKey + "," + e.Row.Index + ");");
}
ASPX page:
<Infragrid:WebDataGrid ID="dgBudgetApprovalAlerts" runat="server" Width="100%"
OnColumnSorted="dgBudgetApprovalAlerts_SortColumn"
OnInitializeRow="dgBudgetApprovalAlerts_InitializeRow" EnableTheming="true" AutoGenerateColumns="false">
<Infragrid:TemplateDataField Key="ActivityNumber" Width="15%" Header-Tooltip="Sort by ActivityNumber">
<HeaderTemplate>
Activity #</HeaderTemplate>
<div style="word-wrap: break-word; padding-right: 1px;">
<asp:HyperLink ID="ActivityNumber" runat="server" Target="_top" NavigateUrl='<%# FormatUrl(DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityNumber"), DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityType"))%>'>
<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityIdentity")%>
</asp:HyperLink><br />
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "StartDate")%>
</div>
</Infragrid:TemplateDataField>
<Infragrid:TemplateDataField Key="BrandDisease" Width="15%" Header-Tooltip="Sort by BrandDisease">
Brand/Disease</HeaderTemplate>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "BrandDisease")%>
<Infragrid:TemplateDataField Key="AddedBy" Width="15%" Header-Tooltip="Sort by Added By">
Added By</HeaderTemplate>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AddedBy")%>
<Infragrid:TemplateDataField Key="ActivityType" Width="15%" Header-Tooltip="Sort by Activity Type">
Activity Type</HeaderTemplate>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityType")%>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ConsultantName")%>
<Infragrid:TemplateDataField Key="TotalBudget" Width="15%" Header-Tooltip="Sort by TotalBudget">
Total Budget</HeaderTemplate>
<div style="text-align:right">
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "TotalBudget")%>
<Infragrid:TemplateDataField Key="ToBeApprovedBy" Width="15%" Header-Tooltip="Sort by ToBeApprovedBy">
To Be Approved By</HeaderTemplate>
<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ToBeApprovedBy")%>
<Infragrid:TemplateDataField Key="Action" Width="15%">
Action</HeaderTemplate>
<asp:RadioButtonList ID="Actions" runat="server" RepeatDirection="Vertical" CssClass="infragrid-radio"
Enabled='<%# Convert.ToBoolean(DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "CanBeApproved"))%>'>
<asp:ListItem Value="1">Approve</asp:ListItem>
<asp:ListItem Value="2">Deny</asp:ListItem>
</asp:RadioButtonList>
<div id="approvalReasonDiv<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>"
style="display: none">
<%# FormatApprovalReasonLink(DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey"))%>
<div id="denialReasonDiv<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>"
<%# FormatDenialReasonLink(DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey"))%>
<input id="HdnApr<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>"
name="HdnApr<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>"
type="hidden" />
<input id="HdnDen<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>"
name="HdnDen<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem,"AlertKey")%>"
<input id="HdnFile<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem,"AlertKey")%>"
name="HdnFile<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem,"AlertKey")%>"
<input id="HdnClick<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem,"AlertKey")%>"
name="HdnClick<%#DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem,"AlertKey")%>"
<asp:Label ID="hdnActivityKey" Visible="false" runat="server" Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityNumber")%>'></asp:Label>
<asp:Label ID="ApprovalLevel" Visible="false" runat="server" Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ApprovalLevel")%>'></asp:Label>
<asp:Label ID="hdnAlertKey" Visible="false" runat="server" Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "AlertKey")%>'></asp:Label>
<asp:Label ID="hdnConsultantkey" Visible="false" runat="server" Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Consultantkey")%>'></asp:Label>
<asp:Label ID="hdnActivityType" Visible="false" runat="server" Text='<%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "ActivityType")%>'></asp:Label>
<Infragrid:Sorting Enabled="true" SortingMode="Single" AscendingImageUrl="" AscendingImageAltText=""
DescendingImageAltText="" DescendingImageUrl="">
<ColumnSettings>
<Infragrid:SortingColumnSetting ColumnKey="Action" Sortable="false" />
</ColumnSettings>
</Infragrid:Sorting>
Datasource binding:
dgBudgetApprovalAlerts.DataSource = m_ResultDataSet;
dgBudgetApprovalAlerts.DataBind();
Enter.Visible = true;
Pager1.Visible = true;
dgBudgetApprovalAlerts.Visible = true;
Ramya,
Thank you for this code. However, using it I am still unable to reproduce the behavior you describe. I copied everything and put it in to my sample with the exception of your helper methods and row selection works as expected. Are you able to reproduce the behavior you are seeing in this sample? If so, please provide me with the steps that you follow. If not, do you see further differences between my sample and your application? Which version of the Infragistics product are you using? Does this behavior reproduce in a specific browser?
Jason,
The row selection problem still is not resolved.
Are you able to reproduce the behavior you are seeing in this sample? If so, please provide me with the steps that you follow. If not, do you see further differences between my sample and your application?
We have tested in the IE 11 Browser.
The differences between our application vs sample provided
1) Webscriptmanager tag is not present. Please confirm whether we need add that too..
2) ig_res folder is not belongs to version that we are using. I tried that by changing the latest version. If I, the grid styling are different. So it reverted back.
3) In the beheviour section, add more properties that mentioned in the infragistics site.
Which version of the Infragistics product are you using?
Infragistics webdatagrid 13.2.20132.1003
Does this behavior reproduce in a specific browser?
The selection beheviour is not working IE 11
ASPX Page:
<Infragrid:WebDataGrid ID="UserGroupDetails" AutoGenerateColumns="false" runat="server" Width="100%"
OnInitializeRow="UserGroupDetails_InitializeRow" EnableTheming="true" height="230px" EnableDataViewState="true" EnableAjaxViewState="true" EnableAjax="false" HeaderCaptionCssClass="removecursor" AjaxIndicator-Enabled="False" > <Columns> <Infragrid:TemplateDataField Key="Description" Width="31%" > <HeaderTemplate>Name</HeaderTemplate> <ItemTemplate> <asp:Image ID="UserGroupImage" runat="server" style="float: left;"></asp:Image> <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Description")%> </ItemTemplate> </Infragrid:TemplateDataField>
<Infragrid:TemplateDataField Width="15%" Key="System"> <ItemTemplate> <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "System")%> </ItemTemplate> <HeaderTemplate> System </HeaderTemplate> </Infragrid:TemplateDataField> <Infragrid:TemplateDataField Width="28%" Key="Email"> <ItemTemplate> <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "Email")%> </ItemTemplate> <HeaderTemplate> Email Address </HeaderTemplate> </Infragrid:TemplateDataField> <Infragrid:TemplateDataField Key="IsUser" Hidden="true"> <ItemTemplate> </ItemTemplate> <HeaderTemplate> IsUser </HeaderTemplate> </Infragrid:TemplateDataField>
<Infragrid:TemplateDataField Key="UserKey" Hidden="true"> <ItemTemplate> </ItemTemplate> <HeaderTemplate> UserKey </HeaderTemplate> </Infragrid:TemplateDataField> <Infragrid:TemplateDataField Key="City" Width="12%"> <ItemTemplate> <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "City")%> </ItemTemplate> <HeaderTemplate> City </HeaderTemplate> </Infragrid:TemplateDataField>
<Infragrid:TemplateDataField Key="State" Width="10%"> <ItemTemplate> <%# DataBinder.Eval(((Infragistics.Web.UI.TemplateContainer)Container).DataItem, "State")%> </ItemTemplate> <HeaderTemplate> State </HeaderTemplate> </Infragrid:TemplateDataField> </Columns> <Behaviors> <Infragrid:Activation Enabled="true" /> <Infragrid:Selection RowSelectType="Multiple" Enabled="true" /> <Infragrid:RowSelectors RowNumbering="false" Enabled="true" /> </Behaviors>
Thanks
Mani
The issue resolved.
The problem was I was using IE 11 and It was WebdataChooser. I just changed to WebDatapicker. I really don't know how they are related but it selection of row started working after that. Thanks For the help.