Is it possible to assign a specific custom editor control to a specific cell?
Example:
row 1
column 2 set to datetimechooser
row 2
column 2 set to textbox
row 3 column 2 set to dropdown combo..
is this possible? If it isn't, then is there another asp.net grid that can be done like this?
Hello Daryl,
Basically we have implemented "out of the box " editors for the grids / WebDataGrid / UltraWebGrid / but they are based on column level means that a particular editor is attached to a specified column. In this case I think that you will be able to achieve your goal as you use template columns and for example on InitializeRow even to get access to desired row / cell and put whatever controls you like.
I wold suggest look at the samples here: http://samples.infragistics.com/2009.2/WebFeatureBrowser/Default.aspx = > ASP.NET (AJAX Enabled = > WebGrid ).
Please refer this link for "how to" use Template column in context of UltraWebGrid Template Columns
Thank you .
I looked at the example you pointed out. Unfortunatley, like most of the code samples infragistcs has, it's pretty useless.
Some day you folks might want to create samples that run on thier own.. meaning someone can drop the code in thier project and run it. since you all have links to data stylesheets etc.. that we don't have..
it's pretty hard to try the code and play with it.
The section on columns was basic and told me stuff I already knew.
What I am attempting to do is assign different template controls to different cells in the same Column.
I can do that by using the rowinit event, but upon postback, nothing is there... Since it is done in code, there is no state on the return trip...
Hi Daryl,
I was trying to provide you work around for your scenario on postback you should take care to recreate the templates.
Thanks.
I looked carefully at the code you posted...
again.. can't use it as it references things that are not in net 2.0 like itemplate..
At least I could not find system.web.ui.itemplate on my system.
Daryl,
I've converted my testing site to .NET 2.0 and it builds and run as well. I am attaching it for your reference.
radoslav,
Thanks for all your input. I finally gave up on dynamic controls, it became too much of a PITA.
Instead I went with the notion of adding all teh editor controls I would use to the template control and setting up the ones I want in the server side code. It's now working just fine. Sorry for being a bit rough on you, frustration is a terrible thing.
darylleger said:The issue I am having is, on submit, how to get the value of the templated control, since once it returns from postback the template controls no longer exist.
Please see the following link how to get the values of template columns per cell in loop.
http://forums.infragistics.com/forums/t/41359.aspx
you can handle the Page_int event to re-create the templates for each different cell but you also will need to implement the selection for your own means that you will need to use for example the Session object to persist the selection in array or any other kind of data structure over postbacks if it's needed.
Finally got the example to work...
had to create a new project and add the stuff myself..
Interestingly your sample shows how to create a template column, which I already knew from other sources.
The issue I am having is, on submit, how to get the value of the templated control, since once it returns from postback the template controls no longer exist.
still getting an error
Look in your webconfig file..
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> <add assembly="Infragistics2.Web.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/> <add assembly="Infragistics35.WebUI.Shared.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/> <add assembly="Infragistics35.WebUI.UltraWebGrid.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7DD5C3163F2CD0CB"/></assemblies>
I replaced these with the net 2.0 version but now get "UltraWebGrid1 is not declared"
thanks, give me a couple of days to chew on it.
THanks again.