Hi,
do u pls have a sample code I can use for this purpose:
When I click a specific cell in my grid, I want the cell to change into a Texbox multiline mode (initially it's regular label)
The reason is that I want to add some client side event so the user won t be ablle to type more than 256 caracters.
I use this code but not working, it does not switch the Description cell into a textbox :
<%--<ig:Selection RowSelectType="Single" Enabled="true" CellClickAction="Cell"></ig:Selection>--%>
<Behaviors>
<ig:EditingCore> <Behaviors> <ig:CellEditing> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="Description" /> <ig:EditingColumnSetting ColumnKey="projection" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="pointe" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="id" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="scheduled" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="offsetThreshold" ReadOnly="true" /> <ig:EditingColumnSetting ColumnKey="usageThreshold" ReadOnly="true" /> </ColumnSettings> <%--<CellEditingClientEvents EnteredEditMode="enteredEditMode" /> --%> </ig:CellEditing> <ig:RowDeleting Enabled="true" /> </Behaviors> </ig:EditingCore> <ig:Activation> </ig:Activation> <%--<ig:Selection RowSelectType="Single" Enabled="true" CellClickAction="Cell"></ig:Selection>--%> <%-- <ig:RowSelectors></ig:RowSelectors>--%>
</Behaviors> <EditorProviders> <ig:TextEditorProvider ID="PerfIndicatorContent_MultilineEditor"> <EditorControl runat="server" ID="editorm" TextMode="MultiLine"> <MultiLine Overflow="Scroll" Rows="3" /> </EditorControl> </ig:TextEditorProvider> </EditorProviders>
I appreciate ur help :)
Hi rtutus,
If you mean by 'initially it's regular label' that it is a TemplateDataField, then it is not possible to enter edit mode. Those columns are not editable.
regards,
David Young
Hi, it does not have to be a bounddatafield. I am flexibile to use any kind of item. Can I like use a template item: label for display mode and textbox for editing mode, like we do in regular asp.net gridview ???
The real purpose is that I want my entered texts by the user to be available automatically in the datasource (sersson datatable), without me going manually iterating through the webdatagrid to get the textbox control by Id from the template item of each row, then extract the values entered by user...etc
All that process works fine if I only use a bounddatafield.
What s a good practice u guys use for this ??
Thank u :)