This is a migrated thread and some comments may be shown as answers.

rad window user control in grid column

2 Answers 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 18 Jul 2008, 10:03 PM
Hi all,

I have an user control which have a textbox and a button, when i clicked the button it opens a Rad window that returns a value to the textbox.

I need to add this control in my grid, so I have my tamplate column and in the item template i have a label that displays a value of the datasource, but in editing mode i need to display the UC that i described at the top. here is my column code:
<telerik:GridTemplateColumn HeaderText="Name M" 
SortExpression="NameM" UniqueName="NameM"
  EditFormColumnIndex="1">
      <HeaderStyle Width="80px" />
      <ItemTemplate>
           <asp:Label runat="server" ID="lblName"
Text='<%# Eval("Name") %>'>
</asp:Label>
      </ItemTemplate>
  <EditItemTemplate>
           <uc1:TextboxMaster ID="TextboxMaster1" runat="server" />
      </EditItemTemplate>
</telerik:GridTemplateColumn>

The label shows the correct value, but when i enter in editing mode it shows the control, but it didnt works, when i click the button it looks like if an event ocurrs but the window doesnt display. Also if i add the control outside the grid it works fine, what could be the problem??? ....

also i tried with :         

<EditFormSettings UserControlName="/Modules/TextboxMaster.ascx"
EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn2"></EditColumn>

</EditFormSettings>
but i've got the same problem

thanks for all i really appreciate your help

2 Answers, 1 is accepted

Sort by
0
Kiara
Top achievements
Rank 1
answered on 21 Jul 2008, 02:54 PM
daniel, take this example as a started and build your solution over it:

http://www.telerik.com/support/kb/article/b454K-gmb-b454T-cba-b454c-cba.aspx

I did that in a couple of my projects and everything seems to work fine.

Kiara
0
Daniel
Top achievements
Rank 1
answered on 21 Jul 2008, 11:33 PM
Hi Kiara, Richard and thanks for the reply,

I tried Kiaras solution but sometimes i want to edit the info in the current grid, thats why i have the UC. The only option for this is editing the info in other window, there is a way for use an UC in the grid?...

Other thing is that after i open the window (it need to be modal), in the edition or inserting form i have more controls that would open another modal window and it doesn works.


And for Richard´s solution the problem is that inside the control i have a  button that fires the event to open the window, so i dont know how can i set the property to do this, because the buttons event doesnt works.

i really appreciate your help
Tags
Grid
Asked by
Daniel
Top achievements
Rank 1
Answers by
Kiara
Top achievements
Rank 1
Daniel
Top achievements
Rank 1
Share this question
or