creating a custom datatype that display binding data
DEar All,
I want to create custom datatype that display as a radiobutton...
starting by viewed the video in umbraco documentation and try to
create user control
drag and drop a grid...
in page load i read the database using old sqlconnection and include the connectionstring also to make sure it can work when i move it into umbraco project
i implement umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
set and get the value with SelectedItem
but unfortunetaly when i add it into datatype using usercontrolwrapper the umbraco is error without any clue..:(
does anybody have a correct sample to create custom datatype that bind into an outer database in its UI?
Thanks for a respons Ismail , i try to simplified what i want to do .. create a simple panel that read from umbraco library (group) and diplayed in a checkbox group...
public partial class GroupPanel : System.Web.UI.UserControl, umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
{ protected void Page_Load(object sender, EventArgs e) { MemberGroup[] groups = MemberGroup.GetAll; foreach(MemberGroup item in groups) { chkGroup.Items.Add(item.Text); } }
public object value { get { return chkGroup.SelectedValue; } set { if(value != null) { // will read from database
creating a custom datatype that display binding data
DEar All,
I want to create custom datatype that display as a radiobutton...
starting by viewed the video in umbraco documentation and try to
but unfortunetaly when i add it into datatype using usercontrolwrapper the umbraco is error without any clue..:(
does anybody have a correct sample to create custom datatype that bind into an outer database in its UI?
ridi,
Can you paste your code then we can see what you are trying todo.
Thanks
Ismail
Thanks for a respons Ismail , i try to simplified what i want to do .. create a simple panel that read from umbraco library (group) and diplayed in a checkbox group...
public partial class GroupPanel : System.Web.UI.UserControl,
umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor
{
protected void Page_Load(object sender, EventArgs e)
{
MemberGroup[] groups = MemberGroup.GetAll;
foreach(MemberGroup item in groups)
{
chkGroup.Items.Add(item.Text);
}
}
public object value
{
get
{
return chkGroup.SelectedValue;
}
set
{
if(value != null)
{
// will read from database
}
}
}
}
ridi,
What is the error you are getting? Also take a look at Tims guide on how to create one http://www.nibble.be/?p=24
Regards
Ismail
is working on a reply...