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
90
Add a Button in an UltraWebGrid
posted

Hi together.

I'd like to add a button in an UltraWebGrid to access a new page. How can I do this?

Many greetings

Maddi1986

Parents
No Data
Reply
  • 90
    posted

     Hi together.

     I added a button in the UltraWebGrid with the ColumnType.Button property but know I got a problem with the button event handler. Here is some code:

    private void ShowAppointmentSuggestion()
    {

    AppointmentSuggestionView.Bands[0].Columns.Add("Date", "Datum"); // AppointmentSuggestionView is the UltraWebGrid
    AppointmentSuggestionView.Bands[0].Columns.Add("Time", "Uhrzeit");
    AppointmentSuggestionView.Bands[0].Columns.Add("Request", "Anforderung");

    UltraGridColumn bookingColumn = new UltraGridColumn("Booking", "Buchung", ColumnType.Button, "Booking");
    bookingColumn.CellButtonDisplay = CellButtonDisplay.Always;
    bookingColumn.Width = 145;
    AppointmentSuggestionView.Bands[0].Columns.Add(bookingColumn);

    .... Add some data in the Grid

    AppointmentSuggestionView.ClickCellButton += new ClickCellButtonEventHandler(AppointmentSuggestionView_ClickCellButton);


    }

    void AppointmentSuggestionView_ClickCellButton(object sender, CellEventArgs e)

    {

    }

     

    If I click on a button in the button column it throws a PostBack but the Method AppointmentSuggestionView_ClickCellButton will not be entered. Why not? Can somebody please help me.

     

    Many greetings

    Maddi1986
Children