Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
30
Restrict Row Selection on mouse over
posted

when i move clicked mouse on any row it selects the row,

i want to select only those row(s) on which i clicked mouse,

Actually i implemented drag drop within grid thats why it should not happen in such a way because when i drag any item it selects all rows on which i moved the mouse

following is my code

<ig:WebDataGrid ID="gridproductsource" DataKeyFields="catalogue_category_product_code"  

runat="server" AutoGenerateColumns="false" StyleSetName="Office2007Silver" EnableDataViewState="true"  

EnableAjax="false" Width="1071px" Visible="false" ItemCssClass="GridRow">

<EmptyRowsTemplate>

<div id='proddest0' class="dvdroppable" style="width: 100%; height: 100%;">

                                                                    No Data Found

</div>

</EmptyRowsTemplate>

<Columns>

<ig:BoundDataField DataFieldName="catalogue_category_product_code" Key="catalogue_category_product_code"

Header-Text="CatalogueCategoryProductCode" HtmlEncode="false" Width="0%" Header-CssClass="gridheader"

Hidden="true" VisibleIndex="10" />

<ig:TemplateDataField Key="product_code" Width="15%" CssClass="igg_TextAlignCenter" Header-Text="Code" Header-CssClass="gridheader">

<ItemTemplate>

<div id="dvProduct" runat="server">

<div id='proddest<%#Eval("product") %>' class="dvdroppable dvDraggable" style="width: 100%;

height: 100%; cursor: pointer; white-space: nowrap;">

<%# Eval("product_description")%>

</div>

</div>

</ItemTemplate>

</ig:TemplateDataField>

<ig:BoundDataField DataFieldName="long_desc" Key="long_desc" Header-Text="Long Desc"

HtmlEncode="false" Width="35%" Header-CssClass="gridheader" />

<ig:BoundDataField DataFieldName="alpha" Key="alpha" Header-Text="Alpha" HtmlEncode="false" Width="9%" Header-CssClass="gridheader" />

<ig:BoundDataField DataFieldName="supplier" Key="supplier" Header-Text="Supplier"

HtmlEncode="false" Width="9%" Header-CssClass="gridheader" Hidden="true" />

<ig:BoundDataField DataFieldName="brand" Key="brand" Header-Text="Brand" HtmlEncode="false"

Width="9%" Header-CssClass="gridheader" />

<ig:BoundDataField DataFieldName="range" Key="range" Header-Text="Range" HtmlEncode="false" Width="9%" Header-CssClass="gridheader" />

                                                               

<ig:BoundDataField DataFieldName="type" Key="type" Header-Text="Type" HtmlEncode="false"

                                                                   

Width="7%" Header-CssClass="gridheader" />

                                                               

<ig:BoundDataField DataFieldName="color" Key="color" Header-Text="Colour" HtmlEncode="false"

                                                                   

Width="7%" Header-CssClass="gridheader" />

                                                               

<ig:BoundDataField DataFieldName="material" Key="material" Header-Text="Material"

                                                                   

HtmlEncode="false" Width="9%" Header-CssClass="gridheader" />

                                                               

<ig:TemplateDataField Width="0%" Hidden="true" Key="StandardPrice" Header-Text="<center>Retail Price (AED)</center>">

                                                                   

<ItemTemplate>

                                                                       

<center>

                                                                           

<asp:Label ID="txtStandardPrice" runat="server" Text='<%#Eval("standard_price") %>'

                                                                               

Style="width: 70px;" MaxLength="10" onkeypress="return checkforselectall()"></asp:Label>

                                                                       

</center>

                                                                   

</ItemTemplate>

                                                               

</ig:TemplateDataField>

                                                               

<ig:TemplateDataField Width="0%" Hidden="true" Key="standard_price" Header-Text="standard_price">

                                                                   

<ItemTemplate>

                                                                       

<asp:TextBox ID="txtStandardPrice" runat="server" Text='<%#Eval("standard_price") %>'

                                                                           

Style="width: 70px;" MaxLength="10"></asp:TextBox>

                                                                   

</ItemTemplate>

                                                               

</ig:TemplateDataField>

                                                               

<ig:BoundDataField Width="0%" DataFieldName="row_number" Key="row_number" Header-Text="RowNumber"

                                                                   

HtmlEncode="false" Header-CssClass="gridheader" Hidden="true" />

                                                               

<ig:BoundDataField Width="0%" DataFieldName="parent_code" Key="parent_code" Header-Text="ParentCode"

                                                                   

HtmlEncode="false" Header-CssClass="gridheader" Hidden="true" />

                                                               

<ig:BoundDataField Width="0%" DataFieldName="sort_order" Key="sort_order" Header-Text="sort_order"

                                                                   

HtmlEncode="false" Header-CssClass="gridheader" Hidden="true" />

                                                           

</Columns>

                                                           

<Behaviors>

                                                               

<ig:Activation Enabled="true" >

                                                               

</ig:Activation>

                                                               

<ig:ColumnResizing Enabled="true" />

                                                               

<ig:Selection RowSelectType="Multiple" CellClickAction="Row" >

                                                               

</ig:Selection>

                                                               

<ig:Sorting SortingMode="Single" Enabled="false" AscendingImageUrl="../images/sort-up.png"

                                                                   

DescendingImageUrl="../images/sort-down.png">

                                                               

</ig:Sorting>

                                                           

</Behaviors>

                                                           

<ClientEvents Click="gridproductsource_RowClicked" />

                                                       

</ig:WebDataGrid>